Generate SVG Graphic
generate_svgGenerate scalable vector graphics (SVG) for diagrams, illustrations, icons, and data visualizations using Gemini. Produces clean, production-ready code with inline preview.
Instructions
Generate scalable vector graphics (SVG) using Gemini. Creates clean, production-ready SVG code for diagrams, illustrations, icons, and data visualizations. Returns inline preview with SVG viewer.
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": {
"prompt": "<prompt>"
},
"name": "generate_svg"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Description of the SVG graphic to generate | |
| width | No | SVG width in pixels (default: 800) | |
| height | No | SVG height in pixels (default: 600) | |
| style | No | Visual style: technical (diagrams), artistic (illustrations), minimal (simple), data-viz (charts) | technical |
| model | No | Gemini model to use (defaults to configured default) | |
| outputPath | No | Optional file path to save the SVG (e.g. C:/output/diagram.svg) |