Skip to main content
Glama

sql generate

sql_generate
Read-only

Plain-English question to SQL for your schema (SQLite, Postgres, MySQL, BigQuery...): the query, an explanation and assumptions, a read-only check, and for SQLite schemas the query is compiled against your tables (and retried if it fails). Costs $0.02 USDC per call (x402).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaYes
dialectNo
questionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, yet the description adds genuinely non-derivable behavior: the returned artifacts (query, explanation, assumptions, read-only check), SQLite-specific compilation against real tables with automatic retry on failure, and a per-call cost of $0.02 USDC via x402. That cost/validation disclosure is exactly the kind of context annotations cannot carry; it stops short of 5 only because no failure/auth caveats beyond the retry are described.

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?

A single dense sentence, but front-loaded with the core purpose and then the output/cost details; every clause (outputs, validation, retry, price) adds information rather than filler. The heavy parenthetical nesting makes it slightly harder to parse than ideal.

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?

There is no output schema, and the description compensates by naming what comes back (query, explanation, assumptions, read-only check) plus the pricing model. Combined with the annotations' safety profile, an agent has enough to decide and call correctly, though dialect/parameter edge cases remain unspecified.

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 must compensate. It partially does: 'for your schema' clarifies the 'schema' parameter's role and the dialect list (SQLite, Postgres, MySQL, BigQuery...) gives useful domain for 'dialect', but no format, size limits, or expected shape for 'question' or 'schema' is given, and the SQLite-only compile behavior isn't tied back to the dialect parameter explicitly.

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+resource: turning a plain-English question into SQL for a user-supplied schema, and enumerates supported dialects. It implicitly separates itself from the sibling 'sql' tool (generation vs. execution) but never names or contrasts with that sibling explicitly, so an agent must infer the boundary.

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?

Usage is implied by the input contract ('question' + 'schema'), so the agent can infer you use this when you have a natural-language question and a schema rather than a ready query. However there is no explicit when-to-use/when-not statement and no mention of the 'sql' sibling as the alternative when you already have SQL to run.

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