Skip to main content
Glama

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
spreadsheet_nameYesThe name of the Google Spreadsheet
sheet_nameYesThe name of the sheet containing the table
table_nameYesName of the table to sort
column_nameYesName of the column to sort by
sort_orderNoSort order: 'ASC' or 'DESC' (default: 'ASC')ASC

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses that data rows are reordered while the header row remains, and that it returns a JSON string with status and details. With no annotations, it provides adequate behavioral insight, though it omits potential side effects or permission requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with a clear structure, including Args and Returns sections. However, the Args section redundantly lists parameters already defined in the schema, slightly reducing conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 5 parameters with full schema coverage and an output schema, the description covers the main behavioral aspects and return format. It lacks error handling or prerequisite details, but is sufficient for a single-purpose mutation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the description repeats parameter descriptions from the schema without adding significant new meaning. The default value for sort_order is already in the schema, so the description adds marginal value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it updates table sorting by a specific column, with explicit mention that the header row remains and data rows are reordered. This distinguishes it from sibling tools like add_table_column_tool or delete_table_records_tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains what the tool does but does not provide guidance on when to use it versus alternatives, or when not to use it. It lacks explicit usage context, relying only on implicit purpose.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/henilcalagiya/google-sheets-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server