Skip to main content
Glama

Diff inventories

diff_inventories
Read-onlyIdempotent

Compare two saved JSON test inventories to report added, removed, renamed, moved, and changed tests, dependencies, states, tags, and metadata without running tests or modifying files.

Instructions

Compares two complete saved JSON scans inside the project, without running tests or changing files. Reports additions, removals, renames, moves, code and dependency changes, states, tags and other metadata. Uses ids first, then unique body hashes and file, suite or dependency context; ambiguous matches remain added and removed. Use the same framework, root, patterns, filters and expandCases for both saved scans. Hash comparisons and rename matching are disabled across tool versions. Follow nextCursor for more changes. For Playwright, Vitest, Jest, Mocha, Jasmine, Cypress, WebdriverIO, node:test and Bun inventories. Example: {"before":"inventories/base.json","after":"inventories/head.json"}.

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": {
      "before": "<before>",
      "after": "<after>"
    },
    "name": "diff_inventories"
  }
}

Input Schema

NameRequiredDescriptionDefault
afterYesThe new complete JSON inventory, relative to the project root; at most 128 MiB.
limitNoThe most items to return.
beforeYesThe old complete JSON inventory, relative to the project root; at most 128 MiB.
cursorNonextCursor from the previous answer, for the next page. Keep the other arguments the same.

Output Schema

NameRequiredDescriptionDefault
hintYes
toolYes
totalYesAll matching items, on every page.
changesYes
summaryYesCategory counts overlap; changed counts matched tests, while unchanged counts matches with no changes.
warningsYes
frameworkYes
nextCursorYes
schemaVersionYes
afterToolVersionYes
hashesComparableYes
beforeToolVersionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world, so the safety bar is low; the description nonetheless adds real behavior: id-first matching falling back to unique body hashes and file/suite/dependency context, ambiguous matches left as added+removed, and hash/rename matching disabled across tool versions. Those are non-obvious rules an agent must know to interpret results, though the response shape and limits are left to the output schema.

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 purpose, then matching rules, then constraints, then pagination, then supported frameworks, then an example — a sensible order. It is dense but nearly every sentence carries functional information; the long framework roster is the only borderline filler, though it usefully bounds applicability.

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?

For a four-parameter comparison tool with full schema coverage, an output schema, and complete annotations, nothing essential is missing: inputs, matching semantics, cross-version caveats, and pagination are all covered. Return details can safely be delegated to the output schema.

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, but the description adds meaning beyond it: the before/after pair must share the same framework, root, patterns, filters and expandCases, and cursor must be reused with otherwise unchanged arguments. The inline example also clarifies that both paths are project-relative inventory files.

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?

The opening sentence names a specific verb and resource (compares two complete saved JSON scans) and immediately scopes it with 'without running tests or changing files', which separates it from scan/test-running siblings like scan_diagnostics and find_tests. It also enumerates what the diff reports, so an agent knows the output domain before 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 Guidelines4/5

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

Gives concrete usage context: both scans must be saved complete inventories, and both must use the same framework, root, patterns, filters and expandCases. It also directs pagination via nextCursor. It stops short of naming an alternative tool for the case where no saved inventory exists, so no explicit when-not guidance.

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