Skip to main content
Glama

Get a diagram

get_diagram
Read-onlyIdempotent

Fetch a published diagram's current Mermaid source by name or slug, and show it rendered. The returned source is stamped with the diagram's identity — keep the line9: frontmatter block when you edit it so that Line9 recognises the diagram when it is opened and published there instead of creating a new one. Requires Line9 sign-in. This connector cannot publish or save. To publish, the user opens the diagram in Line9 (the open_url link) and publishes there — not with the Line9 CLI.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
diagramYesDiagram name, slug, or trailing public_ref.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
svgNo
pathNo
planNo
errorNo
widthNo
configNo
heightNo
sourceNo
statusYes
diagramNo
controlsNo
diagramsNo
open_urlNo
warningsNo
signed_inNo
truncatedNo
watermarkNo
edge_countNo
node_countNo
orientationNo
render_modeNo
stop_reasonNo
diagram_typeNo
engine_versionNo
schema_versionYes
fallback_reasonNo
mermaid_versionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Even with readOnlyHint and idempotentHint annotations, the description adds substantial behavioral detail: the returned source carries a line9 frontmatter identity block that must be preserved, the diagram is recognized on open/publish in Line9, auth is required, and the connector is write-incapable. This goes well beyond the annotation surface.

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?

Four focused sentences, with the core action first and every subsequent sentence adding necessary context (frontmatter handling, auth, save/publish limitations). No filler or repetition.

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?

Given one fully-schema-covered parameter, an existing output schema, and safety annotations, the description provides everything needed for correct use: auth, source behavior, identity preservation, and limitations. No critical guidance 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?

The single parameter is fully covered by the schema description ('Diagram name, slug, or trailing public_ref'). The tool description restates only 'name or slug' and adds no additional parameter format, examples, or disambiguation, so it neither compensates for nor improves on the schema.

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?

The description names a concrete action and resource: fetching a published diagram's current Mermaid source by name or slug and showing it rendered. It is clearly not a tautology, but it does not explicitly distinguish itself from the sibling tools list_diagrams and render_diagram beyond the implied source-vs-list/render split.

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

Usage Guidelines3/5

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

It gives useful context about prerequisites and boundaries (requires Line9 sign-in; cannot publish or save; publishing happens via the open_url link, not the CLI). However, it never directly says when to choose this tool over render_diagram or list_diagrams, so sibling routing is left to inference.

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