Skip to main content
Glama

get_diagram

Read-onlyIdempotent

Retrieve a saved diagram in your preferred format to display or analyze it. Use 'svg-interactive' to show it visually or 'json' to reason about its structure.

Instructions

Read a diagram back: format='svg-interactive' to show it, 'json' to reason about it.

Formats: 'svg-interactive' (canvas drawing in a pan/zoom shell -- the one to SHOW), 'svg' (same drawing as a plain file, to attach or link), 'mermaid' (portable, but re-lays out and DISCARDS the arrangement the user made), 'text' (the prose projection), 'json' (the full graph with positions, notes and links -- the only round-trippable one, and the one to reason over).

Both SVG formats write the markup to a file and return its path plus a thin index of the steps; the payload is deliberately too small to draw from. The returned next_step says what to do with the path, at the point where it matters: when the user asked to SEE the flow, reading the file and emitting it inline is the work, not a cost to avoid.

Input Schema

NameRequiredDescriptionDefault
uidYesthe diagram.
formatNoone of the formats above.mermaid
offsetNowhere a long `body`, or the SVG step index, starts; `next_offset`, when present, starts the next page.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.16.1
    • addedInput schema / properties / format / description
      Added value: +"one of the formats above."
    • removedInput schema / properties / format / title
      Removed value: -"Format"
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "where a long `body`, or the SVG step index, starts; `next_offset`, when present, starts the next page.",
      +  "type": "integer"
      +}
    • addedInput schema / properties / uid / description
      Added value: +"the diagram."
    • removedInput schema / properties / uid / title
      Removed value: -"Uid"
    • removedInput schema / title
      Removed value: -"get_diagramArguments"
  2. Addedv0.1.1

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds real behavioral context on top: both SVG formats write markup to a file and return only a path plus a thin step index 'deliberately too small to draw from', and the returned next_step tells the agent to read and emit the file inline. This is substantive disclosure the annotations cannot carry.

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 action and the two primary formats, then layered detail. The third paragraph is somewhat editorial ('reading the file and emitting it inline is the work, not a cost to avoid'), but each sentence still conveys actionable behavior, so efficiency is good though not maximal.

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 no output schema, the description shoulders the return contract and does so well: it names the returned path, the thin index, next_step and (via the schema) next_offset paging. An agent has everything needed to call it and act on the result correctly.

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 coverage is 100%, but the schema's own param text is thin ('one of the formats above', 'the diagram.'), so the description deliberately carries the meaning of each format value and how it relates to round-tripping and layout fidelity. It adds little on `offset` beyond what the schema says, keeping it just under a 5.

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?

Opens with a specific verb+resource ('Read a diagram back') and immediately anchors the two headline formats to their purpose. An agent understands the tool's job without the schema. It does not, however, explicitly distinguish itself from read-oriented siblings like 'diagram' or 'recall', so a 4 rather than a 5.

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?

Gives explicit when-to-use guidance per format: svg-interactive 'to SHOW', json 'to reason about it', mermaid 'portable, but re-lays out and DISCARDS the arrangement', and flags json as 'the only round-trippable one'. This is exactly the decision an agent faces when choosing a format, with the trade-off for each stated.

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