sanitize_svg
Removes XSS payloads, scripts, event listeners, external entities, and XML bombs from untrusted SVG strings so they can be safely embedded or processed.
Instructions
Sanitize an untrusted SVG string to eliminate XSS attacks, scripts, event listeners (onload, onclick), external entity injections, and XML bombs.
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": "<svg>"
},
"name": "sanitize_svg"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| svg | Yes | The raw SVG markup string to sanitize (max 512KB). |