Skip to main content
Glama

run_impacted_tests

Run pytest only on files affected by current worktree changes to cut test time and catch regressions tied to your edits.

Instructions

Run pytest on files impacted by the current worktree changes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
compactNo
projectNoProject name/path (default: active).
max_testsNo
timeout_secNo
symbol_namesNo
changed_filesNo
include_outputNo
max_output_charsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.0.0
  2. Removedv1.0.2
  3. Addedv1.0.1

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare the safety profile (readOnly=false, destructive=false, idempotent=false, openWorld=false), so the description only needs to add behavior beyond that. It confirms the tool shells out to pytest, but says nothing about runtime cost, the non-idempotent/non-read-only nature the annotations imply, or failure behavior.

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?

A single front-loaded sentence with zero filler. The action and its trigger are both stated in the first clause.

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

Completeness2/5

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

For an 8-parameter execution tool with no output schema and only annotation-level safety hints, the description is far too thin — it neither documents parameters nor describes what the run produces or how results are surfaced to the agent.

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

Parameters2/5

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

Eight parameters with only 13% schema description coverage, so the description must carry the meaning — but it explains none of compact, max_tests, timeout_sec, symbol_names, changed_files, include_output, or max_output_chars. The tension between running on 'worktree changes' and accepting an explicit changed_files/symbol_names list is never resolved.

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 (Run) and resource (pytest on impacted files) with a clear trigger condition (current worktree changes). It implicitly separates itself from find_impacted_test_files (which only lists files) by asserting execution, but it never names that sibling or makes the distinction explicit.

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?

The phrase 'impacted by the current worktree changes' implies the context in which to reach for this tool, but there is no explicit when-to-use versus alternatives like find_impacted_test_files or run_project_action, and no exclusions or prerequisites stated.

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