Skip to main content
Glama
MOmayr
by MOmayr

validate_sql

Checks whether a SQL query is valid before execution, returning true for valid SQL or an error message for invalid input.

Instructions

Validate SQL. Returns the string 'true' if the SQL is valid, or an error message string if invalid.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesSQL query to validate

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose a non-obvious behavioral trait: the return is the literal string 'true' on success or an error message string on failure. However, it says nothing about whether validation merely parses syntax or executes/resolves against a connection, what dialect is assumed, or whether any permissions/state are touched -- significant gaps for a tool with zero annotation coverage.

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

Conciseness5/5

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

Two short sentences, front-loaded with the purpose and then the exact return contract. Every sentence earns its place with no filler.

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?

Since no output schema exists, the description helpfully explains the return values, which is the key missing piece it covers. But it omits dialect assumptions, what 'valid' means semantically (parse-only vs. plan/resolve), and any workflow guidance, leaving the definition adequate but incomplete for a no-annotation tool.

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% for the single 'sql' parameter, so the schema already documents it. The description adds no syntax, dialect, or format detail beyond what the schema provides, making the baseline 3 appropriate.

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 description states a specific verb and resource -- 'Validate SQL' -- which is unambiguous and clearly distinct from siblings like execute, query, or execute. It stops short of naming an alternative or scope (e.g., syntax-only vs. semantic/plan validation), so it does not fully differentiate the role from the sibling execution tools.

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

Usage Guidelines2/5

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

There is no statement of when to use this tool versus execute/query, no mention of a validate-before-execute workflow, and no exclusions or prerequisites. The usage is only inferable from the tool name, which is minimal guidance.

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