Skip to main content
Glama

convert_image_to_svg

Read-onlyIdempotent

Convert raster images (PNG, JPG, WEBP) into SVG vector format with adjustable tracing parameters for control over fidelity and complexity.

Instructions

Convert a raster image (PNG, JPG, or WEBP) to SVG vector format.

Accepts either base64-encoded image data or a URL. Returns the SVG content as a string. Adjust tracing parameters to control the fidelity and complexity of the output.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
image_base64NoBase64-encoded image data (PNG, JPG, or WEBP). Provide this OR image_url, not both.
image_urlNoURL to fetch the image from (PNG, JPG, or WEBP). Provide this OR image_base64, not both.
colormodeNoColor mode: 'color' for full color, 'binary' for black/white line artcolor
modeNoTracing mode: 'spline' (smooth curves), 'polygon' (straight edges), or 'none' (pixel-perfect)spline
filter_speckleNoRemove speckles of this many pixels or fewer. Higher = cleaner but loses small details. Default 4.
color_precisionNoNumber of significant bits for color quantization. Lower = fewer colors, simpler SVG. Default 6.
layer_differenceNoColor difference threshold for merging layers. Higher = fewer layers, simpler SVG. Default 16.
corner_thresholdNoAngle threshold in degrees for detecting corners. Default 60.
length_thresholdNoMinimum path segment length. Default 4.0.
splice_thresholdNoAngle threshold for splicing splines. Default 45.
path_precisionNoDecimal precision for SVG path coordinates. Lower = smaller file size. Default 8.
hierarchicalNoLayer arrangement: 'stacked' (overlapping) or 'cutout' (non-overlapping)stacked
max_iterationsNoMaximum curve fitting iterations. Higher = more accurate but slower. Default 10.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

The description adds context on what the tool does (converts images, returns SVG string) and mentions adjustable parameters. Annotations already indicate readOnlyHint=true, destructiveHint=false, idempotentHint=true. The description does not contradict annotations and provides additional but not extensive behavioral details.

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 concise (two paragraphs) and front-loaded with the essential purpose. Each sentence is purposeful, with no wasted words. The structure effectively communicates key information.

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?

Considering the tool's complexity (13 parameters, all well-documented in schema, and an output schema exists), the description covers the core conversion process and parameter adjustability. It doesn't detail output format specifics, but the output schema addresses that. The description is sufficiently complete for agent usage.

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%, with each parameter described in the schema. The description mentions 'adjust tracing parameters to control fidelity and complexity' but does not elaborate on individual parameters. Given high coverage, the description adds minimal extra meaning, so baseline 3 is appropriate.

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 converts raster images (PNG, JPG, WEBP) to SVG vector format, specifies input methods (base64 or URL), and notes adjustable tracing parameters. It is specific and distinguishes the tool's purpose from any siblings (none listed).

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?

The description provides clear context on when to use: for converting raster images to SVG, with inputs via base64 or URL. While it doesn't explicitly exclude alternatives, no sibling tools exist, so the guidance is sufficient.

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/botmonster/image2svg-mcp'

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