Skip to main content
Glama

diffci_explain_selection

Read-only

Inspect uncommitted changes to generate a snapshot-bound affected-test plan and fallback reasons without running tests; returns the exact verify command for staged or path-scoped runs before commit.

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

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.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, and the description adds real context beyond that: no tests are executed, the plan is not a pass/fail receipt, the result is snapshot-bound, and staged/paths scopes are computed in a temporary worktree so the live checkout is untouched. Useful and non-obvious, though it doesn't address cleanup of the temp worktree or what "fallback reasons" means in practice.

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?

Front-loads what it inspects and returns, then the scope mechanics, then the when-to-use cue — no filler sentences. Dense jargon ("snapshot-bound", "passing receipt") costs a little immediate clarity but is mostly self-explanatory in context.

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 no output schema, the description does its job by characterizing the return value (plan plus fallback reasons plus the single follow-up command) and explicitly warning that a plan is not a passing receipt. The main residual gap is what the fallback reasons represent and how the plan should be interpreted.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the enum is documented, so the baseline is 3; the description goes further by explaining the consequence of each scope (HEAD plus index only, HEAD plus only the given files, computed in a temp worktree). That is meaning beyond the schema's one-line enum descriptions, though `repo` and the default working-tree behavior are left to the schema.

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

Purpose5/5

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

States a specific verb and resource ("Inspect current staged, unstaged and non-ignored untracked changes") and names the concrete output ("snapshot-bound affected-test plan and fallback reasons"). It also distinguishes itself from the execution siblings with "Runs no tests; a plan is not a passing receipt", so an agent can tell plan-generation from test-running without opening another schema.

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 an explicit trigger: "use it before a commit when other sessions share the checkout", and explains that the returned `diffci verify --staged`/`--paths` command is what actually runs the check. It stops short of explicitly naming a sibling to prefer for other situations, so the routing guidance is clear but not exhaustive.

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