render_mermaid
pdfpeek: Render Mermaid diagram code to an SVG or PNG image. Returns Mermaid diagram code drawn as an SVG or PNG file in an offline sandboxed browser: format svg | png, theme (default, dark, forest, neutral, base), scale 1-4 for PNG (default 2, sharp when zoomed). File base64 in file (output=url ...
This record as markdown: /tools/dev-tanod-tanod/render-mermaid.md
What render_mermaid does on Tanod
AI agents invoke render_mermaid to trigger actions in Tanod. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.
| Parameter | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Mermaid diagram source (flowchart, sequence, class, state, ER, gantt, pie, git graph, mindmap, timeline and the other types of mermaid 11.4.1), 1-20,000 charact |
scale | number | — | PNG pixel density, 1-4 (default 2, sharp when zoomed). Lowered automatically so the longest side stays at 8,000 px. Ignored for svg. |
theme | string | — | Mermaid theme. dark gives a dark background in PNG; the others a white one. |
format | string | — | svg (default, scalable, plain text labels) or png. |
output | string | — | base64 (default): inline. url: stored for 24 hours; link, metadata. |
Parameters from the server's own tool schema.
Why render_mermaid is rated High
render_mermaid triggers real processes with real consequences. An agent gone sideways doesn't fire it once. It starts dozens of builds, sends mass notifications, or burns through compute before anyone looks up.
Risk signalsAccepts freeform code/query input (code)
Attacks that exploit this kind of access
The rule that runs render_mermaid safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Tanod, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For render_mermaid, this is the rule to start with:
render_mermaid stays usable, but rate-capped: a runaway agent can't fire it dozens of times a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Tanod, apply this rule, and every render_mermaid call is checked against it from then on.
Questions about render_mermaid
pdfpeek: Render Mermaid diagram code to an SVG or PNG image. Returns Mermaid diagram code drawn as an SVG or PNG file in an offline sandboxed browser: format svg | png, theme (default, dark, forest, neutral, base), scale 1-4 for PNG (default 2, sharp when zoomed). File base64 in file (output=url gives a 24 h link). A syntax error is a 422 invalid_diagram with the line number; over 8,000 x 8,000 px a 422, a PNG over 8 MB a 413 (none charged). Mermaid 11.4.1, strict security, no network. Typically 1-3 s. Price: USD 0.003. No free tier. It is categorised as a Execute tool in the Tanod MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
render_mermaid accepts 5 parameters: code, scale, theme, format, output. Required: code. The full parameter table on this page comes from the server's own tool schema.
Register the Tanod MCP server in PolicyLayer and add a rule for render_mermaid: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Tanod. Nothing to install.
render_mermaid is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the render_mermaid rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for render_mermaid. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
render_mermaid is provided by the Tanod MCP server (https://tanod.dev/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Tanod, and thousands of servers like it.
Across the catalogue