sheets_create_pivot_table
Create pivot tables in Google Sheets for data analysis. Define rows, columns, and values from a source range, then output to a destination cell.
Instructions
Creates a pivot table in a Google Sheets spreadsheet
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": {
"spreadsheet_id": "<spreadsheet_id>",
"source_range": "<source_range>",
"destination": "<destination>",
"rows": "<rows>",
"values": "<values>"
},
"name": "sheets_create_pivot_table"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | Row groups for the pivot table | |
| values | Yes | Value fields for the pivot table | |
| columns | No | Column groups for the pivot table | |
| destination | Yes | The destination cell in A1 notation (e.g. Sheet2!A1) | |
| source_range | Yes | The source data range in A1 notation including sheet name (e.g. Sheet1!A1:E100) | |
| spreadsheet_id | Yes | The ID of the spreadsheet |