Skip to main content
Glama

render_mermaid

Read-only

Render a Mermaid diagram definition and return the image with metadata.

The definition should be valid Mermaid syntax (e.g. flowchart, sequence, class, ER, state, or Gantt diagram).

Returns a list of content blocks: the rendered image plus a JSON text block with metadata including a mermaid.live edit link for opening the diagram in a browser editor.

Args: definition: Mermaid diagram definition text. filename: Output filename without extension. format: Output format — "png" (default), "svg", or "pdf". download_link: If True, return a temporary download URL path (/images/{token}) that expires after 15 minutes; if False, return inline image bytes. Defaults to True (URL) — set DIAGRAMS_INLINE_DEFAULT=true on the server to flip the default. SVG/PDF and PNGs larger than the inline limit always use a download link.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNopng
filenameNodiagram
definitionYes
download_linkNo

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true, but the description adds substantial behavioral detail: it returns a list of content blocks (image + JSON metadata), includes a mermaid.live edit link, explains the download_link parameter's default behavior, the temporary URL expiry (15 minutes), inline image bytes alternative, and the environment variable that flips the default. No contradiction with annotations.

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 description is well-structured with a clear opening summary followed by a detailed Args section, but it is somewhat lengthy. While every sentence adds useful information, the env var configuration detail and the inline limit could be seen as extra; however, they contribute to completeness. It is not overly verbose, but not as tightly concise as the two-sentence get_calls example.

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?

Given four parameters, no output schema, and no nested objects, the description covers everything needed: the return format (content blocks with metadata), parameter defaults and alternatives, and the download_link behavior. It even mentions edge cases (SVG/PDF always use download link). The description is fully adequate for an agent to invoke the tool correctly without further context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description fully compensates by explaining each parameter: definition (diagram text), filename (output filename without extension), format (png/svg/pdf with default), and download_link (boolean, default behavior, and inline vs URL logic). This goes far beyond the schema's property names and types.

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 description clearly states the tool renders a Mermaid diagram definition and returns the image with metadata. It specifies the resource (Mermaid diagram) and the verb (render), and the mention of Mermaid syntax (flowchart, sequence, etc.) distinguishes it from siblings like render_plantuml and render_diagram.

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?

The description clearly indicates the tool is for rendering Mermaid diagrams and lists supported diagram types, implying it is the right choice for Mermaid definitions. It does not explicitly mention alternatives or exclusions, but the context is sufficient for an agent to select it over render_plantuml or render_diagram.

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.

TDQS

A4.6/5.0
Disambiguation5/5

Each tool serves a distinct purpose: browsing (list_providers, list_services, list_nodes, search_nodes), equivalence lookup (find_equivalent, list_categories), and rendering in three different syntaxes (render_diagram, render_mermaid, render_plantuml). No two tools overlap in function, and descriptions clearly differentiate when to use each.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with lowercase snake_case: list_* for browsing, render_* for output generation, find_equivalent, and search_nodes. The pattern is predictable and aids agent understanding.

Tool Count5/5

With 9 tools, the server is well-scoped: 4 browsing tools, 2 equivalence tools, and 3 rendering tools cover the diagram creation workflow without bloat. Each tool earns its place.

Completeness5/5

The tool surface supports the full workflow: discover providers/services/nodes, search for equivalent roles, and render diagrams in Python, Mermaid, or PlantUML. No obvious gaps exist for the stated purpose.