Skip to main content
Glama

render_svg

Read-only

Renders SVG strings or files to PNG images with resvg, no browser required. Specify width and height to generate visual output for AI coding assistants.

Instructions

Render an SVG string or file as a PNG image using resvg. No browser needed.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "render_svg"
  }
}

Input Schema

NameRequiredDescriptionDefault
svgNoSVG string to render
pathNoAbsolute path to an SVG file to render
widthNoOutput width in pixels (default 800)
heightNoOutput height in pixels (auto-calculated from aspect ratio if omitted)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the non-mutating, local nature is covered. The description adds useful context that rendering is done via resvg with no browser, implying deterministic offline rasterization. However, it says nothing about where the resulting PNG goes (file path, base64, temp dir) or about failure behavior for malformed SVG.

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?

Two short sentences, front-loaded with the action and output format, with the implementation detail last. No wasted wording and nothing buried.

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

Completeness3/5

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

For a renderer with no output schema, the biggest missing piece is the return contract: an agent cannot tell whether the PNG is written to disk, returned inline, or described by a path. The input side is adequately covered by the schema, but the output side is a real gap for a rendering tool.

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 coverage is 100%, so width/height defaults and aspect-ratio behavior are already documented in the schema. The phrase 'SVG string or file' hints that svg and path are alternative input modes, which is a small addition, but no precedence rule is given if both are supplied and the tool has zero required parameters.

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?

States a specific verb and resource ('Render an SVG string or file') plus the output format ('as a PNG image'), which cleanly separates it from render_html, render_pdf, and render_url siblings. Adding 'using resvg. No browser needed.' further tells an agent this is a standalone rasterizer rather than a browser-based sibling.

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 only implied: the agent infers 'use this when the input is SVG' from the resource name. There is no explicit when-to-use versus render_html/render_image guidance, no statement that both svg and path are optional but one is presumably needed, and no note on how the PNG is delivered.

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