Skip to main content
Glama

Check SQL without running it

validate
Read-onlyIdempotent

Check SQL syntax and referenced objects without executing (Parse/Describe on PostgreSQL, metadata description on SQL Server, dry-run on BigQuery). Success does not prove privileges, returned rows, or runtime behavior. DDL statements (CREATE, ALTER, DROP) are not supported. Raw exploration tools do not apply probe redaction and are not bound by schema exposure: they reach any object the datasource credential reaches, and are offered to Administrators, and to members whose Role grants Full; separate access checks apply. Schema exposure governs get_schema, the ontology and approved requests.

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"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesSQL statement to validate
datasourceNoOptional datasource ID to target. Omit to use the project's configured default; required when the project has multiple datasources and no default is configured. Each datasource has its own SQL dialect: get_schema lists every datasource with its type, dialect and identifier quote, and every result carries datasource_type and dialect. A datasource that has not finished setup is refused with datasource_not_ready. Use datasource (not datasource_id) here; Request authoring uses datasource_id. Unknown top-level arguments and malformed supplied datasource values return invalid_parameters before datasource selection. Supply a nonzero UUID string, or omit datasource intentionally to use the default/sole datasource.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so safety is covered; the description still adds real value by disclosing what a success result does NOT prove (privileges, returned rows, runtime behavior) and which statement classes are rejected. The access-control paragraph (credential reach, Administrators/Full roles, probe redaction) adds useful authorization context, though it is phrased generally about 'raw exploration tools' rather than this tool specifically.

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 purpose and limitation statements are front-loaded and dense with useful content. However, the trailing two sentences about probe redaction, credential reach, roles and schema exposure are abstract and read as policy boilerplate about other tools, blurring rather than sharpening the reader's picture of this tool.

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

Completeness4/5

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

With no output schema, the description does the important work of defining what a successful validation means and does not mean, plus DDL exclusion and dialect variation across backends. Combined with a fully documented schema, an agent has enough to call this correctly; only the slightly misplaced access-control paragraph keeps it from being complete and unambiguous.

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

Parameters3/5

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

Schema description coverage is 100% and the datasource parameter's schema text already covers defaulting behavior, dialect implications, datasource_not_ready, UUID format and the datasource vs datasource_id naming distinction. The description body adds no parameter guidance of its own, so the baseline 3 applies.

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

Purpose5/5

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

The description opens with a specific verb and resource ('Check SQL syntax and referenced objects without executing') and immediately disambiguates by naming the backend-specific mechanisms (Parse/Describe on PostgreSQL, metadata description on SQL Server, dry-run on BigQuery). An agent can distinguish this from an execute-SQL tool or from get_schema purely from this sentence.

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

Usage Guidelines4/5

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

It gives clear conditions and exclusions: use it to check syntax without running, DDL statements are not supported, and success does not guarantee privileges or runtime behavior. It also contrasts with 'raw exploration tools' for object reach. What it lacks is an explicit positive alternative (e.g., 'use get_schema to enumerate objects, use this only to validate a statement you already wrote'), so routing is clear but not fully spelled out.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources