Skip to main content
Glama

Diff two snapshots

box_diff
Read-onlyIdempotent

Compare two sandbox snapshots to identify added, removed, and changed items by section, then write the full diff to a JSON file and return its host path.

Instructions

Compare two snapshots taken with box_snapshot in this sandbox run and list what was added, removed or changed in each section (up to 40 items per kind shown). Does not touch the sandbox; writes the full diff to \mail\out\diff--.json on the host and returns its path.

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

Input Schema

NameRequiredDescriptionDefault
afterYesName of the later snapshot, e.g. 'post'.
beforeYesName of the earlier snapshot, e.g. 'pre'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare readOnly/idempotent/non-destructive; the description adds two pieces of behavior they do not cover: output is truncated to 40 items per kind, and a side effect occurs outside the sandbox (a full diff written to <run>\mail\out\diff-<before>-<after>.json on the host, whose path is returned). It also reconciles that host write against readOnlyHint by stating it does not touch the sandbox.

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 sentences, front-loaded with the action and its scope, then behavior and outputs; no redundant restatement of the title or annotations.

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?

Given a 2-parameter read tool with no output schema, the description supplies everything needed: prerequisite sibling, truncation cap, the returned artifact path, and the side-effect location. Nothing an agent must know before calling is missing.

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% and already documents both parameters with examples ('pre', 'post'), so baseline 3 applies. The description adds only that the arguments are snapshot names matching the file naming pattern, not new syntax or constraints.

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?

Specific verb and resource ('Compare two snapshots... list what was added, removed or changed'), plus it ties itself to the sibling that produces its inputs (box_snapshot) so an agent can distinguish it from box_status/box_exec without opening a 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?

States the prerequisite context clearly: the snapshots must have been taken with box_snapshot in this sandbox run, and it names the before/after ordering. There is no explicit 'when not to use' or contrast with a live-state alternative, so it stops short of a 5.

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