Skip to main content
Glama

Render diagram

render_diagram

Renders Mermaid or Graphviz DOT diagrams into self-contained HTML pages with raw source files, returning absolute output paths.

Instructions

Write a self-contained, shareable HTML page (renders via CDN: Mermaid, or Viz for Graphviz DOT) plus the raw source file (.mermaid or .dot). Returns the absolute paths written.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoNotation of `source` (default 'mermaid')
sourceYesDiagram source to render (Mermaid, or DOT when format is 'dot')
outPathYesOutput path (with or without extension); .html and the raw source siblings are written
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that the HTML uses CDN (Mermaid or Viz), that it writes a raw source sibling, and that it returns absolute paths. This covers file-writing side effects and dependency on internet/CDN, which is valuable. It stops short of mentioning error handling or directory creation, but the key behavioral traits are disclosed.

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?

The description is a single, compact sentence with important information front-loaded ('Write a self-contained, shareable HTML page'). It avoids redundancy with the schema and earns its place by clarifying output artifacts and return value.

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 tool with 3 parameters, no annotations, and no output schema, the description covers the core purpose, output files, and return format. It does not explicitly differentiate from sibling tools or describe error behavior, but for its complexity it is sufficiently complete to guide an agent.

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 baseline of 3 applies. The description adds no extra parameter details beyond the schema; it repeats the raw source and path output. However, it reinforces the relationship between format and source, but does not compensate beyond what schema already provides.

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 writes a self-contained HTML page and a raw source file. It uses the specific verb 'Write' and identifies the resources (HTML, .mermaid/.dot), which distinguishes it from sibling tools like generate_diagram that likely create diagram source rather than rendering it to shareable HTML.

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?

The description implies usage: when you have Mermaid/DOT source and want a shareable HTML page. However, it does not explicitly state when to use this tool versus alternatives like generate_diagram, nor does it provide exclusions or prerequisites. The context is present but not overtly comparative.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/builditwithgk/repo-cartographer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server