Skip to main content
Glama

get_diagram

Read a diagram back in a chosen format: svg-interactive to show it, json to reason over its full graph with positions and notes.

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. help(command='get_diagram') has the rest.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidYes
formatNomermaid

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.1

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses that both SVG formats write markup to a file and return only a path plus a thin index ('the payload is deliberately too small to draw from'), that mermaid DISCARDS the user's arrangement, and that `next_step` tells the caller what to do with the path. That is exactly the kind of non-obvious behavioral context annotations would otherwise provide.

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?

The key routing rule (which format for show vs. reasoning) is front-loaded in the first sentence, and the rest is organized as a compact format inventory followed by return behavior. Slightly verbose with parentheticals, but every sentence carries information.

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 2-param, no-output-schema, no-annotation read tool, the description covers format semantics, the actual return shape (file path + thin index + next_step), and defers detail to help(command='get_diagram'). Only the meaning of `uid` is left unaddressed.

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 0% and there are no enums, so the description must define the format values — which it does thoroughly, including round-trippability and side effects per value. The `uid` parameter receives no explanation at all, leaving one of two params undocumented.

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?

The opening 'Read a diagram back' gives a specific verb (read) plus resource (diagram), and the format list immediately differentiates this from write-oriented siblings like diagram_node, diagram_edge, and diagram_relayout. An agent can tell what it retrieves and in what shapes without opening anything else.

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

Usage Guidelines4/5

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

Guidance is explicit per format: 'svg-interactive' is 'the one to SHOW', 'json' is 'the one to reason over', 'mermaid' is portable but re-lays out, 'text' is the prose projection. It stops short of naming when to prefer a sibling (e.g. `diagram` or `diagram_jump`) instead of calling this tool.

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