Skip to main content
Glama

get_affected_tests

Determine which tests are impacted by changed files, git diffs, or modified symbols to focus test execution and CI checks after code changes.

Instructions

Test Impact Analysis (TIA): finds tests affected by changed files, git diff, or symbols.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_affected_tests"
  }
}

Input Schema

NameRequiredDescriptionDefault
gitDiffNoGit unified diff content.
filePathNoChanged file path.
filePathsNoList of changed file paths.
symbolNameNoModified symbol name.
workspacePathNoOptional workspace root path.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.80.5

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden and says nothing about read-only safety, indexing prerequisites, result size limits, or how it behaves when multiple input modes are supplied simultaneously. For a five-optional-parameter tool where inputs may conflict, the absence of any precedence or fallback rule is a real gap.

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?

A single front-loaded sentence with an acronym expansion and no filler; every clause earns its place. It is efficient but borders on under-specification given the tool's five optional inputs.

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?

With no output schema, the description should say what comes back (test names, file paths, counts) and whether results are ranked or capped; it does not. Combined with zero annotation coverage and no guidance on combining the five optional parameters, an agent cannot reliably form a valid call or interpret the response from this definition alone.

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 each parameter is already documented in the schema, and the description correctly mirrors the three input modes. However it adds no meaning about how gitDiff, filePath/filePaths and symbolName interact or which wins when several are given, so it does not exceed the schema baseline.

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 (finds) and resource (tests affected), and enumerates the three input modes: changed files, git diff, or symbols. It is clear what the tool returns at a high level, though it never distinguishes itself from the sibling get_test_coverage or analyze_code_impact.

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 naming the three triggering input kinds (changed files, git diff, symbols), which helps an agent pick the right mode. There is no explicit when-not guidance, no mention of when to prefer get_test_coverage or analyze_code_impact, and no statement about whether the workspace must be indexed first.

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