Skip to main content
Glama

Render a drawspec document to SVG, PNG or text

render

Convert a drawspec JSON document to SVG, PNG, or plain text for inline Markdown, chat, slides, or terminals, returning located violations when validation fails.

Instructions

Draw the document and return the SVG. The output is safe to paste inline into a Markdown page: no global styles, no colliding ids, and no meaning carried by colour alone. With format png it returns a PNG image instead, for a chat, a slide or an attachment (needs the server's drawspec[png] extra); with format text, the diagram as plain text, for the kinds that have a text form. Refuses with located violations exactly as validate does.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scaleNopng only: pixels per SVG unit (default 2).
themeNoA bundled theme name or a path to a theme file. Omit for the default.
widthNoOverride the document's width. With format `text`, the most terminal cells a line may take (default 80, or 100 for `lanes` and `sequence`).
formatNosvg (default), png, or text: the diagram as plain text for a code block or a terminal, for the kinds files, tree, sequence, gantt, timeline, board, stack, rag, meter, flow, states, lanes.
heightNoOverride the document's height.
charsetNotext only: box-drawing characters, or ASCII only (default unicode).
documentYesA drawspec document, as JSON. The full field list is published at https://nuncaeslupus.github.io/drawspec/schema/drawspec-v1.schema.json, and `kinds` names the 36 values `kind` may take.
backgroundNopng only: the page the drawing is on (default light).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the inline-paste safety properties (no global styles, no colliding ids, no colour-only meaning), the optional `drawspec[png]` server extra required for PNG, and the failure mode (refuses with located violations like validate). It stops short of stating idempotence/read-only nature or any cost/size limits on large renders.

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?

Front-loads the default behavior ('return the SVG') and the safety guarantee before covering the png/text variants and error behavior. Every clause earns its place; the png parenthetical is dense but necessary information, not padding.

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?

For an 8-parameter tool with a nested `document` object, no output schema and no annotations, the description covers output formats, the external schema URL for the document shape, safety characteristics, and error behavior. It leaves the actual return payload structure (what the SVG response object looks like) unstated, which is the main remaining gap.

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 every parameter including scale, theme, width, height, charset, background and format is already documented in the schema. The description only reinforces the format branches and the png extra requirement, adding no syntax or format detail beyond structured fields, which matches the baseline 3.

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

Purpose5/5

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

States a specific verb and resource ('Draw the document and return the SVG') and immediately enumerates the three output modes with their formats. It also positions itself against a sibling by noting it refuses with violations 'exactly as `validate` does', so an agent can tell render apart from validate/kinds without opening schemas.

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 clear context for each format branch: png 'for a chat, a slide or an attachment', text 'for a code block or a terminal'. However it never explicitly says when to call this instead of validate (e.g. 'call validate first if you want errors without output'), so the routing against the primary sibling is only implied.

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

Deploy Server

Other Tools