Skip to main content
Glama

Render SVG to image

render_svg

Rasterize an SVG into a PNG to visually verify layout, alignment, overflow, and colors before shipping.

Instructions

Rasterize an SVG to a PNG and return it INLINE as an image so you can actually SEE the result. Use it right after writing or editing any SVG — a diagram, UI mockup, chart, icon, logo, or badge — to visually verify layout, alignment, overflow, and colors before shipping. Accepts inline markup (svg) or a file (path), and can also save the PNG to disk (outPath).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
svgNoInline SVG markup. Provide this OR `path`.
pathNoPath to a .svg file. Provide this OR `svg`.
scaleNoZoom multiplier for the raster (default 1; use 2 for crisp/retina output).
backgroundNoBackground behind the SVG, e.g. '#ffffff' or 'white'. Default: transparent.
outPathNoIf set, also write the rendered PNG to this file path.
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses the core behavior (rasterization to PNG, inline return), ability to save to disk via outPath, and accepts either inline markup or file path. However, it does not mention error handling, validation, or side effects like file system access for outPath. Still, it is sufficiently transparent for a rendering tool.

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 two sentences with no unnecessary words. It front-loads the core action and then provides usage guidance and parameter summary. Every sentence earns its place.

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 no output schema, the description explains the return format (PNG inline) and covers all main parameters. It doesn't explicitly handle mutual exclusivity of svg and path in the description (only in schema), which is a minor gap. Overall, it is reasonably complete for a tool with 5 optional parameters.

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 description coverage is 100%, so baseline is 3. The description adds context by explaining that 'svg' and 'path' are mutually exclusive, scale is a 'zoom multiplier', background is a background color, and outPath saves to disk. This adds value beyond the schema, justifying a 4.

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 rasterizes SVG to PNG and returns it inline. It specifies the verb ('rasterize') and resource ('SVG to PNG'), and provides concrete use cases like diagram, UI mockup, etc. No sibling tools exist, so no differentiation needed.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly tells when to use the tool: 'right after writing or editing any SVG' to visually verify layout, alignment, overflow, and colors. This provides clear contextual guidance without needing exclusions or alternatives.

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/ope-olatunji/mcp-svg-render'

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