Skip to main content
Glama
dudegladiator

Google Sheets MCP Server

sort_range

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

Instructions

Sort data in a range by a column.

Args: spreadsheet_id: The ID of the spreadsheet. sheet_id: The numeric ID of the sheet. start_row: Starting row index (0-based). end_row: Ending row index (exclusive). start_col: Starting column index (0-based). end_col: Ending column index (exclusive). sort_column: Column index to sort by (0-based, relative to range). ascending: True for A-Z/0-9, False for Z-A/9-0.

Returns: Success message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
end_colYes
end_rowYes
sheet_idYes
ascendingNo
start_colYes
start_rowYes
sort_columnYes
spreadsheet_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description carries the burden of behavioral disclosure. It adds useful context about 0-based indexing, exclusive end row/column, and ascending semantics, but does not explicitly mention that sorting is an in-place mutation, potential data loss, or any permission requirements. This is a moderate gap.

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 well-structured as a docstring with Args and Returns sections. Each line serves a purpose, and the length is appropriate for the number of parameters. No unnecessary words or repetition.

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 8 parameters, no annotations, and no schema description coverage, the description provides all parameter semantics and a return value indicator. It lacks usage context and side-effect warnings, but for a sorting operation with clear parameter explanations, it is nearly complete.

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

Parameters5/5

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

Schema description coverage is 0%, but the description fully compensates by explaining every parameter in the Args section. It clarifies that sort_column is relative to the range, specifies 0-based indices, explains exclusive end bounds, and defines ascending behavior. This is excellent semantic coverage.

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 'Sort data in a range by a column' with a specific verb and resource. It is distinct from sibling tools, none of which focus on sorting, making the purpose unambiguous.

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

Usage Guidelines2/5

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

The description provides no explicit guidance on when to use this tool versus alternatives, nor any exclusions or prerequisites. It merely specifies the operation and parameters, leaving the usage context to be inferred from the title and description.

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/dudegladiator/spreadsheet-mcp'

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