Skip to main content
Glama

Prune Failed Subjects

prune_failed_subjects

Delete cortical_tiles outputs for subjects that fail QC by reading a QC file and removing their files; use dry_run=True to preview deletions without changes.

Instructions

Remove cortical_tiles outputs for all subjects that failed QC.

Reads a QC TSV/CSV file with 'participant_id' and 'qc' columns and deletes all files belonging to subjects with qc==0 or absent from the QC file. Equivalent to having run cortical_tiles with --sk_qc_path from the start.

Use dry_run=True to preview what would be deleted without modifying anything.

Input Schema

NameRequiredDescriptionDefault
qcYes
outputYes
dry_runNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses exactly what gets deleted (all files for failing subjects), the exact selection rule, and adds a dry_run safety preview. It stops short of stating that deletion is irreversible or whether any confirmation/permissions are required.

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?

Three sentences, front-loaded with the destructive action, then the selection semantics, then the safety escape hatch. No filler sentences; every line earns its place.

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?

An output schema exists so return values need not be explained, and the description covers the destructive semantics and QC input format. The only real gap is the unexplained required 'output' parameter and the absence of an irreversibility warning for a file-deleting tool.

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 0%, so the description must compensate. It explains the qc parameter well (TSV/CSV with 'participant_id' and 'qc' columns) and dry_run's preview role, but the required 'output' parameter is never described anywhere in the definition.

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 ('Remove') and resource ('cortical_tiles outputs') with clear scope ('for all subjects that failed QC'). The 'all subjects' scope implicitly distinguishes it from the singular purge_subject sibling, so an agent can route correctly.

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?

It defines the selection criteria clearly (qc==0 or absent from QC file) and tells the agent to use dry_run=True to preview. However, it never names an alternative tool or states exclusion conditions, so the when-to-use guidance is implied rather than explicit.

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