Skip to main content
Glama

Explain what a schema will generate

explain_schema
Read-onlyIdempotent

Validate a schema before generation to catch conflicts early; see planned row counts, memory estimates, column overlaps, and invariants.

Instructions

Show what generate_from_schema would do with a schema, without generating.

Call it before generate_from_schema on a schema you designed: it is cheap, and it catches the mistakes that would otherwise surface after a long run. Returns each table's planned row count and approximate memory, the declarations and the columns each one writes, any column two declarations both write, every outcome curve's period plan and warnings, and the invariants attest_dataset will check on the output. When will_generate is false, conflicts names each contradiction with the arithmetic and a remedy; fix those in the schema and call again.

Args: schema: The schema dict you would pass to generate_from_schema. seed: The seed you would generate with. max_invariants: How many invariants to include in the response.

Returns: {"ok", "will_generate", "total_rows", "estimated_bytes", "tables", "relationships", "declarations", "writers", "overlaps", "conflicts", "conformance", "invariants", "invariants_total"}.

Input Schema

NameRequiredDescriptionDefault
seedNo
schemaYes
max_invariantsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.8

TDQS

A4.7/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly, idempotent, non-destructive), but the description adds substantive context: it is a dry run, it is cheap, it reports planned row counts, estimated memory, overlapping writers and conflicts with arithmetic plus a remedy. It also explains the failure path (will_generate=false → fix schema → call again), which no annotation conveys.

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?

Front-loaded with the one-line purpose before any detail, and most sentences carry real information (cost, failure handling). The trailing 'Returns:' block largely duplicates the output schema, which is the main non-earning element.

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 3-param, nested-object, read-only dry-run tool this is nearly complete: motivation, cost, output summary and the conflict-remediation loop are all present. The only redundancy is restating return keys that the output schema already defines.

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

Parameters4/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 carry the burden, and it does: schema is 'the schema dict you would pass to generate_from_schema', seed is 'the seed you would generate with', and max_invariants is 'how many invariants to include'. It lacks format details or notes on defaults/nulls, which keeps it below a 5.

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+resource ('Show what generate_from_schema would do with a schema, without generating') and explicitly frames itself as the dry-run counterpart to the sibling generate_from_schema. An agent can select it over its siblings without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly prescribes when to call it ('before generate_from_schema on a schema you designed'), gives the rationale ('it is cheap, and it catches the mistakes that would otherwise surface after a long run'), and describes the remediation loop when will_generate is false. This is textbook when-and-why guidance.

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