deleteColumns
Delete one or more column ranges from a Google Sheet by 1-based indexes, with right-to-left processing to prevent index shifting during multiple deletions.
Instructions
Deletes one or more columns from a Google Sheet. Columns are 1-based. Multiple ranges are processed right-to-left to avoid index shifting.
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>",
"columns": "<columns>"
},
"name": "deleteColumns"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| columns | Yes | Array of column ranges to delete. Each entry is {startIndex, endIndex} using 1-based column numbers. | |
| sheetName | No | Name of the sheet/tab. Defaults to the first sheet if not provided. | |
| readHandle | No | Capability returned by the corresponding read tool. Required on the modern MCP runtime, including modern stdio. | |
| spreadsheetId | Yes | The spreadsheet ID — the long string between /d/ and /edit in a Google Sheets URL. | |
| valueReadHandle | No | Additional readSpreadsheet handle covering all deleted cells across the full current grid height. Required on the modern runtime. Deletion consumes both handles; reread before another mutation. |