# add_sheet_chart (https://sellersheetai.com/docs/mcp-api/tools/add_sheet_chart)

> Insert a native Google Sheets chart over a range of data.

Access: **WRITE** · toolset google_workspace · family null

The first column of `data_range` is the domain (x-axis / labels). Remaining columns become series. For PIE the first column is labels and the second is values.

## Call it

MCP tool call:

```json
{
  "name": "add_sheet_chart",
  "arguments": {
    "spreadsheet_id": "<spreadsheet_id>",
    "data_range": "<data_range>",
    "chart_type": "<chart_type>"
  }
}
```

Tool API (early access — contact us):

```bash
curl -X POST https://api.sellersheetai.com/api/v1/tools/add_sheet_chart \
  -H "Authorization: Bearer $SELLERSHEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"spreadsheet_id":"<spreadsheet_id>","data_range":"<data_range>","chart_type":"<chart_type>"}'
```

## Arguments

| Name | Type | Required | Description |
|---|---|---|---|
| `spreadsheet_id` | string | yes | the spreadsheet ID (from its URL or get_sheet_metadata). |
| `data_range` | string | yes | A1 range INCLUDING the header row, e.g. 'Competitors!B3:C18' or 'Budget!A10:D14'. At least 2 columns (labels + one series); PIE reads only the first two. |
| `chart_type` | string | yes | BAR, COLUMN, LINE, AREA, SCATTER, COMBO, or PIE. |
| `title` | string |  | Chart title. |
| `anchor_range` | string |  | Single-cell A1 for the chart anchor (e.g. 'Competitors!H3'). Omit to place just to the right of data_range. |
| `width_pixels` | integer |  | chart size in pixels, default 600 × 371. |
| `height_pixels` | integer |  | chart size in pixels, default 600 × 371. |
| `legend_position` | string |  | BOTTOM_LEGEND / LEFT_LEGEND / RIGHT_LEGEND / TOP_LEGEND / NO_LEGEND. |
| `x_axis_title` | string |  | Axis labels. |
| `y_axis_title` | string |  | Axis labels. |
| `stacked_type` | string |  | 'STACKED' or 'PERCENT_STACKED' for bar/column/area. |

## Result

- { chartId: int, sheetId: int }

## Gotchas

- Every range here must name its tab and both ends ('Tab!A1:D10'); a range without a tab ('A1:D10') or with an open end ('Tab!A:D') is refused.

## Example

- add_sheet_chart( spreadsheet_id='1ABC...', data_range='Budget!A10:G14', chart_type='COLUMN', title='Monthly contribution', anchor_range='Budget!I10', stacked_type='STACKED', )