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

NameRequiredDescriptionDefault
diagramYesDiagram name, slug, or trailing public_ref.

Output Schema

NameRequiredDescriptionDefault
svgNo
pathNo
planNo
errorNo
widthNo
configNo
heightNo
sourceNo
statusYes
themesNo
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
pro_theme_refusedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / pro_theme_refused
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / themes
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / properties / fallback_reason / enum
      Previous value: -[
      -  "unsupported_diagram_kind",
      -  "node_cap_exceeded"
      -]New value: +[
      +  "unsupported_diagram_kind",
      +  "node_cap_exceeded",
      +  "engine_panic"
      +]
  3. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already cover the read-only/idempotent/non-destructive profile, but the description goes well beyond that: it discloses the auth requirement, the hard capability limit (no publish or save), the side-effect-free nature of edits unless the line9: frontmatter is preserved, and the identity-stamping consequence of dropping that block. This is exactly the kind of mutation-adjacent context annotations cannot express.

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 core action, then layered with the frontmatter warning and capability limits; every sentence carries information relevant to calling it correctly. It is dense but not padded, though the CLI aside is slightly tangential to the call itself.

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 an output schema present, return values need not be explained, and the description still extends it by noting the rendered view and the open_url link. Auth, capability boundaries, and the identity-preservation caveat are all covered, leaving nothing an agent needs in order to call it correctly.

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?

Only one parameter and schema description coverage is 100%, so the schema already documents 'name, slug, or trailing public_ref'. The description repeats 'by name or slug' but adds no format or resolution-order detail beyond the schema — baseline 3.

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?

States a specific verb (fetch) and resource (a published diagram's Mermaid source) with both lookup modes (name or slug) and the rendering behavior. It is clear on its own, but it never names or distinguishes itself from the siblings list_diagrams and render_diagram, and 'show it rendered' arguably overlaps with render_diagram's territory.

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?

Gives real usage context: Line9 sign-in is required, the connector cannot publish or save, and the publish workflow is via the Line9 UI/open_url rather than the CLI. It stops short of routing between sibling tools (when to call this vs render_diagram vs list_diagrams), which keeps it out of the top band.

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