Skip to main content
Glama

validate_contract_backward_compat

Read-onlyIdempotent

Checks candidate OpenAPI specs or JSON payload samples against baseline thresholds to flag backward-incompatible changes before mobile or mini-program release.

Instructions

Evaluates a boolean CI gate checking candidate OpenAPI specs or JSON payload samples against mobile/mini-program backward-compatibility thresholds.

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

Input Schema

NameRequiredDescriptionDefault
modeNoContract parsing mode: auto, openapi, or payload (defaults to auto).
basePathNoOptional local file path to the baseline spec or JSON payload sample.
baseSpecNoBaseline OpenAPI/Swagger spec or JSON payload sample text.
headPathNoOptional local file path to the candidate spec or JSON payload sample.
headSpecNoCandidate OpenAPI/Swagger spec or JSON payload sample text.
strictMobileGateNoWhen true (default), treats HIGH hazards such as response enum widening as release-blocking.
minCompatibilityScoreNoMinimum compatibility score (0-100) required to pass the gate (defaults to 100).
allowResponseEnumWideningNoWhen true, exempts response enum additions if client decoders gracefully handle unknown values.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/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 genuinely useful framing that this returns a pass/fail gate verdict rather than a change report, and that thresholds are mobile/mini-program specific, but it says nothing about hazard reporting, failure details, or how scoring is produced beyond the schema.

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 dense sentence with no filler, and the core idea (boolean gate over candidate vs baseline) is front-loaded. It is tightly packed but still parseable on one read.

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 an 8-parameter tool with no output schema, the description covers the what and the pass/fail nature of the result, and the schema fills in all parameter detail. It leaves open how baseline/candidate are paired when both path and inline spec are supplied, and what a failing verdict contains, which an agent would want to know before invoking.

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 the enum mode, path/spec pairs, strictMobileGate and minCompatibilityScore are all already documented in the schema. The description only restates the two input flavors (OpenAPI spec vs JSON payload sample) and the mobile/mini-program threshold notion, adding little beyond the schema — baseline 3 applies.

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?

The sentence gives a specific verb ('Evaluates') and a clear object (a boolean CI gate checking candidate OpenAPI specs or JSON payload samples against mobile/mini-program thresholds), which is enough to tell it apart from a pure diff tool like diff_openapi_breaking_changes. It stops short of explicitly naming or contrasting with those siblings, so it is clear but not fully differentiated.

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

Usage Guidelines2/5

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

'CI gate' implies a pipeline/pass-fail context, but the description never states when to prefer this over diff_openapi_breaking_changes or diff_json_payload_samples, nor when not to use it. No prerequisites, no alternatives, and no exclusion conditions are given.

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