Skip to main content
Glama

ai_guard_scan_diff

Read-only

Scan current on-disk Git changes, including untracked files, to report tests weakened by the change and flag deleted, skipped, focused, or altered tests.

Instructions

Scan current on-disk Git changes, including untracked files, and report tests the change weakened. staged selects paths, not index contents.

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

Input Schema

NameRequiredDescriptionDefault
baseNo
presetNoagent
stagedNo
maxIssuesNoMax findings returned, errors first. Totals always count every finding; truncation is reported as RESULT_LIMIT.
testIntegrityNoAlso report tests the change deleted, skipped, focused or weakened

Output Schema

NameRequiredDescriptionDefault
baseNo
cleanYes
errorsYes
issuesYes
presetYes
statusYes
successYes
scanModeYes
truncatedYes
durationMsYes
totalErrorsYes
totalIssuesYes
changedFilesYes
filesScannedYes
testIntegrityNo
totalWarningsYes
inlineSuppressionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/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, so safety is covered. The description adds genuinely non-obvious behavior: untracked files are included, and 'staged selects paths, not index contents' warns that the flag does not scan staged blob content. It omits prerequisites (must be inside a Git repository) and whether a test runner must be configured.

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?

Two dense sentences with the core scope front-loaded and no filler. The trailing staged clause is valuable but terse to the point of being cryptic on first read ('selects paths, not index contents').

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?

An output schema exists, so return values need no explanation, and the safety profile is carried by annotations. For a five-parameter tool at 40% schema coverage, though, the description should at least sketch what `base` and `preset` mean and note the Git-repository prerequisite.

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 40%, so the description needs to compensate and only partly does. It meaningfully explains `staged` (path selection only, not index contents) and gestures at `testIntegrity` via 'tests the change weakened', but `base` and `preset` are left entirely to the schema, and `maxIssues` is only documented in the schema itself.

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 names a specific verb and resource: scanning current on-disk Git changes, including untracked files, and reporting weakened tests. That scope statement implicitly separates it from whole-project or single-file scan siblings, though it never names an alternative 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?

Usage is only implied: the phrase 'current on-disk Git changes' tells the agent this is the working-tree/diff scanner, and the staged note clarifies one mode's behavior. There is no explicit 'use this when…, use X instead when…' routing against ai_guard_scan_project, ai_guard_scan_file, or ai_guard_verify_change.

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