Skip to main content
Glama

Read a diagram

get_diagram
Read-only

Read a diagram as an indented outline with node IDs, comments, and user changes before editing when the current state is unclear. Without a docId, reads the most recent diagram.

Instructions

Read a diagram as an indented outline with node ids, the user's comments, and what the user changed on the canvas. Use it before editing when you are unsure of the current state, or when the client cannot show the diagram. Without docId it reads the most recent one.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_diagram"
  }
}

Input Schema

NameRequiredDescriptionDefault
docIdNoThe docId a visualize result gave you
sinceRevisionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

The readOnlyHint annotation already covers the safety profile, so the description's job is to add context: it does so by disclosing the exact return shape (outline with node ids, comments, canvas diffs) and the fallback default of reading the most recent diagram when docId is omitted. It says nothing about response size, limits, or what 'most recent' is scoped to, which keeps it short of a 5.

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, each carrying distinct information: what it returns, when to call it, and what happens with no argument. Nothing is repeated from the schema or the title, and the return-shape detail is front-loaded.

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 two-parameter read tool with no output schema, the description covers the essential ground by describing the returned format and the default-argument behavior. The missing piece is the meaning of sinceRevision, the only parameter an agent could get wrong when invoking it.

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 only 50%, and the one covered parameter (docId) is already explained in the schema as coming from a visualize result. The description usefully adds the optionality semantics of docId by stating the no-docId fallback, but sinceRevision is left entirely unexplained, leaving a real gap that a description at this coverage level should have closed.

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 description states a specific verb and resource ('Read a diagram') and immediately characterizes the returned representation: an indented outline with node ids, user comments, and canvas changes. Saying it is used 'before editing' implicitly separates it from the edit_diagram sibling, so an agent knows this is the inspection tool rather than the mutation tool.

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?

It gives two concrete use conditions: when you are unsure of the current state before editing, or when the client cannot show the diagram itself. The condition 'when you are unsure' also implies its converse, that a known state might skip this call, but no explicit when-not statement or named alternative is given.

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