Build a chart URL
build_chart_urlBuild a well-formed UrlChart chart URL from a small, LLM-friendly chart spec. No render, no network, no key. Returns the URL as text; pass it to generate_chart_image (or embed it) to get the PNG. For chart types or parameters outside this spec, use generate_chart_image with raw legacy parameters.
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": {
"values": "<values>"
},
"name": "build_chart_url"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Chart title (chtt). | |
| width | No | ||
| y_max | No | Y axis maximum (chxr). Requires y_min. | |
| y_min | No | Y axis minimum (chxr). Requires y_max. | |
| colors | No | Series colours as hex (with or without #) or legacy colour names (chco). | |
| height | No | ||
| labels | No | Category labels (chl): one per value for a single series. Omit for no labels. For scatter, labels are not used. | |
| values | Yes | Data. For bar/line/pie/doughnut: one series (number[]) or several series (number[][]). For scatter: number[][] where the FIRST row is the x series and each further row a y series. | |
| background | No | Background colour (chf=bg,s,…), hex or legacy name. | |
| chart_type | No | Chart family. Default bar (cht=bvg). | bar |