Skip to main content
Glama
PavelGuzenfeld

mcp-media-forge

render_d2

Render architecture diagrams from D2 code to SVG or PNG. Supports containers, nested groups, icons, and complex layouts with multiple layout engines.

Instructions

Render a D2 architecture diagram to SVG or PNG. Best for: architecture diagrams with containers, nested groups, icons, and complex layouts. IMPORTANT: D2 syntax is NOT Mermaid. Use '->' for arrows (not '-->'), containers with 'name: { ... }' (not 'subgraph'). Anti-patterns: Mermaid syntax, unbalanced braces, >3 nesting levels. Call get_tool_guide('d2') for examples.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesD2 diagram code. Use '->' for arrows, 'name: { ... }' for containers. NOT Mermaid syntax.
themeNoD2 theme ID: 0=default, 1=neutral-grey, 3=terminal, 100=neutral-default
formatNoOutput format. SVG preferred. PNG is slower (requires Chromium conversion).svg
layoutNoLayout engine. dagre=hierarchical (default), elk=complex layouts with many crossingsdagre
Behavior4/5

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

With no annotations, the description bears full burden. It discloses performance characteristics (PNG slower via Chromium), syntax restrictions (no Mermaid, limited nesting), and error-prone patterns. Missing details on error messages, output size limits, or throttling.

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?

Extremely concise: four sentences front-loading purpose, best-for, syntax, anti-patterns, and guidance. No wasted words; every sentence earns its place.

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 tool with 4 parameters (no output schema), the description is remarkably complete. It covers purpose, syntax, format selection, layout guidance, common mistakes, and points to examples. The agent can use this without confusion.

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

Parameters4/5

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

Schema covers all parameters (100%), so baseline is 3. Description adds value by explaining the ordering of layout engines ('dagre=hierarchical', 'elk=complex') and highlighting PNG speed tradeoff. These enrich the schema's enum 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 description clearly states 'Render a D2 architecture diagram to SVG or PNG' with a specific verb and resource. It distinguishes itself from siblings like render_mermaid by emphasizing D2's unique syntax and suitability for complex architecture diagrams.

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?

Provides clear context: 'Best for: architecture diagrams with containers, nested groups, icons, and complex layouts.' Includes explicit anti-patterns and a reference to get_tool_guide for examples. Could be improved by explicitly stating when not to use (e.g., if the goal is a sequence diagram, use Mermaid).

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/PavelGuzenfeld/mcp-media-forge'

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