svg_to_data_uri
Convert raw SVG markup into an optimized Data URI string for CSS background-image or HTML img tags, with utf8 or base64 encoding options.
Instructions
Convert raw SVG markup into an optimized Data URI string for CSS background-image or HTML tags.
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": "svg_to_data_uri"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| svg | Yes | The raw SVG markup to encode. | |
| encoding | No | Encoding method: "utf8" (URL-encoded, smaller size) or "base64". Default is "utf8". | utf8 |