Skip to main content
Glama

diffci_select_tests

Read-only

Identify which tests and checks your staged, unstaged, or path-scoped changes affect, returning a snapshot-bound test plan and the exact verify command to run—without running tests.

Instructions

Inspect current staged, unstaged and non-ignored untracked changes and return a snapshot-bound affected-test plan and fallback reasons. Runs no tests; a plan is not a passing receipt. With scope "staged" or "paths", plans HEAD plus only the index or only the given files in a temporary worktree, and returns the one diffci verify --staged/--paths command to run; use it before a commit when other sessions share the checkout.

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

Input Schema

NameRequiredDescriptionDefault
repoNoAbsolute repository path; defaults to server working directory. Always pass the edited repository when using a plugin.
pathsNoRepository-relative files for scope "paths".
scopeNoworking-tree (default): every uncommitted change. staged: HEAD plus the index only. paths: HEAD plus only `paths`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.60
    • addedInput schema / properties / paths
      Added value: +{
      +  "description": "Repository-relative files for scope \"paths\".",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / scope
      Added value: +{
      +  "description": "working-tree (default): every uncommitted change. staged: HEAD plus the index only. paths: HEAD plus only `paths`.",
      +  "enum": [
      +    "working-tree",
      +    "staged",
      +    "paths"
      +  ],
      +  "type": "string"
      +}
  2. First observedv0.3.35

TDQS

A4/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true and openWorldHint=false, and the description adds non-obvious operational detail: the plan is built in a temporary worktree against HEAD, so the working checkout is not disturbed, and the result is explicitly "not a passing receipt." That framing prevents an agent from treating the output as verification evidence. It does not discuss cost, cleanup, or behavior on a dirty/locked repo, so it is short of 5.

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?

Front-loads what is inspected and returned in the first sentence, then handles the non-test caveat and the scope-specific mechanics. No filler, no restating the tool name, and the safety-relevant "not a passing receipt" warning sits high in the text.

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

Completeness4/5

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

With three optional params and no output schema, the description carries the return-value burden and does name the payload: affected-test plan, fallback reasons, and the single verify command. What is missing is the shape of that plan (fields, per-test rationale) and what a fallback reason looks like, which matters given no output schema exists.

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 100%, so the schema already defines all three parameters including the enum meanings. The description restates the staged/paths semantics ("plans HEAD plus only the index or only the given files in a temporary worktree") but adds only the worktree context, not new argument formats or constraints. Baseline 3 is 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?

Specific verb+resource: "Inspect current staged, unstaged and non-ignored untracked changes and return a snapshot-bound affected-test plan and fallback reasons." The clause "Runs no tests; a plan is not a passing receipt" behaviorally separates it from diffci_run_affected_tests, but no sibling is named outright, so an agent must infer the routing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a concrete trigger: "use it before a commit when other sessions share the checkout," and clarifies the produced artifact is a plan plus one verify command, not a test result. It stops short of stating when not to use it (e.g. after a run, or when a plain file listing suffices), leaving the agent to infer the boundary with diffci_changed_files/diffci_run_affected_tests.

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