Skip to main content
Glama

Aayat AI

SQL explain ($0.003)

sql-explain
Read-only

Explain and sanity-check a SQL query before running it: statement type, tables touched, syntax problems (quotes, parentheses, = NULL), risky patterns (UPDATE/DELETE without WHERE, DROP, NOT IN with NULLs, cartesian joins, non-sargable filters, multiple statements) and a plain-English explanation. Price: $0.003 in USDC per call (x402 or prepaid credits). In the free trial.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesThe SQL to check.
dialectNoSQL dialect (used in the explanation).generic

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYes
validYesFalse if a syntax problem was found (heuristic checks, not a full parser).
tablesYes
verdictYes
findingsYeserror / danger / warning / info, with codes and messages.
statementsNo
explanationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already mark this as read-only and open-world, so the bar is lower. The description adds useful behavioral context: pricing ($0.003 in USDC, x402 or prepaid credits) and a list of risky patterns it detects. It does not contradict any annotation, though it omits some details like whether it connects to a live database.

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?

Front-loaded with the core purpose, followed by a dense but useful enumeration of checks, and a brief pricing note. Every sentence earns its place; no wasted words.

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

Completeness5/5

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

An output schema exists, so return values need not be described. The description covers what the tool does, when to use it, and pricing, and annotations supply safety profile. Nothing critical is missing for correct invocation.

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 the schema already fully documents both parameters (sql and dialect). The description adds no parameter-specific meaning beyond what is in the schema, so baseline 3 is appropriate.

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?

States a specific verb ('Explain and sanity-check') and resource ('a SQL query'), then lists exactly what the analysis covers (statement type, tables, syntax problems, risky patterns, plain-English explanation). This clearly distinguishes it from sibling tools like regex-explain or cron-explain.

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?

Provides a clear usage context: 'before running it,' giving the agent a concrete when-to-use scenario. No explicit when-not or alternative tools are named, but the context is unambiguous.

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