Skip to main content
Glama

canon_diff

Compares before and after AuditReports to report per-R movement (fixed, regressed, unchanged) and hashes, verifying an edit improved compliance without regressing other invariants.

Instructions

Canon — diff two AuditReports (before / after) and return per-R movement (fixed, regressed, unchanged) plus before/after hashes. Use to verify that an edit improved Canon compliance without regressing other invariants. Reference: ivd/canon_layer.md §Audit diff.

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

Input Schema

NameRequiredDescriptionDefault
afterYesAuditReport from canon_check on the revised text.
beforeYesAuditReport from canon_check on the original text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.1.2

TDQS

A4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It discloses the useful behavioral detail of per-R classification (fixed, regressed, unchanged) plus hashes, but never says whether the operation is read-only, what happens if before/after were produced under different rule sets or canon versions, or how incomparable reports are handled.

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 short sentences with zero waste: what it does first, when to use it second, and a reference pointer last. Nothing is buried and no sentence merely restates the name.

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?

With no output schema, the description does the needed work by naming the return shape (per-R movement categories and before/after hashes), and the nested parameters are fully documented in the schema. It stops short of covering report-compatibility or failure conditions, which matters somewhat for a tool consuming two independently produced report objects.

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 both nested-object parameters are already described as AuditReports from canon_check on the original and revised text. The description reinforces the before/after ordering and the audit origin but adds no syntax or structural 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: diff two AuditReports and return per-R movement (fixed, regressed, unchanged) plus before/after hashes. It also implicitly separates itself from canon_check by identifying that tool as the producer of the input reports, so an agent can tell which one to call for which job.

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 a clear when-to-use condition: verify that an edit improved Canon compliance without regressing other invariants. It does not state exclusions or name an alternative for the case where only a single audit is needed, but the context is unambiguous for a diff tool.

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