optimize_svg
Optimize SVG files with SVGO using custom or default settings. Specify an input file, optionally set output path and plugin configuration, and reduce file size while preserving visual quality.
Instructions
Optimize SVG files using SVGO (SVG Optimizer) with customizable configuration
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": {
"inputPath": "<inputPath>"
},
"name": "optimize_svg"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| inputPath | Yes | Path to the input SVG file (required) | |
| outputPath | No | Path to the output SVG file (optional - if not provided, overwrites the original file) | |
| svgoConfig | No | Custom SVGO configuration (optional - uses default if not provided) |