add_chart
Embed a chart in an Excel sheet by specifying chart type, data range, and optional categories. Place it at any cell and customize dimensions.
Instructions
Embed a chart in a sheet.
chart_type: bar, bar_horizontal, line, pie, scatter, area. data_range holds the value column(s); with data_includes_headers=true (default) the first row provides the series names. categories_range is the label column/row for the axis (or the slice labels for pie). For scatter, categories_range is required and supplies the shared x-values (no header); each data_range column becomes one y-series.
position is the cell of the chart's top-left corner (e.g. 'E2'); it defaults to two columns right of the data. Data and chart may be on different sheets ('Summary!E2'). width_cm/height_cm default to 15 x 7.5.
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": {
"session_id": "<session_id>",
"chart_type": "<chart_type>",
"data_range": "<data_range>"
},
"name": "add_chart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | ||
| x_title | No | ||
| y_title | No | ||
| position | No | ||
| width_cm | No | ||
| height_cm | No | ||
| chart_type | Yes | ||
| data_range | Yes | ||
| session_id | Yes | ||
| categories_range | No | ||
| data_includes_headers | No |