Skip to main content
Glama
S-CurveLabs

io.github.S-CurveLabs/sqlglass

Official
by S-CurveLabs

analyze_sql

Read-only

Inspect any SQL query to list tables, views, columns, CTEs, parameters, and output columns it touches. Clarify query dependencies and impacts.

Instructions

What a query touches: tables/views, columns per table, CTEs, parameters and its output columns.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes

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?

Annotations declare readOnlyHint=true, which already establishes that the tool is non-mutating. The description adds useful context about what the analysis returns, but it does not clarify whether the query is executed or only statically parsed, nor does it mention failure modes, dialect support, or performance implications.

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?

The description is a single, dense sentence that efficiently summarizes the tool's output categories without excess wording. It is front-loaded with the key idea, and every word contributes meaning.

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?

For a simple read-only tool with one parameter and no output schema, the description gives enough detail about what results the agent should expect. It could be more complete by explicitly stating that this is static analysis and not query execution, but the core invocation decision is well supported.

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 0%, so the description carries the burden of explaining the 'sql' parameter. It does this only implicitly by calling it 'a query.' Since there is just one parameter and its name and type make its role fairly obvious, this is minimally adequate, but it lacks detail about accepted formats, dialect, or whether it can analyze incomplete SQL.

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 clearly identifies what the tool reports: tables/views, columns per table, CTEs, parameters, and output columns for a SQL query. Though it lacks an explicit verb like 'analyzes' and could better distinguish itself from explain_query, the resource and content are specific enough for an agent to understand its purpose.

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?

The description provides no guidance on when to use this tool versus alternatives such as explain_query, lint_sql, or describe_table. There are no stated conditions, exclusions, or sibling comparisons, so the agent must infer usage from the tool name alone.

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