Skip to main content
Glama

sort_data

Reorder spreadsheet rows in place by one or more keys, keeping case names with their rows. Set ascending or descending order per key.

Instructions

Sort a spreadsheet in place by one or more keys (case names move with their rows). order may be a single value or one per key: 0/asc or 1/desc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the source file.
saveNoOptional destination path to persist the result as .sta.
orderNoAscending (0/"asc") or descending (1/"desc"). A single value or one per key.
sheetNo
attachNoAttach to the already-running STATISTICA instance and edit it live (no new process, the app is not closed).
variablesYesSort key(s), most significant first.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.3.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral burden and does disclose two useful traits: the sort mutates the source 'in place', and case names travel with their rows. It stops short of covering permissions, whether the original is left untouched, or how persistence interacts with the 'save' parameter.

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?

Two tight sentences, with the core operation front-loaded and the order semantics appended. Every clause carries information; nothing is padded.

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

Completeness3/5

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

For a 6-parameter mutation tool with no annotations and no output schema, the description covers the core operation and order semantics but leaves sheet, attach, and save behavior to the schema. Adequate but with visible gaps.

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 83%, so the schema already documents parameters like order and variables. The description restates the order semantics (single value or one per key, 0/asc vs 1/desc), reinforcing but not exceeding what the schema provides. Baseline 3 is appropriate.

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

Purpose4/5

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

States a specific verb (sort) and resource (spreadsheet) with scope qualifier 'in place'. The purpose is unambiguous and no sibling tool competes for the same operation, though the description doesn't explicitly differentiate itself from list/export siblings.

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?

No guidance on when to use this versus alternatives such as export_csv or describe_spreadsheet, and no stated prerequisites. The 'in place' phrasing implies source mutation but the description never tells the agent when sorting is the right call.

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