Create chart
create_chartDatawrapper: create a chart, map or table in one call (create + upload data + style). Everything is validated before anything is sent, so a failing call costs no quota. Pass type (id or alias, see describe_chart_type), data (csv/rows/columns/external_url/google_sheet) or markers (locator maps), a takeaway title, source_name and alt_text. Use style for common settings (sort, colors, highlight, number format, y range, legend…) — it maps to the right option per chart type. annotations adds text, shaded ranges and reference lines. visualize is the raw escape hatch. Maps: choropleth needs map.basemap (id or search phrase) — regions are matched and normalized automatically; symbol maps use lat/lon columns. The chart is created as an unpublished draft and a PNG preview is returned; publishing is a separate, confirmed step (publish_chart). In clients that support MCP Apps the result opens in an interactive chart viewer.
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": {
"type": "<type>"
},
"name": "create_chart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| map | No | Map settings for choropleth, symbol and locator maps. | |
| axes | No | Explicit column roles, e.g. {x: 'Year', y: ['A','B']} or {labels: 'Country', bars: 'GDP'}. Usually auto-detected; see describe_chart_type for roles. | |
| data | No | Exactly one data source. Use csv/rows/columns for inline data (best below ~10,000 rows; line charts below ~1,000 points). | |
| type | Yes | Chart type id or alias, e.g. 'd3-lines', 'bar', 'choropleth', 'table'. | |
| intro | No | Description below the title (HTML allowed: <b>, <i>, <a>). | |
| notes | No | Footnote below the chart (methodology, definitions). | |
| style | No | Intent-level styling. The server maps each field to the right Datawrapper option for the chart type. | |
| theme | No | Theme id (see list_themes). Default: the team's or workspace's default theme (usually its custom theme). | |
| title | No | Headline. State the takeaway, e.g. 'Unemployment fell to a 20-year low'. | |
| byline | No | Author credit. | |
| markers | No | Locator maps only: points (max 500), lines, areas, circles, arrows and GeoJSON shapes. | |
| preview | No | Render a PNG preview so you can check the result (uses 1 of 3,000 free monthly exports). 'auto' follows the server setting. | |
| team_id | No | Team that owns the new chart (see whoami). Default: your primary team, whose members see the draft. | |
| alt_text | No | Screen-reader description (aria-description): what the chart shows and its main finding. Strongly recommended. | |
| language | No | Output locale for number/date formatting and footer texts, e.g. 'en-US', 'en-GB', 'de-DE'. Default: the team's or workspace's locale. | |
| metadata | No | Raw metadata sections to merge (describe, publish, data, annotate, axes, custom). Expert use; see https://www.datawrapper.de/developer/visualization-properties. | |
| folder_id | No | Folder to put the chart in (see list_folders). | |
| transpose | No | Swap rows and columns in Datawrapper (data.transpose). Set automatically for grouped/stacked column charts and multiple pies. | |
| visualize | No | Raw metadata.visualize options (escape hatch). Validated against the chart type; see describe_chart_type and https://www.datawrapper.de/developer/visualization-properties. Applied after `style`. | |
| workspace | No | Workspace slug for the new chart (see whoami). | |
| source_url | No | Link to the data source. | |
| annotations | No | Text labels, shaded ranges and reference lines. | |
| source_name | No | Data source name, e.g. 'Eurostat'. | |
| column_types | No | Override how Datawrapper reads a column, e.g. {'Year': 'text', 'ZIP': 'text'}. | |
| hide_columns | No | Columns to keep in the data but leave out of the chart (e.g. notes used only in tooltips). | |
| show_columns | No | Columns to show again after hide_columns. | |
| custom_fields | No | Custom field values (metadata.custom), e.g. a CMS slug or article id defined in the team settings. | |
| computed_columns | No | Added columns computed by Datawrapper — useful for live data (external_url) where values cannot be precomputed. A column with the same name is replaced. |