trace_to_svg
Convert a raster image to SVG vector format using potrace tracing. Ideal for line art, diagrams, and high-contrast images.
Instructions
Convert a raster image to SVG using potrace vectorization. Best for line art, diagrams, logos, and high-contrast images. The image must already exist in /root/Pictures/pixel-surgeon (use save_image to import first).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"filename": "<filename>"
},
"name": "trace_to_svg"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | Filename of the source image in /root/Pictures/pixel-surgeon | |
| threshold | No | Brightness threshold for black/white conversion (0-255). Lower = more black. -1 = auto-detect. Default: auto. | |
| invert | No | Invert the image before tracing (useful for light-on-dark images) | |
| turdsize | No | Suppress speckles up to this size (in pixels). Default: 2. |