Skip to main content
Glama

select_cases

Filter STATISTICA data by a condition, keeping only matching rows and dropping the rest. Supports numeric and text comparisons, including missing values.

Instructions

Keep only the rows matching a condition and drop the rest (all columns are rewritten). Supports numeric and text comparisons; missing values can be matched with op "missing".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opYesComparison operator. Default eq.
pathYesAbsolute path to the source file.
saveNoOptional destination path to persist the result as .sta.
sheetNo
valueNoComparison value for gt/ge/lt/le/eq/ne.
attachNoAttach to the already-running STATISTICA instance and edit it live (no new process, the app is not closed).
valuesNoValue list for in/notin.
variableYesVariable the condition is evaluated on.
keepCaseNamesNoCarry case names to the surviving rows. Default true.

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 full burden, and it does disclose that non-matching rows are dropped and all columns rewritten, signaling a destructive reshape. It stops short of stating whether the source file is modified in place or held in memory, and says nothing about permissions or recoverability; the live-editing behavior of 'attach' is only documented in the schema, not the description.

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 sentences, front-loaded with the core behavior and the destructive effect, with no filler. The second sentence is slightly redundant with the op enum, keeping it out of the top band.

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 9-parameter mutation-style tool with no annotations and no output schema, the description is adequate but incomplete: it does not clarify the interaction between not specifying 'save' and the in-memory result, nor whether the source spreadsheet is altered, which matters for chaining with downstream tools.

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 89%, so the schema already documents op, value, values, path, save, attach and keepCaseNames. The description's note that missing values are matched with op "missing" adds marginal semantic value but largely restates the enum, so the 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?

Specific verb and resource: it keeps only rows matching a condition and drops the rest, which is precise and differentiating from sibling data-shaping tools like sort_data or recode. However, it never names an alternative tool, so the sibling boundary is left implicit.

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?

There is no explicit when-to-use or when-not-to-use guidance and no mention of alternatives. The only hint is that the tool supports numeric/text comparisons, which describes capability rather than directing the agent's choice among the many other data-manipulation siblings.

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