Skip to main content
Glama

Validate a spec

validate
Read-onlyIdempotent

Check a spec, scene, or CSV before drawing: returns JSON with ok and actionable errors that each include a fix. Read-only and cheaper than render while shaping input.

Instructions

Check an input without drawing anything: a spec, scene or CSV. Returns JSON with ok and, on failure, errors that each carry a fix. Read-only, and cheaper than render while you are still shaping the spec. For a finished drawing use audit.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "type": "<type>"
    },
    "name": "validate"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataNoCSV, GeoJSON or Mermaid text, inline. Give exactly one of spec, scene, data or path.
pathNoA spec, scene, CSV or Mermaid file on disk, instead of inline input.
specNoThe figure as a JSON object, inline, in the shape `describe <type>` prints. Give exactly one of spec, scene, data or path.
typeYesFigure type: mermaid (data is Mermaid text), flow, arch, seq, schema, iso (3D layer stack), bar, line, scatter, geo, or any chart type that describe lists.
sceneNoA v2 scene, inline: {"preset": "flow", "nodes": [...], "edges": [...], "groups": [...]}; type names its preset. Give exactly one of spec, scene, data or path.
optionsNoCLI flags without dashes, e.g. {"x": "month", "y": "signups", "group": "product", "title": "...", "highlight": ["Atlas"]}. describe lists them. Diagrams also take "style": a stylesheet object (or a list of them), "font": "Inter", and "fit": where the figure goes, "slide" (default), "page" or "column" (a narrow docs or notes column); describe style lists properties and selectors.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.9.1
    • changedInput schema / properties / data / description
      Previous value: -"CSV text, inline"New value: +"CSV, GeoJSON or Mermaid text, inline. Give exactly one of spec, scene, data or path."
    • changedInput schema / properties / options / description
      Previous value: -"CLI flags without dashes, e.g. {\"x\": \"month\", \"y\": \"signups\", \"group\": \"product\", \"title\": \"...\", \"highlight\": [\"Atlas\"]}. describe lists them."New value: +"CLI flags without dashes, e.g. {\"x\": \"month\", \"y\": \"signups\", \"group\": \"product\", \"title\": \"...\", \"highlight\": [\"Atlas\"]}. describe lists them. Diagrams also take \"style\": a stylesheet object (or a list of them), \"font\": \"Inter\", and \"fit\": where the figure goes, \"slide\" (default), \"page\" or \"column\" (a narrow docs or notes column); describe style lists properties and selectors."
    • changedInput schema / properties / path / description
      Previous value: -"or a spec/CSV file on disk"New value: +"A spec, scene, CSV or Mermaid file on disk, instead of inline input."
    • addedInput schema / properties / scene
      Added value: +{
      +  "description": "A v2 scene, inline: {\"preset\": \"flow\", \"nodes\": [...], \"edges\": [...], \"groups\": [...]}; type names its preset. Give exactly one of spec, scene, data or path.",
      +  "type": "object"
      +}
    • changedInput schema / properties / spec / description
      Previous value: -"JSON spec, inline"New value: +"The figure as a JSON object, inline, in the shape `describe <type>` prints. Give exactly one of spec, scene, data or path."
    • addedInput schema / properties / type / description
      Added value: +"Figure type: mermaid (data is Mermaid text), flow, arch, seq, schema, iso (3D layer stack), bar, line, scatter, geo, or any chart type that describe lists."
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and closed-world, so "Read-only" is partly redundant. The description does add real value beyond them: the return contract (JSON with ok, and errors that each carry a fix) and a cost/performance comparison against render, neither of which appears in the annotations.

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?

Three short sentences, front-loaded with the core action and the non-rendering constraint, then the return shape, then the sibling routing. Every sentence earns its place with no filler.

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?

With no output schema, the description correctly steps in to explain the return value (ok plus fixable errors), which is the single most important gap. It is slightly incomplete for a six-parameter, nested-object tool in that the file-on-disk mode (path) and the options object go unmentioned.

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 coverage is 100%, so all six parameters are already documented, including the mutual-exclusion rule repeated in three schema fields. The description's "a spec, scene or CSV" gestures at the input modes but omits path and options, adding little beyond what the schema provides; baseline 3 applies.

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?

"Check an input without drawing anything" is a specific verb+resource with an explicit negative scope, and the accepted input kinds (spec, scene, CSV) are named. It also distinguishes itself from render and audit by naming both siblings in the same breath.

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?

It gives the when ("while you are still shaping the spec"), the why ("cheaper than render"), and the when-not ("For a finished drawing use audit"), explicitly routing to an alternative. This is exactly the routing information an agent needs.

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