Skip to main content
Glama

Read a diagram, with a picture

get_diagram
Read-only

When: use to show the user a diagram (it attaches a rendered PNG and a markdown image line, 6-10 s), or to poll a diagram that create_diagram or edit_diagram is still working on. To check your own edits, canvas_view is faster and reports overlaps.

Returns every node with its type and columns, every connection and the zones, plus whether a generation or edit_diagram run is still in progress.

Next: canvas_view and the canvas_* tools to edit.

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": {
      "diagram_id": "<diagram_id>"
    },
    "name": "get_diagram"
  }
}

Input Schema

NameRequiredDescriptionDefault
diagram_idYesCanvas id, from list_diagrams, create_diagram, or create_blank_diagram.
include_imageNoAttach a PNG preview and a markdown image link to show the user. Default true; pass false for structure-only reads.
include_columnsNoInclude table column lists. Default true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / include_image
      Added value: +{
      +  "description": "Attach a PNG preview and a markdown image link to show the user. Default true; pass false for structure-only reads.",
      +  "type": "boolean"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only cover safety (readOnlyHint, openWorldHint). The description adds latency (6-10 s), the side effect of attaching a PNG and an image line to the response, the full return payload (nodes, types, columns, connections, zones), and the in-progress generation flag — meaningful traits beyond the structured data.

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-loads the trigger, then returns, then next steps — well structured and mostly free of filler. The trailing 'Next: canvas_view and the canvas_* tools to edit' is helpful routing but slightly beyond the minimum needed.

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?

No output schema exists, yet the description enumerates what comes back and flags the async generation state, and it routes the agent onward. Nothing needed to call a read-only diagram fetch 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 coverage is 100%, so include_image (PNG attach) and include_columns are already documented, and diagram_id's source is spelled out in the schema. The description hints at 'structure-only reads' but adds no syntax or defaults beyond the schema; 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?

States a specific verb+resource ('show the user a diagram') plus the distinguishing side effect (rendered PNG + markdown image line) and the polling role. An agent can separate it from canvas_view, create_diagram, and edit_diagram without opening a 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?

Explicit when-to-use ('show the user a diagram', 'poll a diagram that create_diagram or edit_diagram is still working on') and an explicit alternative with its trade-off ('canvas_view is faster and reports overlaps').

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources