Skip to main content
Glama

explain_sql

Translate SQL statements into plain English to understand what a query does before deciding whether to run it. Supports Postgres, MySQL, and SQLite dialects.

Instructions

Explain a SQL statement in plain English. No verdict, no judgment — for understanding what a query does before deciding whether to run it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesThe SQL statement to check.
dialectNoSQL dialect used to parse the statement.postgres

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/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. It usefully implies the tool is non-evaluative and (via 'before deciding whether to run it') likely does not execute the statement, which is real added value. But it says nothing about permissions, cost/rate limits, or what the returned explanation looks like.

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 core action and followed by the one scoping caveat that matters. Nothing is wasted and there is 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?

For a two-parameter tool with no output schema, the description should ideally sketch the shape of the explanation returned or note dialect-fallback behavior. It covers intent and the no-judgment scope but stops short of that, leaving a modest gap.

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%, so both 'sql' and 'dialect' are already documented in the schema, including the enum values and default. The description adds no dialect guidance or format hints beyond that, so baseline 3 applies.

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 gives a specific verb+resource: explains a SQL statement into plain English. The clause 'No verdict, no judgment' implicitly distinguishes it from validate_sql/guard_query, but those siblings are never named, so an agent must infer the boundary rather than being told.

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?

'For understanding what a query does before deciding whether to run it' gives a clear use context and implies ordering relative to execution. However, it never names validate_sql or guard_query, nor states when to pick this over validation or guarding — the distinction is left to inference.

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