Skip to main content
Glama

openapi_diff

Read-onlyIdempotent

Compares two local OpenAPI specs to classify semantic contract changes as breaking or non-breaking, helping identify compatibility risks before API updates.

Instructions

Compare two local OpenAPI specs (base_spec_path vs target_spec_path) and classify semantic contract changes into breaking vs non-breaking.

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_path": "<base_spec_path>",
      "target_spec_path": "<target_spec_path>"
    },
    "name": "openapi_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
rootNoWorkspace for both specs. When a server root is configured, this path must remain within it.
max_bytesNoUTF-8 budget for diff JSON (default: 16384).
base_spec_pathYesPath to the baseline OpenAPI spec inside the workspace.
target_spec_pathYesPath to the target/updated OpenAPI spec inside the workspace.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is covered. The description adds that change classification is semantic and binary (breaking vs non-breaking), but says nothing about failure behavior on malformed specs or about what happens when the diff exceeds max_bytes (truncation?), which matters since it is a silent size budget.

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?

A single sentence with the primary action and the two key parameters front-loaded, and zero filler. Nothing could be removed without losing meaning.

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?

For a four-parameter, read-only diff tool with no output schema, the description conveys enough to call it correctly: both required paths and the nature of the returned classification. Gaps are edge-case behavior (invalid spec, size budget) rather than core invocation guidance.

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 four parameters are already documented. The description only restates base_spec_path and target_spec_path in comparison framing; it adds no detail on ordering effects, root/workspace constraints, or max_bytes behavior beyond the schema.

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?

States a specific verb ("Compare") plus the resources compared ("two local OpenAPI specs") and the output classification ("breaking vs non-breaking"). It is clearly distinct from the sibling openapi_query, though it never names that alternative explicitly.

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 the semantics of comparing a baseline against a target spec, which is enough to infer intent. There is no explicit when-to-use statement, no exclusion, and no pointer to openapi_query for the query case.

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