Build: synchronous APIs
Build the request/response surface: REST and GraphQL endpoints shaped so an agent can call them as MCP tools.
Intent Endpoint (over CRUD)
One intent-named endpoint performs a whole business operation atomically, where a chatty sequence of CRUD calls leaves a window of partial state an agent can observe and act on incorrectly.
Search over Pagination
A typed-filter search call returns exactly the matching orders directly, measured against a raw pagination sweep that must scan page after page to find the same records.
Batch Operation and Count Flag
An id-keyed batch endpoint resolves many identifiers in one call with explicit misses, and a count endpoint answers how many with a bare number, each measured against the one-at-a-time and fetch-everything alternatives they replace.
Idempotency and Safe Retries
A required Idempotency-Key header, enforced by a server-side Idempotent Consumer, replays the first response byte for byte on a repeat key and rejects the same key reused with a different body, where an unguarded retry places a second order.
Strict Self-Describing Contract (OpenAPI 3.1)
A precise OpenAPI 3.1 document, generated from the code and kept in sync with it, is the contract an agent actually reads before calling a tool.
Semantic Metadata and llms.txt + Dual-Use Portal
A machine-readable llms.txt and a shared portal serve a browsing human and a reading agent from the same source, instead of two surfaces drifting apart.
Token-Efficient Response / Agent BFF
A backend-for-frontend layer shapes a response for the token budget an agent actually has, instead of returning a human-facing payload unchanged.
Instructive Error (RFC 9457)
An RFC 9457 problem response names what was wrong and what to try next, instead of a bare status code an agent cannot act on.
Propose/Preview/Commit
A preview step lets an agent see the effect of a write before committing it, so an irreversible action is never the first thing that happens.
MCP-First Single CDI Bean
One CDI bean serves REST, GraphQL and an MCP tool from the same business logic, so the three surfaces never drift apart.