Skip to main content
Glama

pg_test_impact

Identifies tests affected by changed files and runs them in batches, falling back to the full test suite when dependency coverage is incomplete.

Instructions

Trace affected tests and run them in batches; fall back to the full recipe when dependency coverage is incomplete.

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": "pg_test_impact"
  }
}

Input Schema

NameRequiredDescriptionDefault
slotNoWorkspace slot name (optional if only one slot is open or `--slot` default is set).
runnerNo
sub_idNoOptional sub-worktree ID for both selection and execution.
dry_runNoIf true, only list affected test files without executing them.
k_filterNoOptional test filter.
changed_filesNoOptional explicit changed relative paths (defaults to current git dirty files).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.7.1

TDQS

C2.6/5.0
Behavior2/5

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

No annotations exist, so the description carries the full burden of behavioral disclosure. It says tests are executed in batches but does not state that this mutates the workspace by running code, what permissions or slot context are required, what 'batches' means in practice, or what gets returned. The only real behavioral hint is the vague fallback clause.

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 no filler. The only cost is that the clause after the semicolon introduces an undefined term ('full recipe'), which makes it less clear rather than more concise.

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?

This is a six-parameter execution tool with no annotations and no output schema, so the definition should explain execution side effects, failure modes, and return shape. Instead it offers one sentence with an unexplained fallback path, leaving most of what an agent needs for correct invocation unstated.

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 83%, so the schema already explains slot, sub_id, dry_run, k_filter, and changed_files. The description adds no parameter-level meaning beyond a loose implication of batching and the schema-documented dry_run. Baseline of 3 applies when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific action chain (trace affected tests, run them in batches), which is more than a restatement of the name. However, 'full recipe' is undefined jargon, so the fallback behavior is opaque. It also does not distinguish itself from the sibling pg_test_target, which likely deals with test targeting.

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 an implied condition for the fallback ('when dependency coverage is incomplete'), but no explicit when-to-use vs when-not-to-use guidance and no named alternative tool. An agent cannot tell from this text when to call pg_test_target instead.

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