Skip to main content
Glama

Image to SVG Vectorizer API - trace PNG/JPG logos & icons into clean SVG

image_to_svg
Read-onlyIdempotent

Trace raster images (PNG, JPG, WebP) into scalable SVG vector paths using Potrace: monochrome black-and-white (with auto Otsu or custom threshold) or stacked multi-colour vector layers (2 to 16 colours). Runs on our server, files are deleted right after the call, nothing stored. Free: 5 calls/day per IP. Paid: Radar API key (from €15/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.003/call via x402 at https://radarbg.com/x402/image-to-svg.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "mode": "bw",
      "detail": "normal",
      "fileName": "sample.png",
      "fileContent": "iVBORw0KGgoAAAANSUhEUgAAAHgAAABQCAIAAABd+SbeAAAA6klEQVR4nO3cQQ2DABAAwdKgg1cFVQIykIOEyqiIisFDKdsQZv6XXDb3vmFa3jeOd//3AlchdEToiNARoSNCR4SOCB0ROiJ0ROiI0BGhI0JHhI4IHRE6InRE6Mi4Z/jznH+0xmk8Xut3gy46InRE6IjQEaEjQkeEjggdEToidEToiNARoSNCR4SOCB0ROiJ0ROiI0BGhI0JHhI4IHRE6InRE6IjQEaEjQkeEjggdEToidEToiNARoSNCR4SOCB0ZPIFtuOiI0BGhI0JHhI4IHRE6InRE6IjQEaEjQkeEjggdEToidEToiNCRDexBBl0OjJSaAAAAAElFTkSuQmCC"
    },
    "name": "image_to_svg"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNobw (black and white) or color (stacked colour layers)bw
colorNoForeground HEX or CSS colour name when mode=bwblack
filesNoOr several files: [{fileName, fileContent (base64)}] (up to 60 files, 20 MB total)
colorsNoNumber of colour layers when mode=color: 2, 4, 6, 8, 12 or 168
detailNoTracing detail: smooth, normal or finenormal
invertNoTrace light regions instead of dark when mode=bw
fileNameNoFile name with extension, e.g. report.pdf
thresholdNoOptional monochrome cut-off 1-254 (0 = automatic Otsu)
fileContentNoThe file as base64 (a data: URI is fine; 20 MB total decoded limit per call)
whiteBackgroundNoAdd solid white background rectangle when mode=bw

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / fileContent / description
      Previous value: -"The file as base64 (a data: URI is fine)"New value: +"The file as base64 (a data: URI is fine; 20 MB total decoded limit per call)"
    • changedInput schema / properties / files / description
      Previous value: -"Or several files: [{fileName, fileContent (base64)}]"New value: +"Or several files: [{fileName, fileContent (base64)}] (up to 60 files, 20 MB total)"
    • addedInput schema / properties / files / maxItems
      Added value: +60
  2. Added

TDQS

A4.2/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent/openWorld annotations: it discloses server-side processing, that files are deleted immediately and nothing is stored, the free rate limit of 5 calls/day per IP, and both auth paths (X-API-Key or x402 with pricing links). That is exactly the operational context an agent needs before committing a call.

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?

Front-loads the core action and mode choice, then moves to privacy, rate limits and auth. It is dense but every sentence carries information; the two pricing URLs make it slightly heavier than ideal.

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?

All 10 optional parameters are documented in the schema, but there is no output schema and the description never says what comes back - an SVG string, URL, or how batch results across up to 60 files are returned. For a converter with no output schema, that response-shape gap leaves the definition incomplete.

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% and the field descriptions already explain mode, colors, threshold, invert and the files array. The description's mention of auto Otsu and the 2-16 colour range restates schema meaning rather than adding new semantics, so 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 ('Trace raster images (PNG, JPG, WebP) into scalable SVG vector paths using Potrace') plus the two output modes, which is enough to distinguish it from the image-format siblings like ico_to_png and image_to_base64.

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?

Gives clear selection context: monochrome with auto Otsu or custom threshold versus stacked multi-colour layers at 2-16 colours, plus access tiers (free 5/day, API key, x402 per call). It does not name a sibling alternative or state when-not to use it, so it stops short of the top score.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources