Skip to main content
Glama
WilliamSmithEdward

xlide-excel-word-powerpoint-access-office-vba-mcp

Sort worksheet rows

xlide_sort_rows
DestructiveIdempotent

Sort Excel range, table, or autofilter rows by column keys, keeping headers and hidden rows in place, then save the workbook.

Instructions

Sorts a range, a table's data rows, or a sheet autofilter's data rows, and saves the workbook. Keys are evaluated in order; each names a column letter for a range or filter, or a header name for a table. A range can keep its first row as a header. Hidden rows keep their places. Formulas, formatting, notes and links move with their rows. This changes existing data order and has no undo in the file: ask the user before calling it. Works on .xlsx, .xlsm and .xlam.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keysYesOrdered sort keys; each names a column and direction.
sheetYesWorksheet name, matched without case.
headerNoFor a range: leave its first row in place.
targetNorange, table or filter.range
file_pathYesAbsolute path to the Excel file.
cell_rangeNoFor target='range': block such as A1:D20.
match_caseNoUse case-sensitive text order.
table_nameNoFor target='table': table name.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.2.2

TDQS

A4.4/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and idempotentHint=true, but the description goes well beyond them: no undo in the file, an explicit user-confirmation requirement, hidden rows retaining their positions, and formulas/formatting/notes/links traveling with their rows. That is exactly the mutation-risk context an agent needs.

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?

Front-loads what gets sorted, then behavior, then the warning, then file formats. Every sentence carries information, though the four-impact sentence (formulas/formatting/notes/links) is dense and could be tightened slightly.

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

Completeness5/5

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

For a destructive, in-place mutation with an output schema already covering returns, the description supplies the missing pieces: irreversibility, user consent, preservation of row-attached content, hidden-row handling, and supported file extensions. Nothing essential is absent.

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 description coverage is 100%, so all 8 parameters are already documented, including the column-letter vs header-name distinction and the header flag. The description reiterates keys-are-ordered and header behavior but adds little parameter syntax or semantics not already in the schema; baseline 3 applies.

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?

States a specific verb (sorts) applied to three concrete resources (range, table data rows, autofilter data rows) and names the persistence side effect (saves the workbook). It is clearly separable from siblings like xlide_remove_duplicates or xlide_manage_filter without opening their schemas.

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

Usage Guidelines4/5

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

Gives clear selection logic via the target concept (range/table/filter) and a strong pre-call instruction: 'ask the user before calling it' because the change has no undo. It does not name an alternative tool or say when a different sibling should be preferred, so it falls short of a 5.

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