update_table_sorting_tool
Sort all data rows in a Google Sheets table by a specified column, in ascending or descending order, while keeping the header row in place.
Instructions
Update table sorting by a specific column.
This tool sorts all data rows in a table based on a specified column.
The header row remains in place, and data rows are reordered.
Args:
spreadsheet_name: Name of the spreadsheet
sheet_name: Name of the sheet containing the table
table_name: Name of the table to sort
column_name: Name of the column to sort by
sort_order: Sort order - "ASC" or "DESC" (default: "ASC")
Returns:
JSON string with success status and sorting details
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_name": "<spreadsheet_name>",
"sheet_name": "<sheet_name>",
"table_name": "<table_name>",
"column_name": "<column_name>"
},
"name": "update_table_sorting_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spreadsheet_name | Yes | The name of the Google Spreadsheet | |
| sheet_name | Yes | The name of the sheet containing the table | |
| table_name | Yes | Name of the table to sort | |
| column_name | Yes | Name of the column to sort by | |
| sort_order | No | Sort order: 'ASC' or 'DESC' (default: 'ASC') | ASC |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |