Skip to main content
Glama

Download Diagram

download_diagram
Read-onlyIdempotent

Export rendered diagrams as source, SVG, PNG, PDF, or standalone HTML by supplying diagram type and code, then repeat the SHA-256 digest to fetch remaining chunks.

Instructions

Download source, SVG, PNG, PDF or HTML chunks. Repeat sha256 on follow-ups.

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_type": "<diagram_type>",
      "code": "<code>"
    },
    "name": "download_diagram"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesSource text to export or render.
themeNoSelected diagram theme; omit to preserve source styling.
offsetNoBase64 character offset, starting at zero then next_offset.
sha256NoDigest from the first chunk; repeat on subsequent calls.
diagram_typeYesCatalog key of the diagram renderer.
output_formatNosource, svg, png, pdf or html; HTML is standalone.svg

Output Schema

NameRequiredDescriptionDefault
chunkYes
totalYes
offsetYes
sha256Yes
filenameYes
mime_typeYes
next_offsetYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.4.0

TDQS

C2.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so safety is covered. The description adds one genuine behavioral fact beyond that: output is delivered in chunks and the sha256 digest must be echoed on follow-up calls. However, it omits the offset/next_offset progression and when retrieval is complete.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences with no padding and the format list front-loaded, which is good. But the terseness crosses into ambiguity — 'chunks' and 'follow-ups' are undefined — so brevity costs clarity rather than earning it fully.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained, and annotations cover the safety profile. Still, for a six-parameter chunked-export tool the description never explains how offset/next_offset drives the loop or when to stop, leaving a real gap in the retrieval workflow.

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 description coverage is 100%, so each of the six parameters is already documented in the schema. The description reinforces output_format choices and the sha256 repeat rule but adds no syntax or semantics beyond what the schema states, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The verb 'Download' plus the enumerated formats (source, SVG, PNG, PDF, HTML) gives a rough idea of the output, but the tool actually renders/exports supplied diagram code, and the term 'chunks' is left unexplained. It does not distinguish itself from siblings like generate_uml_image or rerender_diagram, which plausibly also produce rendered images.

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

Usage Guidelines2/5

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

There is no statement of when to pick this tool over rerender_diagram, generate_uml_image or generate_uml_batch. The only usage hint is 'Repeat sha256 on follow-ups', which addresses the chunked-retrieval loop but not tool selection.

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