Skip to main content
Glama

Inventory diff

diff_inventory
Read-onlyIdempotent

Compare two inventory commits to identify added, removed, or changed nodes and edges before merging a PR that touches inventory.yaml.

Instructions

Diff two ingested inventory commits (fromSha to toSha): added/removed nodes and edges. Returns { added, removed, changed }. Requires inventory_v2. Read-only. Use before merging a PR that touches inventory.yaml to see what changed; use get_inventory for the current snapshot.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toShaYesNewer commit SHA (the candidate to diff to)
fromShaYesOlder commit SHA (the baseline to diff from)
projectIdNoProject UUID — defaults to configured project (`project_id` is accepted too.)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.12
    • changedInput schema / properties / projectId / description
      Previous value: -"Project UUID — defaults to configured project"New value: +"Project UUID — defaults to configured project (`project_id` is accepted too.)"
  2. Changed1 schema field changedv0.1.10
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. Addedv0.1.2

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, so the description's 'Read-only' is redundant but consistent. It adds genuine value by stating the prerequisite ('Requires inventory_v2') and the exact return shape ('{ added, removed, changed }'), which is critical since there is no output schema. These details go beyond what annotations provide.

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?

Two tight sentences, no filler. The core purpose and return format are front-loaded, followed by usage context and sibling routing. Every sentence earns its place.

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?

For a diff tool with no output schema, the description adequately covers the return shape, prerequisite, and usage context. It could elaborate on edge cases (e.g., what 'changed' encompasses or error conditions), but given the tool's simplicity and the annotations covering safety, this is sufficiently complete for an agent to call it correctly.

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 100% with descriptions for all parameters, so the description need not re-explain them. It mentions fromSha and toSha in the narrative but adds no semantic detail beyond the schema's descriptions. The baseline of 3 applies because the schema carries the semantic load.

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 ('diff') and resource ('inventory commits') with a clear scope (fromSha to toSha, added/removed nodes/edges). Explicitly differentiates from sibling get_inventory by calling out the current snapshot alternative. Unambiguous and immediately actionable.

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?

Provides explicit when-to-use guidance ('before merging a PR that touches inventory.yaml') and names the alternative tool (get_inventory) with its distinct purpose. No ambiguity about when this tool should be selected.

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