Create chart
create_chartAdd native Excel charts from worksheet ranges. Build bar, line, pie, or scatter charts with titles, category labels, and a chosen target cell directly on the same sheet.
Instructions
Add a native Excel chart built from ranges on the same sheet.
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": {
"sheet": "<sheet>",
"chart_type": "<chart_type>",
"data_range": "<data_range>"
},
"name": "create_chart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | File path or preloaded name (list_configured_files). Omit if only one file is preloaded. | |
| sheet | Yes | Sheet name (case-sensitive). | |
| title | No | Chart title. | Chart |
| backup | No | Save a .bak copy first. Default: XLSX_MCP_AUTO_BACKUP (true). | |
| reason | No | Why; kept in the change log (XLSX_MCP_CHANGE_LOG=true). | |
| chart_type | Yes | Chart kind: "bar", "line", "pie" or "scatter". | |
| data_range | Yes | Series values with the series name in the first row, e.g. "B1:B10". | |
| target_cell | No | Cell where the chart's top-left corner is placed. | E2 |
| categories_range | No | Category labels, e.g. "A2:A10". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||