Skip to main content
Glama

Image Resize & Convert Tools (Tanod)

render_mermaid

Idempotent

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.

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": {
      "code": "<code>"
    },
    "name": "render_mermaid"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesMermaid 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 characters. Fenced ``` lines are not needed. A syntax error is a 422 with the line number.
scaleNoPNG pixel density, 1-4 (default 2, sharp when zoomed). Lowered automatically so the longest side stays at 8,000 px. Ignored for svg.
themeNoMermaid theme. dark gives a dark background in PNG; the others a white one.default
formatNosvg (default, scalable, plain text labels) or png.svg
outputNobase64 (default): inline. url: stored for 24 hours; link, metadata.base64

Output Schema

NameRequiredDescriptionDefault
fileNo
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
scaleNo
themeNo
widthNo
formatNo
heightNo
operationNo
output_bytesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • removedInput schema / properties / code / title
      Removed value: -"Code"
    • removedInput schema / properties / format / title
      Removed value: -"Format"
    • removedInput schema / properties / output / title
      Removed value: -"Output"
    • removedInput schema / properties / scale / title
      Removed value: -"Scale"
    • removedInput schema / properties / theme / title
      Removed value: -"Theme"
    • removedInput schema / title
      Removed value: -"render_mermaidArguments"
    • removedOutput schema / properties / file / properties
      Removed value: -{
      -  "bytes": {
      -    "description": "Bytes.",
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "content_type": {
      -    "description": "MIME type.",
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "data_base64": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "dpi": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "expires_at": {
      -    "description": "UTC expiry.",
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "first_page": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "height": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "last_page": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "name": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "page": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "pages": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "sha256": {
      -    "description": "SHA-256.",
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "url": {
      -    "description": "Public link.",
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "width": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  }
      -}
  2. Changed6 schema fields changed
    • changedInput schema / properties / output / description
      Previous value: -"base64 (default): the file comes back inline as base64. url: the file is stored for 24 hours and the reply carries a download link (url, expires_at, bytes, content_type, sha256) instead of the base64, which keeps the file out of your context window."New value: +"base64 (default): inline. url: stored for 24 hours; link, metadata."
    • addedOutput schema / properties / file / properties / bytes / description
      Added value: +"Bytes."
    • addedOutput schema / properties / file / properties / content_type / description
      Added value: +"MIME type."
    • addedOutput schema / properties / file / properties / expires_at / description
      Added value: +"UTC expiry."
    • addedOutput schema / properties / file / properties / sha256 / description
      Added value: +"SHA-256."
    • addedOutput schema / properties / file / properties / url / description
      Added value: +"Public link."
  3. Added

TDQS

A4.2/5.0
Behavior5/5

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

The description goes well past the annotations, disclosing failure modes and their codes (422 invalid_diagram with line number, 422 over 8,000x8,000 px, 413 for a PNG over 8 MB), that failures are not charged, latency (1-3 s), engine version, strict security/offline execution, and per-call price with no free tier. The only mild tension is openWorldHint=true against "no network"; the sandbox wording makes it read as a rendering sandbox rather than an actual contradiction.

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?

Dense and front-loaded — purpose first, then format/theme/scale, then error codes, limits, latency and price, with zero filler sentences. It loses a point for repeating enum values and defaults that the schema already states verbatim.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a paid, sandboxed rendering tool with an output schema, the description covers everything an agent needs to call it correctly: input limits, size and format constraints, failure semantics, timing, cost, and link expiry. Nothing material is left to inference.

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 the schema already carries enum values and defaults; the description largely restates them (svg | png, theme list, scale 1-4). It does add a little meaning, notably that scale is auto-lowered to keep the longest side at 8,000 px and that output=url yields a 24-hour link, but most of this is duplicated from the parameter descriptions.

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?

The first sentence gives a specific verb and resource ("Render Mermaid diagram code to an SVG or PNG image") and names the two output formats, which cleanly separates it from sibling renderers such as render_page. An agent knows exactly what it gets back without opening the 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?

Usage is implied rather than stated: it's clear you come here when you have Mermaid source and need an image, and "Fenced ``` lines are not needed" gives one concrete input rule. But there is no explicit when-to-use/when-not-to and no comparison to any other rendering tool in the family.

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.