Optimize an SVG
optimize_svgMinify an SVG with SVGO. Send markup or a file as base64 or a public URL. Private addresses are refused and the file is capped at 10 MB. The viewBox is kept unless removeViewBox is true. Returns the optimized markup and the byte counts.
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": "optimize_svg"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| svg | No | SVG markup. Provide svg or file. | |
| file | No | An SVG file. Provide svg or file. | |
| precision | No | ||
| removeViewBox | No | ||
| removeDimensions | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| svg | Yes | ||
| afterBytes | Yes | ||
| savedBytes | Yes | ||
| beforeBytes | Yes | ||
| savedPercent | Yes |