Skip to main content
Glama

run_affected

Run only tests impacted by git changes. Analyzes diffs against a base ref to find and execute related test files.

Instructions

Run only tests affected by git changes. Analyzes diff to find related test files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseNoGit ref to diff against (e.g., "main", "HEAD~3"). Defaults to unstaged/staged changes.
timeoutNoTime budget in milliseconds
coverageNoEnable coverage collection
projectDirYesAbsolute path to the project directory

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/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 behavioral burden. It does disclose meaningful behavior beyond the schema: it analyzes the git diff to select test files. It still omits execution side effects (e.g., coverage artifact writes implied by the 'coverage' param), failure semantics, and run duration expectations.

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?

Two short sentences with zero filler. The core action and selecting mechanism are front-loaded and nothing is redundant.

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 test-execution tool with no annotations and no output schema, the description is thin on runtime behavior and results. The fully documented schema compensates on the input side, but an agent still lacks context on what execution returns and how failures surface.

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 four parameters (base, timeout, coverage, projectDir) are already documented in the schema. The description adds no additional parameter meaning, which makes the baseline 3 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?

The description states a specific verb ("Run") and resource ("tests affected by git changes") and explains the mechanism ("Analyzes diff to find related test files"). It implicitly differentiates from sibling run_tests by scoping to git-affected tests, but never names run_tests to make 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?

Usage is implied by "Run only tests affected by git changes" – an agent can infer this is for incremental/PR-focused runs rather than full suites. However, there is no explicit when-to-use vs run_tests, no guidance on when to prefer a full run, and no note on prerequisites such as a git repository being present.

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