Skip to main content
Glama

render_diagram

Convert Markdown diagrams into visual formats like SVG, PNG, or PDF. Extract diagrams from files or text and render them with customizable themes and styles.

Instructions

Render the first diagram found in a Markdown file or raw text.

Args: file_path: Path to a .md file containing a diagram block. raw_markdown: Raw markdown string with a diagram code block. output_format: "svg" (default), "png", "jpeg", or "pdf". theme: "light" (default) or "dark". look: "default" or "handDrawn" (Mermaid sketch mode). scale: Resolution multiplier for PNG/JPEG (default 2).

Returns: Dict with diagram_type, output_format, and base64-encoded output.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathNo
raw_markdownNo
output_formatNosvg
themeNolight
lookNodefault
scaleNo
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: it renders only the first diagram found (not all), supports multiple input sources (file or raw text), and returns a specific dictionary structure. However, it doesn't mention error handling, performance characteristics, or authentication requirements.

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 perfectly structured and front-loaded with the core purpose first, followed by organized parameter details and return information. Every sentence earns its place with no wasted words, making it easy for an AI agent to parse and understand.

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?

Given the tool's moderate complexity (6 parameters, no annotations, no output schema), the description provides excellent coverage of inputs and basic behavior. However, without an output schema, it could benefit from more detail about the return dictionary structure beyond just listing the keys. The description adequately covers the core functionality but leaves some implementation details unspecified.

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?

With 0% schema description coverage, the description fully compensates by providing clear semantic information for all 6 parameters. It explains what each parameter does, their default values, and valid options (e.g., output_format can be 'svg', 'png', 'jpeg', or 'pdf'), going well beyond what the bare schema 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's purpose with specific verbs ('Render the first diagram found') and resources ('Markdown file or raw text'), distinguishing it from sibling tools like 'list_diagrams' (which lists diagrams) and 'render_all_diagrams' (which renders all diagrams rather than just the first).

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 provides clear context about when to use this tool (to render the first diagram from a Markdown source), but it doesn't explicitly state when NOT to use it or mention alternatives like using 'render_all_diagrams' for multiple diagrams. The sibling tool names provide some implicit guidance.

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/rutika196/vizdown-mcp'

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