Generate a chart image
generate_chart_imageRender a PNG chart through UrlChart and return the image plus its hosted URL. Accepts Google Image Charts / legacy parameters as an object ({"cht":"bvg","chs":"400x200","chd":"t:10,40,80"}) or a full legacy chart URL (Google, Image-Charts, QuickChart or urlchart.com). Without an api_key (or an Authorization: Bearer header on this MCP connection) the render is the FREE tier: a canvas of at most 1000 px per side / 1 MP, 60 requests/minute and 1,000 unique renders/month per IP. A request above that canvas is scaled down and reported in X-UrlChart-Meta, never failed. A paid api_key keeps the full 9 MP canvas (3000 px per side) and applies the paid limits. Parameters that are unknown or not implemented never fail the render; they degrade and are reported in X-UrlChart-Meta. chof=jpg|webp|pdf requests another output format; a PDF result is returned as a hosted URL (not an image block). The hosted URL in the text result is the same chart without any credential, so embedding it publicly serves the FREE (capped-canvas) variant unless a key or signed URL is added.
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": {
"params": "<params>"
},
"name": "generate_chart_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes | Legacy chart parameters. Either an object of parameter name -> value (cht, chs, chd, chds, chl, chdl, chdlp, chxt, chxl, chxr, chxs, chxp, chxtc, chco, chtt, chts, chma, chg, chf, chbh, chls, chm (and chld/choe for cht=qr)), or a full chart URL / query string. Values may be strings or numbers. | |
| api_key | No | Optional UrlChart API key (uc_live_… / uc_test_…). Omit to use the free tier. Alternatively send `Authorization: Bearer <key>` on the MCP request itself. |