Skip to main content
Glama

sort_range

Destructive

Sort a range of cells in a Google Sheet by a specific column, with ascending or descending order.

Instructions

Sort a range of cells by a column.

Args: spreadsheet_id: The ID of the spreadsheet sheet: Sheet/tab name range: A1 notation range to sort (e.g., 'A1:D100') sort_column: Column letter to sort by (e.g., 'B') order: 'ASCENDING' or 'DESCENDING'

Returns: Result of the sort operation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
spreadsheet_idYes
sheetYes
rangeYes
sort_columnYes
orderNoASCENDING

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

The description adds no behavioral context beyond the annotation 'destructiveHint: true'. It does not mention in-place modification, handling of headers, or impact on data validity. The annotation already indicates destructiveness, so the description fails to expand on that.

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

Conciseness5/5

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

The description is concise, structured with an Args list and Returns line. No redundant sentences; every part adds value. The main purpose is front-loaded in the first sentence.

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?

For a simple sort operation, the description is largely complete. It covers all input parameters and notes a return value. However, it could mention whether sorting is stable or respects headers, but given the output schema existence, completeness is adequate.

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

Parameters4/5

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

With 0% schema description coverage, the description compensates by listing all parameters with brief explanations: 'sort_column: Column letter to sort by (e.g., 'B')' and 'order: 'ASCENDING' or 'DESCENDING''. This adds meaning beyond the bare schema, though format details for 'range' could be improved.

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 explicitly states 'Sort a range of cells by a column,' which clearly identifies the action (sort), resource (range of cells), and criteria (column). This distinguishes it from sibling tools like 'add_filter', 'clear_range', etc.

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 does not provide guidance on when to use sorting versus alternatives (e.g., using filters or manual reordering). It merely lists parameters, leaving the agent to infer context from the tool name and siblings.

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/socar-edwin/mcp-google-sheets-extended'

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