groupRows
Creates collapsible row groups in a Google Sheet so you can organize, hide, and expand related rows by specifying 1-based start and end row ranges.
Instructions
Creates collapsible row groups in a Google Sheet using the Sheets API addDimensionGroup request. Each group specifies a range of rows (1-based, inclusive) to collapse.
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": {
"spreadsheetId": "<spreadsheetId>",
"groups": "<groups>"
},
"name": "groupRows"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| groups | Yes | Array of row ranges to group. Each entry is {startRowIndex, endRowIndex} using 1-based row numbers. | |
| sheetName | No | Name of the sheet/tab. Defaults to the first sheet if not provided. | |
| spreadsheetId | Yes | The spreadsheet ID — the long string between /d/ and /edit in a Google Sheets URL. |