Skip to main content
Glama

diff_reports

Compare two scans to see what a change introduced and what it resolved, and check whether a pull request gate would fail on new findings.

Instructions

Compare two scans and report what a change introduced and what it resolved. Ask this rather than summarize_report when the question is whether a change made things worse: a project with inherited findings answers 'what is wrong' the same way before and after, which says nothing about the change. Give failOnNew to learn whether a pull request gate would fail.

Input Schema

NameRequiredDescriptionDefault
limitNomaximum new findings to return; defaults to 20
basePathYespath to the results.sarif from the base revision
headPathYespath to the results.sarif from the revision being proposed
failOnNewNoreport whether a new finding at or above this would fail a gate, in either vocabulary: a priority band (P1-P4), which folds in the component's declared exposure and criticality, or a severity (critical, high, medium, low)

Output Schema

NameRequiredDescriptionDefault
newNo
noteNo
fixedNo
newCountYesfindings present in head and absent from base
wouldFailNotrue when a new finding meets failOnNew; only meaningful when failOnNew was given
fixedCountYesfindings present in base and absent from head
movedCountNofindings in both scans under a different component, as splitting or renaming a component reports them; neither new nor fixed, and no gate reads them
gateAppliedNothe threshold wouldFail was computed against

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

No annotations are provided, so the description carries the safety and behavior burden. It clearly describes comparison and reporting behavior and adds useful nuance about inherited findings and PR gate evaluation, though it does not explicitly state read-only status or side-effect profile beyond the inherent diff semantics.

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?

Three sentences, front-loaded with the core action and immediately followed by the sibling-routing condition and a parameter use case. Every sentence contributes specific guidance with no filler.

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

Completeness5/5

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

The tool is a report-diff operation with an output schema and fully described inputs, so return values and parameter formats do not need to be repeated. The description supplies the selection rationale, behavioral nuance, and gate-evaluation purpose an agent needs to invoke it correctly.

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%, so the baseline is 3 and the schema already documents basePath, headPath, limit, and failOnNew. The description adds meaningful intent for failOnNew by tying it to whether a pull request gate would fail, exceeding the schema's parameter definition.

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: compare two scans and report introduced versus resolved findings. It also explicitly distinguishes the tool from summarize_report by naming the question it answers better, so an agent can select it without opening the schema.

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

Usage Guidelines5/5

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

Gives a clear when-to-use rule: use this rather than summarize_report when the question is whether a change made things worse. It explains the inherited-findings failure mode and adds a concrete use case for failOnNew, leaving little ambiguity about routing.

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