Skip to main content
Glama

Vectorize image

vectorize

Use this when the user wants to convert a raster image (logo, icon, illustration, scan, screenshot; PNG, JPEG, WebP, BMP, GIF, TIFF) into a vector: SVG, PDF, EPS, DXF or a re-rendered PNG. Pass the image in exactly one way: image (a file attached to the chat message, ChatGPT), upload_id (from create_upload) or image_base64 (≤2 MB, only exact file bytes you already have as text). If none of these is available, for example an image attached in Claude.ai, call open_editor instead. Returns a download link per format, valid 24 hours (or retention_days), and the SVG inline when small. Uses 1 credit for all formats; mode=test is free and watermarked; mode=preview is a free PNG up to 1 MP whose link buys the vectors later (format=svg, 1 credit). Do not use for generating new images, editing photos or upscaling.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "vectorize"
  }
}

Input Schema

NameRequiredDescriptionDefault
dpiNoPixels per inch of PNG output; needs a size in pt, mm, cm or in. Default 300.
drawNofill: filled shapes; stroke: outline of every shape; stroke_edges: only the borders between shapes, each once (no double cuts). Default from the preset.
modeNotest: free, watermarked result for building an integration. preview: free PNG up to 1 MP without watermark, no vectors; fetch its link with format=svg to buy the vectors for 1 credit. Neither is available for vectorize_url. Default live.
unitNoUnit for width/height: px (default), pt, mm, cm, in.
imageNoImage file attached to the user's message in the chat (ChatGPT).
scaleNoOutput size as a multiple of the source size. Not with width/height.
widthNoPhysical output width in unit. With width only, the height follows the aspect ratio; with height too, a sheet of that size (see aspect). Up to 10 m.
aspectNoWith both width and height: fit (default, whole drawing inside), fill (covers the sheet, excess cropped), stretch (exact size, distorted).
colorsNoNumber of colors: 'auto', 'unlimited', or an integer 2–32 (max_colors goes up to 256). Default auto.
curvesNoall: curves and lines; lines: straight segments only; lines_arcs: DXF lines and arcs, other formats as lines.
detailNoOutput detail for photos. Default auto.
formatNoOutput formats; several formats cost 1 credit together. Default: the preset's format (svg for web).
heightNoPhysical output height in unit (width follows the aspect ratio unless width is set too).
layersNoShapes stacked on top of each other, cut out of each other, or cut out and grouped by color. Default from the preset.
presetNoSettings for the job: web (default), print (PDF, shapes cut out), cut (vinyl/stickers, 8 colors), laser (2-color outlines), embroidery (12 colors, no tiny shapes).
align_xNoHorizontal placement on the sheet, 0 left … 1 right (default 0.5). Needs width and height; not with aspect=stretch.
align_yNoVertical placement on the sheet, 0 top … 1 bottom (default 0.5). Needs width and height; not with aspect=stretch.
cornersNoKeep corners sharp or round them.
denoiseNoNoise reduction before tracing: 0 off … 3 strongest.
paletteNoFixed colors #rrggbb (2–256), as a list or a comma-separated string. Not combined with colors or max_colors.
qualityNoInput quality: low for blurry/noisy/JPEG-heavy images. Default auto.
group_byNoGroups in the output: color (one per color) or layer (by nesting depth). SVG <g>, PDF layers, EPS blocks, DXF layers. Default: by color only for layers=cutouts_grouped (DXF always by color).
min_areaNoSmallest shape kept, in px²; smaller specks are dropped. Overrides the preset.
upload_idNoID returned by create_upload after the file was uploaded.
dxf_curvesNoDXF curves as lines (polylines, default), arcs or splines. curves=lines/lines_arcs wins.
gap_fillerNoon: an underlay in the shape colors hides light gaps between shapes. Needs draw=fill. Default off.
image_typeNoKind of image: artwork with smooth (anti-aliased) edges, artwork with hard pixel edges, or photo. Default auto.
max_colorsNoMaximum number of colors (2–256). Not combined with colors or palette.
max_pixelsNoDownscale the input to at most this many pixels before tracing (faster, fewer nodes).
smoothnessNoContour smoothing 1–10 (higher: smoother, fewer nodes).
svg_versionNoSVG flavor: 1.1 (default), 1.0, or tiny1.2 (no opacity or gradient transforms).
adobe_compatNotrue: SVG friendly to Adobe Illustrator (size always set, stroke widths in drawing coordinates).
image_base64NoExact PNG/JPEG/WebP/BMP/GIF/TIFF file bytes in base64 (≤2 MB), only when you already have them as text (e.g. from reading the file in a terminal). Never transcribe an image you only see in the conversation; call open_editor instead. Use create_upload for larger files.
stroke_colorNoStroke color #rrggbb instead of the shape color; needs draw=stroke or stroke_edges.
stroke_widthNoStroke width; needs draw=stroke or stroke_edges. Output units, or source pixels with stroke_scaling=scale. Default: hairline.
transparencyNoTransparent areas: keep (stay transparent), white, or a background color #rrggbb.
png_antialiasNoAnti-aliasing in PNG output. Default on.
retention_daysNoKeep the result downloadable for this many days (default 24 hours). Live mode only.
stroke_scalingNofixed (default): width stays in output units when resized; scale: width in source pixels scales with the drawing.
svg_fixed_sizeNotrue (default): width/height on the root <svg>; false: only a viewBox (responsive).
curve_toleranceNoCurve fitting tolerance in source pixels (default ≈0.5): lower keeps more nodes. Also sets smoothness unless given.
gap_filler_widthNoGap filler width in source pixels (default 1). Needs gap_filler=on.
palette_toleranceNoWith palette: how far (CIE76 ΔE) an image color may be from a palette color to snap to it; farther colors keep their own value.

