Skip to main content
Glama
Specwise MCP Server

Specwise MCP Server

diff_openapi

Read-onlyIdempotent

Compare two OpenAPI 3.x documents to classify each change as breaking, warning, non-breaking, or info, flag breaking changes, and suggest the SemVer version bump.

Instructions

Compare two OpenAPI 3.x documents. Each change is breaking, warning, non-breaking or info; breaking says whether any is breaking, and semver suggests the version bump.

Typical use after editing a spec: revision_path="openapi.yaml", base_git_ref="main".

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

Input Schema

NameRequiredDescriptionDefault
baseNoThe old version, as YAML or JSON text (or a JSON object).
revisionNoThe new version, as YAML or JSON text (or a JSON object).
base_pathNoThe old version as a local file. Uploaded to the Specwise API; only *.yaml, *.yml or *.json inside the working directory (or SPECWISE_MCP_ROOT) are read.
base_git_refNoUse revision_path as it is at this git ref (e.g. main, HEAD) as the base. A branch, tag or commit; the file is read with `git show` and uploaded to the Specwise API.
revision_pathNoThe new version as a local file. Uploaded to the Specwise API; only *.yaml, *.yml or *.json inside the working directory (or SPECWISE_MCP_ROOT) are read.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.2.6
    • changedInput schema / properties / base_git_ref / description
      Previous value: -"Use revision_path as it is at this git ref (e.g. main, HEAD) as the base."New value: +"Use revision_path as it is at this git ref (e.g. main, HEAD) as the base. A branch, tag or commit; the file is read with `git show` and uploaded to the Specwise API."
    • changedInput schema / properties / base_path / description
      Previous value: -"The old version as a local file."New value: +"The old version as a local file. Uploaded to the Specwise API; only *.yaml, *.yml or *.json inside the working directory (or SPECWISE_MCP_ROOT) are read."
    • changedInput schema / properties / revision_path / description
      Previous value: -"The new version as a local file."New value: +"The new version as a local file. Uploaded to the Specwise API; only *.yaml, *.yml or *.json inside the working directory (or SPECWISE_MCP_ROOT) are read."
  2. First observedv0.2.2

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), so the description earns credit for the value-add: it discloses the result taxonomy (breaking / warning / non-breaking / info) and names two derived output fields, `breaking` and `semver`, which the agent would otherwise have to guess. It says nothing about error handling, input size limits, or what happens for non-3.x inputs, which is the remaining gap.

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 short blocks: the core action and result contract first, then a usage example. No filler, no restatement of the tool name, and the example is placed after the primary explanation where it belongs.

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 carries the return-value burden and does so by naming the change classes and the `breaking`/`semver` fields. Combined with fully documented parameters and clear annotations, an agent has enough to call this correctly; only failure modes and input-precedence rules are missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so parameter documentation is already handled; the baseline would be 3. The description goes beyond that by demonstrating a valid composition of two optional parameters (revision_path with base_git_ref), which is non-obvious given five all-optional params and no required fields. It does not clarify mutual exclusivity or precedence among base, base_path and base_git_ref.

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 plus the version scope: "Compare two OpenAPI 3.x documents." The compare/diff action is intrinsically distinct from the validate_openapi and validate_json_schema siblings, so an agent can select it without opening any 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?

Gives a concrete triggering scenario ("Typical use after editing a spec") with a worked parameter pairing, which tells the agent when to reach for it. It stops short of stating when to prefer validation or how to choose between the inline (base/revision) and file/git input modes.

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

Deploy Server

Other Tools