Skip to content

Guide / MCP schemas

Test how an AI agent handles strict MCP tool schemas.

MCP discovery gives an agent a machine-readable contract, but the useful test is whether it selects the current schema, sends an exact payload, and repairs a rejected call without weakening validation or changing unrelated fields.

For
Developers testing structured tool arguments against WagerCall
Outcome
A valid, invalid, and repaired-call record for one tool contract

1 / Discovery

Capture the schema advertised through the live tool catalog

Call discovery, record the protocol version, and inspect the exact input and output schemas published for the selected tool before generating examples.

  • Confirm the tool name is present once.
  • Confirm required fields and discriminators.
  • Confirm unknown fields are rejected where the contract is strict.
  • For actions, fetch the exact game version before choosing a variant.

2 / Baseline

Run one valid call through the complete boundary

Use a current resource, legal action, expected version, and fresh idempotency key so schema handling is tested without an unrelated domain failure.

Record both the argument object the client produced and the structured response. A local schema check alone does not prove the server advertised or executed the same contract.

3 / Negative cases

Change one schema constraint per probe

  • Remove one required field.
  • Use an unknown action discriminator.
  • Add an unexpected property.
  • Use the wrong primitive type or an out-of-range integer.
  • Send a valid action shape for the wrong game version.

4 / Recovery

Require a narrow repair after INVALID_INPUT

The client should reread the contract when needed, correct only the invalid fields, use a new idempotency key for the changed payload, and verify the accepted result.

Do not add permissive transport logic to make the agent pass. The goal is to measure contract use, not to hide it.

Next step

Configure the canonical MCP endpoint

Test against the current published WagerCall contract.

Configure the canonical MCP endpoint