Output Schema

NameRequiredDescriptionDefault
modeNo
filesYesDownload link per format.
widthYes
heightYes
result_idNo
svg_bytesNo
expires_atNo
download_urlNoLink to the first requested format.
credits_chargedNo
credits_remainingYes
free_remaining_todayNoFree MCP vectorizations left this calendar month, UTC (used before credits). The name is kept for compatibility.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / free_remaining_today / description
      Previous value: -"Free MCP vectorizations left today (used before credits)."New value: +"Free MCP vectorizations left this calendar month, UTC (used before credits). The name is kept for compatibility."
  2. Changed1 schema field changed
    • changedInput schema / properties / image_base64 / description
      Previous value: -"PNG/JPEG/WebP/BMP/GIF/TIFF bytes in base64 (≤2 MB). Use create_upload for larger files."New value: +"Exact PNG/JPEG/WebP/BMP/GIF/TIFF file bytes in base64 (≤2 MB), only when you already have them as text (e.g. from reading the file in a terminal). Never transcribe an image you only see in the conversation; call open_editor instead. Use create_upload for larger files."
  3. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Adds substantial behavior beyond the annotations: credit cost (1 credit for all formats combined), that mode=test is free and watermarked, that mode=preview is a free PNG up to 1 MP whose link buys the vectors later, and that download links last 24 hours or retention_days with SVG inlined when small. The annotations (readOnlyHint=false, openWorldHint=true) already flag a non-idempotent external operation, so this extra cost/lifetime disclosure is the right kind of value; it stops just short of discussing failure modes or credit refunds.

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 trigger condition and keeps everything relevant, which is proportionate for a 43-parameter tool. It is a single dense block with nested parenthetical lists (input formats, output formats) that would scan faster as short clauses, but no sentence is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 43 parameters, a 100% documented schema, and an output schema, the description supplies the only things structured fields cannot: which input channel to use, cost model, mode trade-offs, link lifetime, and an escape hatch to open_editor. Nothing an agent needs to call this correctly is missing.

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% across 43 parameters, so the baseline is 3, but the description still adds real meaning: exactly one of image / upload_id / image_base64 must be passed, image_base64 is capped at 2 MB and only valid for bytes already held as text, and mode test/preview are unavailable for vectorize_url. That mutual-exclusivity and source-validity guidance is not derivable from the schema alone.

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 (convert a raster image into a vector) and enumerates both accepted inputs (PNG, JPEG, WebP, BMP, GIF, TIFF) and outputs (SVG, PDF, EPS, DXF, re-rendered PNG). An agent can distinguish it from create_upload and open_editor without opening any schema.

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?

Gives explicit when-to-use, when-not-to-use ('Do not use for generating new images, editing photos or upscaling'), and a concrete alternative route: when no image input is available, e.g. an image attached in Claude.ai, call open_editor instead. It also routes larger files to create_upload, covering the main sibling decision points.

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