Sort a range
sort_rangeSort rows within a specified Google Sheets range by one or more columns, preserving the header row by default.
Instructions
Sort rows within a range by one or more columns.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | Yes | A1 range, e.g. "Sheet1!A1:D20", "'My Tab'!B:B", or a tab name | |
| account | No | Google account to use: an email or unique part of one (e.g. "acme.com"). Default: the account that can open the spreadsheet, else the default account. | |
| sort_by | Yes | ||
| has_header | No | Keep the first row of the range in place | |
| spreadsheet | Yes | Google Sheets link or spreadsheet ID. The name of a spreadsheet used with Sheets MCP before also works |