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

> Insert an in-cell SPARKLINE chart by writing the formula for you.

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

Sheets SPARKLINEs are tiny inline charts — use them in dashboard rows (one per metric) instead of full add_sheet_chart calls. Much smaller footprint, much faster.

## Call it

MCP tool call:

```json
{
  "name": "insert_sheet_sparkline",
  "arguments": {
    "spreadsheet_id": "<spreadsheet_id>",
    "target_cell": "<target_cell>",
    "data_range": "<data_range>"
  }
}
```

Tool API (early access — contact us):

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

## Arguments

| Name | Type | Required | Description |
|---|---|---|---|
| `spreadsheet_id` | string | yes | the spreadsheet ID (from its URL or get_sheet_metadata). |
| `target_cell` | string | yes | A1 target cell to host the sparkline (e.g. 'Dash!F2'). |
| `data_range` | string | yes | the data series as it would appear in a formula, without '=' (e.g. 'Sales!B2:G2'). Pass the tab name bare ('STA-BoxFirst!B2:G2'); the server quotes it. |
| `sparkline_type` | string |  | 'line' (default) \| 'column' \| 'winloss'. |
| `color` | string |  | Optional. Either a Sheets color name string ('red', 'blue', etc.) OR an RGB list [r,g,b] floats 0–1 which is converted to a #RRGGBB hex literal. |
| `line_width` | integer |  | Optional integer (only applies to 'line' type). |

## Result

- `data.formula` — the SPARKLINE formula written to data.targetCell.

## Example

- insert_sheet_sparkline("1ABC...", "Dash!F1", "Dash!A1:E1", sparkline_type="line", color="red") # Column type with explicit RGB green insert_sheet_sparkline("1ABC...", "Dash!F2", "Dash!A2:E2", sparkline_type="column", color=[0.0, 0.8, 0.0])