Most “agent reliability” problems aren’t reasoning problems. They’re interface problems. We ask a model to behave like a careful API client, then hand it a blurry, prose description of the API and act surprised when it guesses.
The fix is unglamorous: give the model typed tools. A name, a strict input schema, a documented output. Not “you can search the order book” buried in a system prompt — an actual contract the runtime can validate.
Prose is lossy, schemas are not
A prompt that says “pass the symbol and a side” leaves a dozen open questions: is it BTC or BTC-USD? Is side "buy" or 1? When the answer lives in a schema, the model stops inventing and starts conforming — and when it gets it wrong, you reject at the boundary instead of three steps downstream.
Make the wrong call impossible to express, and the model stops trying to express it.
What changed in practice
- Fewer retries. Validation errors are caught at the tool edge, with a precise message the model can act on.
- Smaller prompts. The contract carries the detail, so the system prompt shrinks to intent.
- Composability. Typed tools snap together across a swarm without anyone re-explaining the format.
The contract, in code
defineTool({
name: "order_book",
input: { symbol: z.string().regex(/^[A-Z]+-USD$/), depth: z.number().int().max(50) },
output: { bids: Level[], asks: Level[] },
});
None of this is novel. It’s just the boring discipline of treating the model like the capable, literal-minded client it is. Tighten the interface and most of the “magic prompting” evaporates.
That’s the whole thesis behind the MCP work in the Workshop: sharp, typed tools instead of blunt prompts. Honest tools, no theatre.