Skip to main content
Glama

Draw and audit a figure

render
Idempotent

Draws and audits a diagram in one call, validating input and layout, then writing SVG, HTML and a receipt with file paths and warnings. Each error includes a fix so you can adjust and rerun.

Instructions

Draw one figure and audit it in a single call. Validates the input, lays it out, writes OUT.svg, OUT.html and a receipt (OUT.graph.json) side by side, then checks the drawing. Returns one JSON line: ok, the file paths, a layout outline and any warnings. When ok is false, each error has a fix: change the spec or options and call render again. Overwrites files at the same out path. Use validate to check an input without drawing, and audit for an SVG this tool did not just draw.

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": "render"
  }
}

Input Schema

NameRequiredDescriptionDefault
outNoOutput path ending .html (default diagonaldiagrams-out.html). The .svg and the receipt are written beside it.
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. Changed8 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 / out / description
      Previous value: -"output path ending .html"New value: +"Output path ending .html (default diagonaldiagrams-out.html). The .svg and the receipt are written beside it."
    • 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."
    • changedInput schema / properties / type / description
      Previous value: -"mermaid (data = Mermaid text), flow, arch, seq, schema, bar, line, scatter, geo, or any describe type"New 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."
    • changedInput schema / required
      Previous value: -[
      -  "type",
      -  "out"
      -]New value: +[
      +  "type"
      +]
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=false and idempotentHint=true, but the description adds the crucial file-level consequences: three side-by-side outputs and 'Overwrites files at the same out path', which turns the idempotent hint into actionable knowledge. It also discloses the return payload (ok, file paths, layout outline, warnings) and the error contract, which no structured field provides.

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-loads the primary action and outputs in the first two sentences, then appends recovery and sibling routing. Every sentence carries distinct information — no restatement of the title or schema.

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?

With 7 parameters, nested objects, and no output schema, the description fills exactly the gaps that matter: the shape of the returned JSON line, the on-disk side effects, and the overwrite behavior. Nothing an agent needs to invoke it correctly is missing.

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 parameters like out, data, path, spec, scene, and options are already documented in detail. The description adds no syntax or constraint detail beyond referencing 'spec or options' in the retry advice, so the baseline 3 applies rather than a higher score.

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 and resource — 'Draw one figure and audit it in a single call' — plus the concrete artifacts produced (OUT.svg, OUT.html, OUT.graph.json). An agent can distinguish this from sibling 'validate' and 'audit' from the first sentence alone.

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 routes to alternatives with conditions: 'Use validate to check an input without drawing, and audit for an SVG this tool did not just draw.' It also gives recovery guidance — on ok=false, change spec or options and call render again — so both when-to-use and what-to-do-next are covered.

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