Skip to main content
Glama

compare_scans

Compare a base scan and a comparison scan to reveal differences in engines, severity counts, matched findings, SAST files/LOC, and stored SCA packages.

Instructions

Compare two scans, e.g. a cx pipeline scan (base) and a trigger_scan_local scan of the same commit (compare). Reports the engines that ran, per-engine counts by severity, findings matched by similarityId, SAST findings per file, SAST LOC, and the stored SCA packages with their direct, dev and test flags. differences lists what differs; it is empty when the scans match.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "baseScanId": "<baseScanId>",
      "compareScanId": "<compareScanId>"
    },
    "name": "compare_scans"
  }
}

Input Schema

NameRequiredDescriptionDefault
maxItemsNoMax findings, files and packages listed per difference
baseScanIdYesScan to compare against, e.g. the pipeline scan
compareScanIdYesScan to compare, e.g. the local MCP scan
hideDevAndTestDependenciesNoLeave SCA findings in dev and test dependencies out of both scans, same as cx --sca-hide-dev-test-dependencies

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it does substantial work: it discloses the exact comparison dimensions and, importantly, the semantics of `differences` being empty when the scans match. It does not explicitly state that the operation is read-only/no-side-effect, nor anything about permission requirements or how mismatched/incompatible scans are handled, which are the remaining gaps.

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?

Purpose is front-loaded in the first clause, and there is no filler. The long comma-separated enumeration of reported fields is dense and unstructured, reading as one run-on sentence rather than a scannable list, which slightly hurts readability for a tool with this many return dimensions.

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?

No output schema exists, so the description must explain return values, and it does so thoroughly (engines, severity counts, similarityId matching, SAST files and LOC, SCA packages with direct/dev/test flags, and the `differences` array). All parameters are covered by the schema; the only missing context is preconditions for a meaningful comparison (e.g., same project/commit) and error behavior for incompatible scans.

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 description coverage is 100%, so all four parameters are already documented, including the base/compare asymmetry and the hideDevAndTestDependencies flag with its cx CLI equivalent. The description reinforces which scan is base versus compare via the pipeline/local example but adds no syntax, format, or edge-case detail beyond the schema, so the baseline 3 applies.

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 immediately distinguishes the two roles with a concrete pairing example (pipeline scan as base vs. a trigger_scan_local scan of the same commit as compare). It also enumerates what gets compared (engines, per-severity counts, similarityId matches, SAST per-file and LOC, SCA packages), so an agent can tell this apart from single-scan siblings like get_scan or findings_summary.

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?

The 'e.g. a cx pipeline scan (base) and a trigger_scan_local scan of the same commit (compare)' framing gives a clear canonical scenario and implicitly routes the agent to trigger_scan_local when a local scan is needed first. It does not, however, state exclusions or prerequisites (same project, same commit, when to prefer get_scan instead), so it stops short of explicit when/when-not guidance.

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