Skip to main content
Glama

MenuNode

Prepare an order link with the cart filled in

prepare_order_link
Read-onlyIdempotent

Check a cart against today's menu and get a link to the restaurant's own order page with those dishes already in the cart (and pickup / delivery / dine-in already chosen when you pass fulfillment).The diner opens it, checks it and fills in their contact, pickup or delivery details and payment there. Nothing is ordered, saved or charged by this call and no personal data goes in, except avoid, which is not kept. Use it when you cannot verify the diner (emailed code) or pay for them; create_order is for placing the order yourself. Same lines as create_order: item_id from get_menu_structured, quantity, personalization_ids. Returns order_url (give it to the diner as is), estimated_total (the food at today's prices in currency; cover charge, delivery fee and coupons are added on the page), left_out (dishes that would not go in and why: not_on_menu, addon_unavailable, sold_out, notice = must be ordered days ahead, hours = not served right now, set_menu, preorder = only for set delivery dates (get_menu_structured category preorder; create_order scheduled on one of them, apart from other dishes), limit_reached with left = how many can still be ordered when known; absent for an online daily quota; combo = a combo or set meal sent without valid combo_option_ids (a step not answered, an option that ran out or is gone): send the option_ids from get_menu_structured combo_steps, or the diner picks on the page), accepting_now (an order for as soon as possible is taken right now) and scheduled_only (only an order for a later time is taken right now; the page offers it). Dishes are checked for right now, sections with their own hours (breakfast, lunch) included: a dish outside its section's hours is left out with hours even if the diner wants it later. The order_url has no language unless you pass language (the page then opens in the diner's own). Prices and availability are confirmed on the page. Fails with commerce_disabled where the restaurant takes no online orders (plan_required with its phone when it takes them by phone only). Pass avoid when the diner says what they cannot eat, through prepare_order_link or get_menu_structured before create_order: a create_order that needs no emailed code is already placed when it answers. Health information: never tell the diner a dish is safe or free of anything, whatever the answer; pass on the note of each line (note_id and add_ons_note_id, the text in avoid_notes) and tell them to confirm with the restaurant. Add-ons carry no allergen information. The kitchen does NOT receive avoid: only the allergy of create_order, sent with allergy_consent true, reaches it.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "restaurant_slug": "<restaurant_slug>",
      "items": "<items>"
    },
    "name": "prepare_order_link"
  }
}

Input Schema

NameRequiredDescriptionDefault
avoidNoWhat the diner must avoid, the same keys as get_menu_structured's avoid. Send it only if the diner said so. A warning for the diner, never refused: every line gets one answer per key (avoid_conflicts) and the order or the link stays as it is. peanuts and tree_nuts are separate; shellfish needs crustaceans and molluscs; any other allergy has no key: send the diner to the restaurant. Not put in the link and not saved, so the kitchen does NOT receive it: the diner answers the allergy question on the page or calls the restaurant.
itemsYes
branchNoLocation of a restaurant with several (get_restaurant_info.locations[].branch, e.g. "palermo"). Omit for the main location. Hours, contact, address, ordering and reservations differ per location.
languageNoMenu language: en | es | pt | fr. A language the restaurant does not offer falls back to its own language.
fulfillmentNoPreselect pickup, delivery or dine_in on the page (one of get_restaurant_info.ordering.fulfillment_options). Omit to let the diner choose; they can change it on the page.
restaurant_slugYes

Output Schema

NameRequiredDescriptionDefault
noteYes
currencyYes
languageYesLanguage of the page and of the dish names
left_outYes
order_urlYesThe restaurant's order page with the cart filled in: give it to the diner as is
avoid_notesNoOnly with `avoid`: the text of each note_id. Tell the diner the note of the dishes you mention; translate it if needed, but do not soften it.
fulfillmentYesThe way of ordering preselected on the page; null = the diner chooses
accepting_nowYesAn order for as soon as possible is taken right now (the verdict create_order applies, #452)
lines_in_cartYes
scheduled_onlyYesOnly an order for a later time is taken right now (closed or past the last order, with "order for later" on); the page offers it
avoid_conflictsNoOnly with `avoid`: one row per line, in the order of the lines; a line left out is not here. For the diner: it warns, never refuses, and the kitchen does NOT receive it. note_id could_not_check = the dish could not be read just now, not that the restaurant left it blank
estimated_totalYesFood in the cart at today's prices; cover charge, delivery fee, coupons and any discount for paying by transfer (get_restaurant_info ordering.transfer_discount_percent) are applied on the page, once the diner picks how to pay

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Adds a lot beyond the readOnly/idempotent annotations: nothing is ordered, saved or charged, avoid is not persisted, failure modes commerce_disabled and plan_required are named, and left_out reasons are enumerated. The health-safety instruction (never call a dish safe, add-ons carry no allergen info, kitchen only receives create_order's allergy) is unusually rich behavioral context. It stops short of 5 only because the return-side caveats are buried in the same dense run-on text.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and the create_order contrast are front-loaded, which is good, but the body is a wall of text — the left_out taxonomy, pricing caveats and health warnings are compressed into long parenthetical chains. Every fact earns its place individually, yet the packaging makes it hard to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

A 6-parameter tool with an output schema is covered thoroughly: failure modes, left_out semantics with per-reason meaning, pricing caveats on estimated_total, and the health-information rule. An agent has everything it needs to call it correctly and to relay the result to the diner.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 67%, and the description compensates: it explains that items follow the same lines as create_order, that fulfillment preselects a mode the diner can change, that language falls back, and that avoid is not kept or sent to the kitchen. That last point about avoid materially changes how an agent should use the parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Check a cart against today's menu and get a link to the restaurant's own order page with those dishes already in the cart.' It also immediately separates itself from create_order, so an agent can pick it without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit selection rule: 'Use it when you cannot verify the diner (emailed code) or pay for them; create_order is for placing the order yourself.' That is a when-to-use plus a named alternative with the deciding condition.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.