# GoSQLX

> SQL validation, formatting, parsing, metadata extraction, linting, and security analysis.

- name: io.github.ajitpratap0/gosqlx
- version: 1.18.0
- connection class: R0 (autonomous)
- trust: 97/100
- quality: 91/100 (strong)
- owner: not claimed
- descriptor: https://api.protogrid.dev/v1/servers/io.github.ajitpratap0%2Fgosqlx
- tools: https://api.protogrid.dev/v1/servers/io.github.ajitpratap0%2Fgosqlx/tools

**An agent can connect right now, no human step.** Remote endpoint, no authentication, reachable on the last probe.

## Connection (mcpServers)

```json
{
  "mcpServers": {
    "gosqlx": {
      "type": "http",
      "url": "https://mcp.gosqlx.dev/mcp"
    }
  }
}
```


## Trust

- hygiene: 100
- liveness: 100
- freshness: 100
- provenance: 90
- drivers: +repository +namespace-matches-repo +website +reachable +uptime-100% +updated-1d-ago
- Derived from observable signals (official registry feed and our own credential-free probes); no code audit performed.

## Quality 91/100 (strong)

### protocol: 75 (weight 25)

- warn `protocol.modern`: newest supported version is 2025-11-25; 2026-07-28 not supported, older versions are deprecated until 2027-07-28
- n/a `protocol.stateless`: only applies to 2026-07-28 servers
- pass `protocol.transport`: streamable HTTP
- n/a `protocol.list_ttl`: only applies to 2026-07-28 servers

### authorization: n/a (weight 15)

- n/a `auth.prm`, `auth.as_metadata`, `auth.cimd`: no remote uses OAuth
- n/a `auth.secret_in_url`: no templated URL

### tool hygiene: 100 (weight 30)

- pass `tools.descriptions`: every tool has a description
- pass `tools.description_length`: descriptions are concise
- pass `tools.schemas`: every tool has an object input schema
- pass `tools.annotations`: 7 of 7 tools declare readOnlyHint or destructiveHint
- pass `tools.directory_hints`: every tool declares readOnlyHint, destructiveHint, idempotentHint and openWorldHint
- pass `tools.token_cost`: about 1,114 tokens to load every tool
- pass `tools.api_dump`: tools are not a one-to-one API dump
- pass `tools.hidden_text`: no hidden text in tool, prompt or resource definitions
- pass `tools.poisoning`: no instructions aimed at the model in tool, prompt or resource definitions

### stability: 100 (weight 15)

- pass `stability.changes`: no tool changes in 30 days
- pass `stability.rug_pull`: no tool changed its meaning under the same name
- pass `stability.new_links`: no tool change named a new site

### dependencies: n/a (weight 15)

- n/a `deps.known_vulns`, `deps.mcp_sdk_version`, `deps.resolvable`: no npm or PyPI package

- tools: 7, about 1,114 tokens to load them all
- tool set hash: 24c79235d2614a916a3a894bef5327a4
- tools last changed: 2026-10-28T07:28:44.476Z
- badge: [![protogrid quality](https://protogrid.dev/badge/io.github.ajitpratap0/gosqlx.svg)](https://protogrid.dev/servers/io.github.ajitpratap0/gosqlx)
- Checks run on what our credential-free, read-only probes observe; tools are never called and no code audit is performed.

### Definition changes

- 2026-10-28 `parse_sql` changed (description, inputSchema)
  - before: Use this when the user wants to know how SQL parses: returns an AST summary with the statement count and the type of each statement.
  - after: Use this when the user wants to know how SQL parses: returns an AST summary with the statement count and the type of each statement, optionally for a specific dialect. GO batch separators are excluded from the count.
- 2026-10-28 `format_sql` changed (description)
  - before: Use this when the user wants SQL pretty-printed or reformatted: one clause per line, optional upper-case keywords and trailing semicolon. Comments are not kept. Returns {formatted_sql, options}.
  - after: Use this when the user wants SQL pretty-printed or reformatted: one clause per line, optional upper-case keywords and trailing semicolon. Comments are preserved; unplaceable optimizer hints are refused. Returns {formatted_sql, options}.
- 2026-10-27 `format_sql` changed (inputSchema)

Full history: https://api.protogrid.dev/v1/servers/io.github.ajitpratap0%2Fgosqlx/changes

## Remotes

- https://mcp.gosqlx.dev/mcp (streamable-http, auth none, reachable true, uptime30d 1)

## Packages

_none_

## Tools (7)

- `analyze_sql`: Use this when the user wants a complete review of a SQL query. Runs validate, parse, metadata, security, lint, and format concurrently and returns one composite report; hosts that support MCP Apps render it as an interactive report.
- `extract_metadata`: Use this when the user wants the tables, columns, and functions a SQL query references (e.g. for lineage or impact analysis). Returns {tables, columns, functions}.
- `format_sql`: Use this when the user wants SQL pretty-printed or reformatted: one clause per line, optional upper-case keywords and trailing semicolon. Comments are preserved; unplaceable optimizer hints are refused. Returns {formatted_sql, options}.
- `lint_sql`: Use this when the user wants SQL style feedback. Applies the same 10 rules as `gosqlx lint`: L001 trailing whitespace, L002 mixed indentation, L003 consecutive blank lines, L004 indentation depth, L005 line length (>100), L006 column alignment, L007 keyword case (upper), L008 comma placement (trailing), L009 aliasing consistency, L010 redundant whitespace. Returns {violation_count, violations}.
- `parse_sql`: Use this when the user wants to know how SQL parses: returns an AST summary with the statement count and the type of each statement, optionally for a specific dialect. GO batch separators are excluded from the count.
- `security_scan`: Use this when the user wants SQL checked for injection patterns: tautologies, UNION attacks, stacked queries, comment bypasses, and more. Returns findings with severity counts.
- `validate_sql`: Use this when the user wants to know whether a SQL statement is syntactically valid, optionally for a specific dialect. Returns {valid: bool, error?: string, dialect?: string}.

## Prompts and resources

### Resources (1)

- `` ui://gosqlx/analysis-v1.html ``: Interactive GoSQLX analysis report: validity, statement types, referenced tables/columns/functions, security findings by severity, lint violations, and the formatted SQL with a copy button.
