Skip to main content
Glama

Render a diagram

diagram_render
Read-onlyIdempotent

SVG and PNG links to a version, not the image, with its size, date, hashes and engine version. A published diagram's links, and a version link's, last until the link is revoked, or the diagram made private or deleted (then NOT_FOUND); url is its page. Others last 7 days. A version link needs no sign-in and works from any workspace; a share link gives no title. preview adds a PNG. Artifacts, slides and PDFs need the png file itself. scene or mermaid instead of id previews an unsaved diagram.

Input Schema

NameRequiredDescriptionDefault
idNoDiagram id or key, or a version link: https://zindex.ai/d/<ref>@<n>, <ref>@<n> or <ref>
asOfNo2026-06-30 (end of day, UTC) or ISO 8601 with an offset
sceneNohttps://zindex.ai/schemas/scene.schema.json
mermaidNoerDiagram or flowchart (graph); drops subgraphs, edges to them and styles
previewNo
revisionNoOmit for the latest
knownRevisionNoAnswers only { id, revision, unchanged } if it's the version to render

Output Schema

NameRequiredDescriptionDefault
idNo
pngNo
svgNo
urlNo
hashNo
chainNo
titleNo
widthNo
engineNo
heightNo
latestNo
expiresNo
savedAtNo
revisionNo
unchangedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • changedInput schema / properties / id / description
      Previous value: -"Diagram id or key"New value: +"Diagram id or key, or a version link: https://zindex.ai/d/<ref>@<n>, <ref>@<n> or <ref>"
    • addedInput schema / properties / knownRevision
      Added value: +{
      +  "description": "Answers only { id, revision, unchanged } if it's the version to render",
      +  "maximum": 9007199254740991,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / height
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / latest
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / savedAt
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / title
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / unchanged
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / width
      Added value: +{
      +  "type": "number"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / id / description
      Previous value: -"The diagram's id or key"New value: +"Diagram id or key"
  3. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: link expiry rules (7 days vs until revoked/private/deleted), NOT_FOUND behavior, no sign-in for version links, share links omit title, and preview adds a PNG. Annotations only establish read-only/idempotent safety, so this extra operational context is valuable.

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?

The description is dense but front-loaded and has no filler; the key output and link behavior come first. However, telegraphic fragments such as 'url is its page' and 'Others last 7 days' reduce clarity.

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?

With an output schema and annotations present, it covers the key operational context: link lifetime, auth, error behavior, preview, and unsaved diagrams. A few short phrases remain ambiguous, but the definition is sufficient for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is high at 86%, so the baseline is 3, but the description adds meaningful semantics for preview, scene/mermaid vs id, and version-link ids. It leaves asOf, revision, and knownRevision to the schema, which is acceptable given the coverage.

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 that it returns SVG/PNG links for a diagram version rather than image bytes, including size, date, hashes, and engine version. It distinguishes version, published, and share link behavior, though the description itself never uses the verb 'render' and only indirectly contrasts with sibling tools.

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 concrete selection guidance: use scene or mermaid instead of id to preview an unsaved diagram, add preview for a PNG, and note that artifacts, slides, and PDFs need the PNG file itself. It also explains link lifetimes and auth differences, but does not name sibling tools or state explicit when-not-to-use conditions.

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