Skip to main content
Glama

render_svg

Renders SVG source code to high-quality PNG or SVG. Automatically selects the best backend for filter effects like glow and blur.

Instructions

Render SVG source to high-quality PNG or SVG. Dual backend: resvg (92% filter fidelity, in-process, lightweight) or Chrome (100% filter fidelity, needs system Chrome/Edge). AUTO-selects: if SVG contains // AND Chrome is available → Chrome; else resvg. Use this for '酷炫/霓虹/科技感' graphics with glow/blur/depth that D2 cannot produce — write the SVG (with feGaussianBlur, radial gradients, etc.) and this tool renders it. No AI.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
svgYesSVG source code (XML string starting with <svg). Can include feGaussianBlur, feMerge, gradients, patterns — all SVG filter primitives supported.
nameNoOutput filename (without extension)
scaleNoRetina scale factor for Chrome backend (default 2; only affects Chrome renders)
widthNoTarget pixel width for PNG (default: auto-detect from SVG viewBox/width)
formatNoOutput format (png = rasterized; svg = pass-through)png
outDirNoOutput directory, default session-dir/output
backendNoRendering backend: 'auto' = detect filters + Chrome availability; 'resvg' = force lightweight (92%); 'chrome' = force Chrome (100%, needs Chrome installed)auto
Behavior4/5

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

With no annotations, description fully covers backend behavior, filter fidelity percentages, auto-selection logic, and non-AI nature. Lacks info on side effects or rate limits, but for a render tool this is adequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Concise with purposeful front-loading (purpose, backends, use case). A few Chinese phrases add color but do not harm clarity. Every sentence adds 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?

Covers all 7 parameters with schema and description. No output schema, but description does not explain return value (likely file path). Otherwise complete for complexity level.

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 coverage is 100%, but description adds valuable context: explains backend options, auto-selection triggers, scale relevance only to Chrome, and format behavior. Exceeds baseline.

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?

Description clearly states it renders SVG to PNG or SVG, explains dual backend, and distinguishes from siblings by targeting effect-heavy graphics that D2 cannot produce. Verb and resource are specific.

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?

Explicitly tells when to use (for glowing/blur effects beyond D2's capabilities) and mentions 'No AI'. Does not provide explicit when-not-to-use or direct comparison to sibling tools, but context is clear.

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/wangdong233/media-gen-mcp'

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