Skip to main content
Glama
kewinall

Data Platform MCP Server

by kewinall

explain_sql

Explain read-only SQL queries after SQLGlot AST validation, returning execution plans for tenant-authorized data platform analysis.

Instructions

Explain tenant-authorized read-only SQL after SQLGlot AST validation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
sourceYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.3/5.0
Behavior4/5

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

With no annotations, the description carries the load and does disclose important behavioral traits: the operation is read-only and tenant-authorized, and SQLGlot AST validation happens first. It does not mention error behavior or whether the query is executed/parsed, but the core safety and pipeline behavior are stated.

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

Conciseness4/5

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

The single sentence is tight and front-loads the main action, with each qualifier adding information. It is concise, though brief to the point of omitting parameter and usage detail.

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

Completeness2/5

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

The output schema exists, so return format is covered, and the description covers read-only/auth. But with undefined 'source' and no usage differentiation from sibling tools, an agent cannot reliably select and invoke it correctly.

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

Parameters2/5

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

Both parameters are bare strings with zero schema descriptions. 'sql' is self-explanatory, but 'source' is ambiguous (data source ID, dialect, or something else) and the description does not clarify it.

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 uses a clear verb ('Explain') with a specific resource ('SQL') and adds meaningful qualifiers: tenant-authorized, read-only, and post-validation. It does not specify what kind of explanation is produced or how it differs from analyze_sql_lineage, so it is not fully differentiating.

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?

It provides implied use conditions: the SQL must be tenant-authorized, read-only, and processed through SQLGlot AST validation. There is no explicit statement of when to prefer this tool over analyze_sql_lineage or other siblings, and no exclusions.

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