Clearer previews and menu retries

MCP

Two changes to what the MCP tools return, both about saying plainly what Layout already knows.

preview.outcome

A preview from the order tool now carries preview.outcome: ready, needs_location, closed, closing_soon, not_orderable or blocked. Branch on it instead of combining needsLocation, blocked and the note fields yourself.

{
  "action": "preview",
  "preview": {
    "outcome": "ready",
    "resolved": { "name": "Layout test kitchen", "address": "1 Market St, San Francisco, CA", "placeId": "…" },
    "sayToUser": "On it: Layout test kitchen at 1 Market St, San Francisco."
  }
}

When the person names a street and exactly one open branch sits on it, the preview now resolves that branch instead of asking which one. A branch they already picked is never replaced. See What a preview concluded.

When to read a menu again

If your app connects a person over OAuth and calls menu, a menu Layout has just read is answered again from that read. When there is nothing to reuse, reading the same menu again within three minutes comes back limit_reached with retryAfterSec, the seconds until another read is allowed. Relay sayToUser, or order the item directly. Once the person's daily menu reads are used up, menu answers from general knowledge when it can (status: "knowledge", live: false), and otherwise comes back limit_reached with no retry time. See Reading a menu.

What to do

Nothing is required. If you branch on preview fields today, switching to outcome is simpler and keeps working as fields are added.

Breaking changes

None. outcome and retryAfterSec are new fields. A preview that used to ask which branch over a single option now comes back resolved for that branch, usually ready (or closing_soon when it is near closing).

All changes