Skip to main content
Glama

render_svg

Renders SVG markup to PNG in ComfyUI's input folder and returns the filename for LoadImage nodes, making precise base images for img2img workflows.

Instructions

Render SVG content to PNG and save to ComfyUI's input folder. Returns filename for use in LoadImage nodes. Useful for creating precise base images for img2img workflows.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

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

Input Schema

NameRequiredDescriptionDefault
svgYesSVG content to render (full SVG markup including <svg> tags)
fontsNoFonts to embed in the SVG for rendering
widthNoOutput width in pixels (default: 768)
heightNoOutput height in pixels (default: 768)
filenameNoOutput filename (without extension). Defaults to 'svg_render_<timestamp>'
backgroundNoBackground color (default: transparent). Use hex like '#ffffff' or 'transparent'

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and idempotentHint=false; the description adds the meaningful side effect (writing a file into ComfyUI's input folder) and what comes back (a filename referenceable by LoadImage). It does not state overwrite behavior when a custom filename is supplied, which is the one notable gap for a non-idempotent write.

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?

Three short sentences, front-loaded with the action and destination before the use case. Efficient overall, though the closing 'useful for' sentence is the softest and could be trimmed without loss.

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?

For a 6-parameter tool with full schema coverage and no output schema, the description covers the action, the on-disk effect, and the return value an agent needs to chain into LoadImage. Missing only the overwrite/filename-collision caveat and an explicit pointer that fonts must be fetched via download_font first (the latter is covered by the schema).

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 description coverage is 100%, so every parameter including svg, fonts, width/height, filename and background is already documented in structured form. The description adds no syntax, format, or default guidance beyond the schema, so the baseline 3 applies.

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 SVG content to PNG'), names the destination (ComfyUI's input folder), and clarifies the output artifact (filename for LoadImage nodes). No sibling tool performs rendering, so the agent can route to it unambiguously.

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?

Provides one concrete use case ('creating precise base images for img2img workflows') and a downstream consumer (LoadImage nodes), which implies when to reach for it. However, there are no explicit exclusions or routing rules against alternatives such as get_image or the example-workflow tools, so context is implied rather than stated.

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