ztd-charts-mcp
v0.13.1ztd-charts MCP server (stdio): list charts, get schemas, validate specs, render SVG/PNG, and get chart suggestions from data
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_charts List chart types
List the 47 chart types with name, level (basic, intermediate, advanced), group, one-line summary, when to use or avoid, and encoding channels. Filter by group or level.
| Parameter | Type | Description |
|---|---|---|
group | string | Chart group |
level | string | Difficulty level |
get_chart_schema Get chart schema
Get the JSON Schema for one chart type (encoding channels, options with types/defaults), plus a complete example spec and a React snippet. Omit type for the full schema of all 47 charts (about 365 KB, so prefer asking for one type).
| Parameter | Type | Description |
|---|---|---|
type | string | Chart type, e.g. "pie", "line", "sankey". Aliases like "doughnut", "violin" work. |
validate_spec Validate chart spec
Validate a chart spec against the registry and its inline data: unknown type (with did-you-mean), missing/unknown encoding channels, fields missing from data, non-numeric value fields, option types and enums. Returns { valid, errors[], warnings[] } with JSON paths and messages. Set locale for the language of the messages.
| Parameter | Type | Description |
|---|---|---|
spec * | object | { type, data, encoding, options?, card?, theme? } |
locale | string | Locale for the error and warning messages. Default "en-US", or the spec's options.locale when set. "ko" or "ko-KR" gives Korean messages |
render_chart Render chart
Server-render a chart spec to PNG (returned as an image) and/or SVG text, with the card frame (number, title, legend, takeaway, level badge) when spec.card is set. Also returns ready-to-paste React code. data may be inline rows, { csv }, or { url } (fetched; private and local network addresses are refused unless the server runs with ZTD_CHARTS_ALLOW_PRIVATE_URLS=1). Set locale for the language of built-in chart text and number formats.
| Parameter | Type | Description |
|---|---|---|
spec * | object | Chart spec |
format | string | Default png |
locale | string | Locale for built-in chart text and number formats. Default "en-US" (1.2K). "ko" or "ko-KR" gives Korean text and 1.2만 style numbers |
scale | number | PNG pixel ratio, default 2 |
theme | string | Default dark |
width | integer | Pixel width, default 720 |
suggest_chart Suggest charts for data
Profile tabular data (column kinds, cardinality, hierarchy, source/target pairs, dates) and recommend chart types ranked by fit, each with a reason and a ready spec. Pass csv text, rows (array of objects), or a url to CSV/JSON (Google Sheets CSV export, REST; private and local network addresses are refused unless the server runs with ZTD_CHARTS_ALLOW_PRIVATE_URLS=1). Set locale for the language of the reasons and the suggested specs.
| Parameter | Type | Description |
|---|---|---|
csv | string | CSV text with header row |
limit | integer | Default 5 |
locale | string | Locale for chart names, reasons and card text in the suggestions. Default "en-US". "ko" or "ko-KR" gives Korean text and sets options.locale "ko-KR" in each spec |
rows | array | Array of row objects |
url | string | http(s) URL returning CSV or JSON |