Skip to main content
Glama

Diff contracts

diff_contracts

Compare two contract versions and classify every change as breaking or compatible, with rule, field path, before/after values, and severity to assess API change impact.

Instructions

Compare two versions of a contract (any supported format) and classify every change as breaking or compatible, with the rule, field path, before/after and severity. Example: base_spec='origin/main:openapi.yaml', head_spec='openapi.yaml'.

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": {
      "base_spec": "<base_spec>",
      "head_spec": "<head_spec>"
    },
    "name": "diff_contracts"
  }
}

Input Schema

NameRequiredDescriptionDefault
base_specYes
head_specYes
breaking_onlyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/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 shape of the result (rule, field path, before/after, severity) and the breaking/compatible taxonomy, which is valuable; but it never states that it is a read-only operation, doesn't name which formats are 'supported', and says nothing about failure modes when a spec path cannot be resolved.

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 core comparison and its output shape, followed by a compact concrete example. No redundant restatement of the tool name or title, and every clause adds information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, no annotations, and 0% parameter coverage, the description does a fair job by informally describing the return fields and giving a usage example. It falls short on the undocumented `breaking_only` flag and on which contract formats are actually supported, both of which an agent needs before calling.

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 0%, so the description must compensate. The example (`origin/main:openapi.yaml`) is genuinely useful, revealing a '<git-ref>:<path>' syntax for base_spec/head_spec that the schema does not convey. But `breaking_only` is never mentioned, leaving one of three parameters—a behavior-changing filter—entirely undocumented.

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 versions of a contract") plus the exact classification semantics it produces (breaking vs. compatible, with rule, field path, before/after, severity). The 'two versions of a contract' framing distinguishes it implicitly from sibling checks like check_live_conformance and check_deployed_contract, which operate on live/deployed state rather than a version pair.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Usage is implied by 'compare two versions of a contract', and the example shows a realistic invocation shape. However, there is no explicit when-to-use statement, no exclusion of alternatives (assess_impact, check_live_conformance), and no prerequisite such as when to prefer this over an impact assessment.

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