LearnQuestion bank

Product wants your booking service available inside ChatGPT and Claude as an MCP-based app with interactive UI. Design it: which tools the model sees, what the UI does, authorisation and state, data minimisation, and how you measure success.

Applied LLMSystem designHard

Answer it yourself first, out loud or on paper, then compare.

Answer

Model answer, written in a candidate's voice

In short

  • Expose a small set of task-level tools (search availability, create hold, confirm, cancel) with precise descriptions and compact results, not every REST endpoint
  • Use host-rendered MCP Apps UI (ui:// resources in sandboxed iframes) for option choice and explicit confirmation before irreversible steps such as payment
  • Authorise with per-user OAuth scopes; under the stateless 2026 MCP spec there are no protocol sessions, so state travels as explicit hold/cart IDs passed as arguments, with idempotency keys on writes
  • Treat model-supplied arguments and user-generated text as untrusted: validate, render injection-safely, and return only the fields the task needs
  • Measure tool-selection accuracy across hosts on realistic prompts, task completion, conversion and cancellation rates, latency and errors per tool call, and version tool schemas

In full

I would expose only a few task-level tools rather than mirroring the REST API: search_availability, create_hold, confirm_booking and cancel_booking, each with a precise description, strict input schema and a compact result containing just the fields the next step needs. The interactive part would be host-rendered MCP Apps UI, ui:// resources rendered in sandboxed iframes, used to let the user pick dates, seats or options and to require an explicit confirmation before any irreversible action such as payment or final booking. Authorisation would be per-user OAuth with narrow scopes, and because the 2026 MCP spec is stateless there are no protocol sessions, so the hold or cart ID is passed explicitly as an argument on each call and every write carries an idempotency key so retries do not double-book. I would treat every model-supplied argument and any user-generated text as untrusted, validate it server-side, render it injection-safely, and return only the data the task needs rather than raw records. Success would be measured by tool-selection accuracy across ChatGPT and Claude on realistic prompts, end-to-end task completion, conversion and cancellation rates, latency and error rate per tool call, and by versioning the tool schemas so changes are rolled out and compared deliberately.

Checked against sources by an independent AI reviewer.

What a strong answer covers

  • Exposes a few task-level tools (search availability, hold, confirm, cancel) with precise descriptions and concise results, rather than every REST endpoint
  • Uses host-rendered UI (MCP Apps: ui:// resources in sandboxed iframes) for choosing options and for explicit user confirmation of irreversible steps such as payment
  • Authorisation with per-user OAuth scopes; no protocol sessions under the stateless 2026 MCP spec, so state travels as explicit handles (hold or cart IDs) passed as arguments, with idempotency keys on writes
  • Treats model-supplied arguments and any user-generated text it returns as untrusted (validation, injection-safe outputs) and returns only the data the task needs
  • Measures tool-selection accuracy across hosts on realistic prompts, task completion, conversion and cancellation rates, latency and errors per tool call, and versions tool schemas

Common mistakes

  • Letting the model complete a payment without an explicit confirmation step in the UI
  • Returning full customer records to the model when a summary would do

Follow-ups

  • Some regions do not have the app platform yet. How do you handle availability and data-protection differences?