Skip to main content
Glama

diff_openapi_breaking_changes

Read-onlyIdempotent

Compares baseline and candidate OpenAPI/Swagger specs in JSON or YAML to identify breaking changes and recommend SemVer bumps.

Instructions

Audits OpenAPI 3.0/3.1 and Swagger 2.0 specs (JSON or YAML) using contravariant request and covariant response variance rules (nullable, enum, required, status/auth changes) and recommends SemVer bumps.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "diff_openapi_breaking_changes"
  }
}

Input Schema

NameRequiredDescriptionDefault
basePathNoOptional local file path to the baseline OpenAPI/Swagger file when baseSpec is omitted.
baseSpecNoBaseline OpenAPI 3.0/3.1 or Swagger 2.0 specification text in JSON or YAML format.
headPathNoOptional local file path to the candidate OpenAPI/Swagger file when headSpec is omitted.
headSpecNoCandidate OpenAPI 3.0/3.1 or Swagger 2.0 specification text in JSON or YAML format.
onlyBreakingNoWhen true, omits non-breaking additions from the returned diff report.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so safety is covered. The description adds real substance by naming the variance model and the change categories it catches (nullable, enum, required, status/auth), but with no output schema it leaves the returned diff report structure and invalid-spec behavior unspecified.

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?

A single tight sentence with the verb and resource front-loaded and no filler. It is slightly overloaded with stacked jargon ("contravariant request and covariant response variance rules") that costs a beat of parsing at the outset.

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?

For a read-only two-input comparison tool with full schema coverage, most of what an agent needs is present. The gaps are the unstated baseline-vs-candidate framing and, absent an output schema, the description's thin account of what the returned diff report contains beyond a SemVer recommendation.

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 100%, so all five parameters are already documented in the schema, giving a baseline of 3. The description adds no extra semantics beyond restating accepted formats, and notably does not state precedence when both baseSpec and basePath are supplied.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Audits OpenAPI 3.0/3.1 and Swagger 2.0 specs ... and recommends SemVer bumps" gives a specific verb, resource, and supported input formats. What is missing is the plain statement that this compares a baseline against a candidate, and it never distinguishes itself from the similarly scoped sibling validate_contract_backward_compat.

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 only implied: an agent can infer it should be used when checking a spec change for breaking impact and wanting a SemVer recommendation. There is no explicit when-not guidance, no mention of how it relates to validate_contract_backward_compat or generate_api_release_changelog, and no prerequisite about supplying exactly one of baseSpec/basePath per side.

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