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.

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 today (used before credits).

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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."
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare readOnlyHint=false and destructiveHint=false, and the description adds substantial context beyond them: 1-credit cost across formats, mode=test free/watermarked, mode=preview free PNG whose link later buys vectors, per-format download links valid 24 hours or retention_days, and inline SVG when small. This is exactly the billing/retention/watermark behavior structured fields cannot convey.

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 primary purpose, then input-selection rules, then return/cost behavior, with no filler sentences. It is dense and runs long, but the length is justified by a 43-parameter tool; splitting into clearer paragraphs would help slightly.

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 properties, 17 enums, nested objects, and an output schema, the description covers the genuinely ambiguous parts: which input channel to use, sibling routing, cost/mode semantics, and retention. Return values are already covered by the output schema, so 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%, so baseline is 3, but the description adds real meaning beyond the schema: the image input must be passed in 'exactly one way' among image, upload_id, or image_base64 (≤2 MB, only exact bytes already in hand) — a mutual-exclusivity constraint absent from the schema. It adds this constraint without duplicating the 43 documented parameters, so it earns above 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?

States a specific verb and resource (convert raster image into vector), enumerates accepted input formats (PNG, JPEG, WebP, BMP, GIF, TIFF) and output formats (SVG, PDF, EPS, DXF, PNG), and explicitly contrasts with sibling open_editor. An agent can distinguish it from siblings 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?

Explicit when-to-use ('Use this when the user wants to convert...'), when-not ('Do not use for generating new images, editing photos or upscaling'), and a named alternative with its triggering condition (fall back to open_editor when no image input is available). Nothing is left to inference.

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