document_optimize
Remove unused top-level definitions from an SVG by planning or writing a derived file for Inkscape, with dry run and visual-regression validation; source document stays unchanged.
Instructions
Plans or writes a derived SVG that removes only unused top-level definitions. Publication requires a deterministic Inkscape visual-regression render; the source document is never modified.
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": {
"path": "<path>",
"workspaceId": "<workspaceId>"
},
"name": "document_optimize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| dryRun | No | ||
| outputPath | No | ||
| workspaceId | Yes | ||
| visualTolerance | No | ||
| expectedRevision | No | ||
| expectedOutputRevision | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | Yes | ||
| revision | No | ||
| outputPath | Yes | ||
| removedIds | Yes | ||
| candidateIds | Yes | ||
| visualRegression | No |