sort_range
Sort a specified range of cells in a Google Sheet by one or more columns, with each column sorted ascending or descending.
Instructions
Sort a range by one or more columns
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>",
"sheet_id": "<sheet_id>",
"start_row": "<start_row>",
"end_row": "<end_row>",
"start_column": "<start_column>",
"end_column": "<end_column>",
"sort_specs": "<sort_specs>"
},
"name": "sort_range"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_row | Yes | Ending row index (exclusive) | |
| sheet_id | Yes | The ID of the sheet | |
| start_row | Yes | Starting row index (0-based) | |
| end_column | Yes | Ending column index (exclusive) | |
| sort_specs | Yes | Array of sort specifications | |
| start_column | Yes | Starting column index (0-based) | |
| spreadsheet_id | Yes | The ID of the spreadsheet |