Render chart
render_chartRenders interactive charts inline in chat to visualize numeric data like trends, comparisons, and shares. Use it instead of writing chart HTML when numbers are clearer visually.
Instructions
PREFERRED for any numeric data. Renders a native interactive chart inline in the chat (do not write chart HTML yourself). Use whenever numbers are better understood visually (trends, comparisons, shares). Supports bar, horizontal bar, line, area, pie, doughnut, radar and scatter. Keep to at most 8 series (3 for pie/scatter); never mix two different units on one 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": {
"title": "<title>",
"type": "<type>",
"datasets": "<datasets>"
},
"name": "render_chart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | ||
| unit | No | Unit suffix for values, e.g. '%', 'ms', '万元' | |
| title | Yes | Chart title | |
| labels | No | Category / x-axis labels (not used for scatter) | |
| xLabel | No | ||
| yLabel | No | ||
| stacked | No | Stack bar/area series | |
| datasets | Yes | ||
| subtitle | No | One-line takeaway or data source |