Skip to main content
Glama

validate_sql

Checks SQL syntax without connecting to a database, helping catch structural errors before execution. Returns validity status and identified issues for the supplied SQL and dialect hint.

Instructions

Validate SQL syntax without touching a database.

Args: sql: SQL text. dialect: Dialect hint (informational; no parser is dialect-specific here).

Returns: Validity and any structural issues found.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sql": "<sql>"
    },
    "name": "validate_sql"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYes
dialectNogeneric

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description does carry real weight and does disclose two non-obvious behaviors: no database connection is made, and the dialect parameter is purely informational because no parser is dialect-specific. That prevents a false assumption that results vary by dialect. It stops short of explaining what validation engine/subset is applied or how strict the 'structural issues' are, which matters for a no-annotation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The key constraint is front-loaded in a single strong sentence, which is good structure. However, the Args/Returns block restates the schema properties and duplicates information an output schema already carries, so a meaningful fraction of the text does not earn its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Both parameters are addressed and the existence of an output schema means the Returns line is redundant but harmless. What is missing is the depth an agent needs for a validator with zero annotations: no word on accepted dialect values, grammar coverage, or whether errors are returned as exceptions versus structured issues.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate and does: it clarifies that dialect is a hint that does not change parsing behavior, which the bare schema ('Dialect', default 'generic') cannot convey. The sql entry ('SQL text') is only a restatement, but the dialect clarification is genuinely load-bearing for correct invocation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence states a specific verb and resource ('Validate SQL syntax') and adds a meaningful scope qualifier ('without touching a database') that separates it from execution tools. The sibling set contains several other validators, but the SQL resource is distinctive enough that an agent can pick this one without opening the schema; there is no explicit sibling routing, which keeps it just below a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the 'without touching a database' clause suggests pre-flight/offline checking, but the description never states when to call this versus validate_script_syntax or other validators, nor any prerequisites. It also omits any exclusion or failure-context guidance, leaving the agent to infer the use case.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools