Skip to main content
Glama

pg_test_target

Run targeted unit tests on specific relative files or directories, with an optional test-name filter to narrow which tests execute.

Instructions

Run targeted unit tests on specific relative files/directories with optional test-name filter.

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_target"
  }
}

Input Schema

NameRequiredDescriptionDefault
slotNoWorkspace slot name (optional if only one slot is open or `--slot` default is set).
runnerNo
sub_idNoOptional sub-worktree ID.
targetsNoRelative test file or directory paths.
k_filterNoOptional test name pattern filter (-k / -run).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.7.1

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations, the description carries the full disclosure burden. It says tests are run but not whether this is a read-only execution, whether it writes artifacts or affects workspace/slot state, how long it may take, or how runner='auto' is resolved — significant gaps for an execution tool.

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 no filler; the core action, scope, and optional filter are all conveyed efficiently.

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 5-parameter test-execution tool with no output schema and no annotations, the definition covers the basic action but omits runner selection behavior, slot/sub-worktree implications, and any indication of what results are returned, leaving notable gaps.

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 80%, so the baseline is 3. The description reinforces that targets are relative files/directories and that the name filter is optional, but it adds nothing about slot, sub_id, or how the runner enum values differ, so it does not exceed what the schema already provides.

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 and resource ('Run targeted unit tests') plus the scope ('specific relative files/directories'). An agent can tell this runs tests against explicit paths rather than, say, analyzing impact, though no sibling is named explicitly.

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 word 'targeted' and 'specific relative files/directories' implies you use this when you already know which test files to run, but there is no explicit when-to-use, when-not-to-use, or comparison against pg_test_impact or pg_verify. Guidance is inferred rather than stated.

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