Skip to main content
Glama

Diagram Render

diagram_render
Read-only

Render a saved diagram by ID to produce an image or file in SVG, PNG, JPEG, or PDF, using optional source and format overrides.

Instructions

Diagram Render. Render a previously saved diagram by ID. Public, no API key required. Supports ?format= and ?query= overrides.

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": {
      "id": "<id>"
    },
    "name": "diagram_render"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe diagram ID returned in the X-Diagram-Render-URL header when saving a diagram. Format: cq-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
queryNoOverride the diagram source code (URL-encoded).
shareNoSet share=true to persist the config and receive JSON instead of an image: { id, render_url, view_url, embed_url, expires_in }. Free plan: 3-day expiry with watermark. Paid plan: 6-month expiry, no branding. Default: false.
fieldsNoComma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
formatNoOverride output format. Allowed values: svg, png, jpeg, pdf. Default: "svg".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true, and destructiveHint=false, so the safety profile is covered. The description adds genuinely useful context beyond that: the endpoint is public with no API key required, and it accepts format/query overrides. It stops short of describing the actual return payload (image bytes), which is left to the schema.

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 operative content is two tight sentences with no filler beyond the redundant title line, and the key capability is front-loaded. Removing the 'Diagram Render.' echo would make it optimal, but the size is appropriate for the tool.

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?

With no output schema, the description should clarify what the tool returns (rendered image bytes by default, JSON when share=true), which the schema's share parameter hints at but the description omits. Given the rich 100% schema coverage and annotations, it is adequate to invoke correctly, but not complete about outcomes.

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%, with every parameter including id, query, share, fields, and format richly documented in the schema itself. The description's mention of ?format= and ?query= overrides merely restates two schema parameters without adding syntax, defaults, or edge-case meaning. Baseline 3 is appropriate when the schema carries this much detail.

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 second sentence gives a concrete verb+resource combination: 'Render a previously saved diagram by ID,' which is clear and actionable. However, it never distinguishes this from the closely named sibling diagram_view (or diagram_ai), leaving the agent to infer the render-vs-view boundary. The leading 'Diagram Render.' merely restates the title and adds no informational value.

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?

Usage is implied by 'a previously saved diagram' (i.e., the diagram must already exist, created via diagram/diagram_ai), but that prerequisite is never stated explicitly. There is no guidance on when to choose diagram_render over diagram_view or chart_render, so the agent must infer the distinction from sibling names alone.

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