Render chart
render_chartRender a chart image from a Chart-Output JSON spec and return it as a PNG, with a link to edit it in the Chart-Output playground. Use it whenever the user asks for a chart, graph or plot of data. Without an API key renders are PNG, at most 1200px per side, with no custom logos or saved brand kits. Show the user the edit link so they can tweak the chart.
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": {
"spec": "<spec>"
},
"name": "render_chart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes | A Chart-Output chart spec (JSON object), the same body POST /api/v1/render takes. Required: "type" (one of line, bar, pie, doughnut, radar, polarArea) and "data": { "labels": string[], "datasets": [{ "label": string, "data": number[] }] }. Optional: "width"/"height" in px (default 800x400), "header": { "eyebrow", "title", "subtitle" }, "kpiStrip": [{ "label", "value" }] (up to 12), "footer": { "left", "right" } (e.g. source line), "brandKitId": one of obsidian, linen, polar, studio, ember, harbor for a preset look, "theme": { "mode": "light"|"dark", "palette": ["#hex", ...] }, "dataLabels": true, "options" (Chart.js options). Adding a header, kpiStrip or footer renders a full branded card. Example: {"type":"bar","header":{"title":"Revenue by quarter"},"data":{"labels":["Q1","Q2","Q3","Q4"],"datasets":[{"label":"Revenue ($k)","data":[120,145,132,178]}]},"footer":{"left":"Source: finance"}} |