check_api_contract
When: you hold an API contract and want it checked. Gives: spec → is this OpenAPI 3.x document valid (required fields, unique operationIds, undeclared $ref, missing 2xx; errors with JSON pointers); schema + value or values → does each JSON value satisfy this JSON Schema (draft-07 subset; a keyword it cannot evaluate reads INCONCLUSIVE, never valid). One gate per check, the worst on top. Deterministic, no network. Does not prove: that the running API returns what the spec says (pass a real response as value against its schema), nor anything about keywords outside the subset.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"value": {
"id": "ord_1"
},
"schema": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
}
}
}
},
"name": "check_api_contract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | No | OpenAPI 3.x document, JSON or YAML text, or the parsed object. | |
| value | No | One JSON value to check against schema (a scalar as JSON text, e.g. "0"). | |
| schema | No | JSON Schema, text or object. | |
| values | No | Several values, e.g. responses captured from the API; each checked. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gate | No | ||
| checks | No | ||
| verdict | No | ||
| next_steps | No |