Skip to main content
Glama
jakobautomation

agentsvc-mcp

diagram_render

Render Mermaid code into SVG or PNG diagrams like flowcharts, sequence, class, ER, gantt, pie, and mindmap. Invalid syntax returns the parse error so agents can fix and retry.

Instructions

Diagram Rendering (Mermaid) — Render Mermaid diagram code to SVG and/or PNG: flowchart, sequence, class, state, ER, gantt, pie, mindmap, timeline and more. Invalid syntax returns HTTP 400 with the Mermaid parse error (not charged), so an agent can fix and retry. Params: code (Mermaid source, required), format (svg default, png or both), theme (default, dark, neutral, forest, base), width (200 to 4000, default 1200), background. Cost: $0.01 USDC per call. Latency p99: 6000ms.

Input Schema

NameRequiredDescriptionDefault
codeYesMermaid diagram source
themeNodefault
widthNo
formatNosvg
backgroundNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full disclosure burden and does well: it states the failure mode (HTTP 400 + Mermaid parse error), that failed calls are not charged, the cost ($0.01 USDC/call), and p99 latency (6000ms). What it omits — return payload shape, whether results expire or are hosted — keeps it short of a 5.

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-loaded with purpose in the first clause, then errors, params, and operational facts in terse colon-delimited fragments. No sentence is wasted and nothing redundant is included.

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 a no-annotation, no-output-schema render tool, this covers the essentials an agent needs: supported input language, error semantics, cost, latency, and all meaningful parameters. The only real gap is the undocumented 'background' parameter and unspecified return/URL handling.

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 description coverage is only 20%, so the description must compensate, and it largely does: code (required), format (svg default, png or both), theme (five named options), width (200–4000, default 1200) are all restated with meaning. Only 'background' is left unexplained in both schema and description, holding it back from a 5.

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+resource ('Render Mermaid diagram code to SVG and/or PNG') immediately, and enumerates the concrete diagram types supported (flowchart, sequence, class, state, ER, gantt, pie, mindmap, timeline). This clearly distinguishes it from near-siblings like chart_render and html_to_pdf without the reader opening any schema.

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?

It gives useful operative guidance — invalid syntax returns HTTP 400 with the parse error and is not charged, so an agent can fix and retry — which shapes retry behavior. However, it never states when to choose this over chart_render or doc_convert, so the sibling routing is implied rather than explicit.

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