Behaviour#
What the tool needs and what it does. The server converts nothing itself: it calls the API for you.
| Property | Value |
|---|---|
| Ability | pixels:svg |
| Runs | POST /api/v1/tools/pixels-to-svg, then downloads the result |
| CLI | vukem-tools image to-svg |
| Reads | The files named in the arguments, on the machine the server runs on |
| Writes | output |
Input#
| Argument | Type | Required | Notes |
|---|---|---|---|
input | string | yes | Path of the file to read. |
output | string | yes | Where to write the result: a file path, or a directory for a tool that yields several files. The result is downloaded at once because it expires in minutes. |
options | object | no | How to convert. Every field is optional. |
idempotency_key | string | no | Up to 128 characters. Repeat a call safely: the same key returns the same conversion. |
An argument that is not in the tool's schema is refused with invalid_input.
Options#
| Name | Type | Required | Description |
|---|---|---|---|
options.alpha | string | no | Opacity keeps partial transparency, drop removes it. Default opacity. max length 16 |
options.max_colors | integer | no | Palette cap, 1 to 256. 0 uses the default, -1 means no reduction. min -1; max 256 |
options.mode | string | no | Square, rect or contour. Default rect. max length 16 |
options.scale | integer | no | Multiplies the rendered size. 0 and 1 both mean actual size. min 0; max 64 |
options.simplify | number | no | Contour simplification in pixels, contour mode only. 0 keeps it pixel-exact. min 0; max 16 |
options.tolerance | integer | no | Merge colours closer than this (0 to 255). 0 disables merging. min 0; max 255 |
Output#
A call that works returns isError: false, the result as JSON text in content, and the same result as an object in structuredContent.
| Member | Type | Always present | Notes |
|---|---|---|---|
tool | string | yes | The tool that ran. |
conversion_id | string | yes | The conversion on the server. |
status | string | yes | finished. |
outputs | array of object | yes | One entry for each file written: path, name, mime (when known) and size_bytes. |
bytes_in | integer | no | Bytes uploaded. |
bytes_out | integer | no | Bytes written. |
note | string | no | What the conversion says about itself, when it has something to say. |
expires_at | string | no | When the server deletes its copy of the result. |
Errors#
A failed call is not a protocol error: it returns isError: true and a code the agent can branch on. The ones this tool is likely to meet:
invalid_input: an argument is missing, unknown or out of range, or a file is not readable or is empty. Checked before anything is uploaded.missing_keyandunauthorized:VUKEM_TOOLS_API_KEYis not set, or the server refused it.missing_ability: the key lackspixels:svg.file_too_large,conversion_failed,timeoutandresult_expired: the server could not finish or the result was gone before it was downloaded.rate_limited,network_errorandio_error: a limit, the server could not be reached, or a file could not be read or written.
The full table, with retry and conversion_type, is in What a result looks like.
Safety#
The agent chooses the paths, and the process can read and write anything your user can. The result is written to a temporary file next to output and then renamed, so a failed download leaves no partial file. See What keeps an agent safe.
Example#
Ask the agent
Pixel art to SVG: read
in.pngand writeout.svg.
The call (tools/call)
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"pixels-to-svg","arguments":{"input":"in.png","output":"out.svg","options":{"alpha":"opacity","max_colors":64,"mode":"rect","scale":1,"simplify":0,"tolerance":0}}}}The result (result)
{"jsonrpc":"2.0","id":1,"result":{"content":[{"type":"text","text":"{\"tool\":\"pixels-to-svg\",\"conversion_id\":\"01JQ8Z5X0K7M3N9P2R4T6V8W0Y\",\"status\":\"finished\",\"outputs\":[{\"path\":\"out.svg\",\"name\":\"out.svg\",\"size_bytes\":1234}],\"bytes_in\":1500,\"bytes_out\":1234,\"expires_at\":\"2026-01-02T15:09:05Z\"}"}],"structuredContent":{"tool":"pixels-to-svg","conversion_id":"01JQ8Z5X0K7M3N9P2R4T6V8W0Y","status":"finished","outputs":[{"path":"out.svg","name":"out.svg","size_bytes":1234}],"bytes_in":1500,"bytes_out":1234,"expires_at":"2026-01-02T15:09:05Z"},"isError":false}}The values are illustrative: the names and the output path come from your call, the sizes and the id from the run. The member names are exact.

