Optimize SVG
optimize_svgClean up and optimize SVG files using SVGO while preserving layer IDs and viewBox. Write the optimized SVG back to the original or a specified output path.
Instructions
Run svgo to clean up an SVG while preserving layer ids and viewBox. Writes back to svg_path (or output_path).
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": {
"svg_path": "<svg_path>"
},
"name": "optimize_svg"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| svg_path | Yes | ||
| output_path | No |