create_chart
Renders Chart.js data as a PNG or SVG image, saves it to disk, and returns it for display. Supports bar, line, pie, scatter, radar, and other chart types.
Instructions
Create a chart visualization. Renders a Chart.js chart as PNG or SVG, saves to disk, and returns the image. Supports: bar, line, pie, doughnut, scatter, area, radar, bubble, polarArea, histogram.
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": {
"type": "<type>",
"datasets": "<datasets>"
},
"name": "create_chart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Chart type | |
| labels | No | Labels for data points (x-axis for bar/line, segments for pie) | |
| options | No | Chart display options | |
| autoOpen | No | Open chart in default viewer (default true) | |
| datasets | Yes | One or more data series | |
| outputPath | No | Custom file path to save the chart | |
| outputFormat | No | Output format: png (default) or svg |