Skip to main content
Glama

Thmenu

Place an order

place_order
Idempotent

Place an order against the agent_session_id from start_order_session. Atomically inserts the order + items, applies server-side canonical pricing + tax (do NOT trust the unit_price you compute — we re-read it from D1), decrements inventory, optionally redeems a promo code, and creates a Stripe hosted Checkout Session so the customer can pay + authenticate on their own device. Returns order_id, total_cents (tax-inclusive), currency, promo_discount, and a hosted_confirm_url (a Stripe checkout link) to share with the human. Idempotency-Key header REQUIRED.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNoOptional order-level note (max 500 chars).
itemsYes
room_idNoDiamond tier only — hotel room id.
table_idNoOptional table id when ordering at a table.
guest_nameNoRequired when room_id is set.
order_typeNoChannel: 'dine_in' (default — table or room) or 'takeaway' (pickup; requires customer_name + customer_phone, ignores table_id/room_id, only when the restaurant has takeaway enabled — else channel_not_available). Delivery is not offered to agents.
promo_codeNoOptional promo code to redeem at order time (validate first with apply_promo). The redemption slot is consumed only when this order lands.
customer_nameNoRequired for takeaway — who picks the order up.
customer_phoneNoRequired for takeaway — reachable phone (digits, +, spaces/dashes tolerated).
agent_session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: reveals canonical server-side pricing (do NOT trust computed unit_price), atomic transaction semantics, inventory decrement, optional promo redemption, Stripe hosted Checkout flow, the returned fields, and that an Idempotency-Key header is REQUIRED. This adds substantial behavioral context not present in the structured fields.

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

Conciseness4/5

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

Front-loads the core action and builds outward through effects, returns, and the idempotency requirement with little waste. It is dense with compound clauses but nearly every clause conveys necessary behavior.

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?

For a 10-param mutation with no output schema, the description supplies the missing return shape (order_id, total_cents, currency, promo_discount, hosted_confirm_url), prerequisites, side effects, and the idempotency requirement. Nothing an agent needs to invoke it correctly is missing.

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 description coverage is already 80%, so the schema carries most parameter meaning (order_type channel rules, guest_name, promo_code). The description still adds value on promo_code redemption timing (slot consumed only when the order lands) and the pricing semantics, exceeding the baseline 3.

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 (place) and resource (order) and enumerates the concrete effects: atomic insert of order+items, server-side pricing/tax, inventory decrement, promo redemption, and Stripe Checkout creation. It is clearly distinguished from siblings like start_order_session (the prerequisite) and apply_promo (validation).

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

Usage Guidelines4/5

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

Names the prerequisite source of agent_session_id (start_order_session) and instructs to validate promo codes with apply_promo first, plus notes delivery is unavailable to agents. It stops short of explicitly contrasting place_order with create_cart/get_cart, so the routing to alternatives is implied rather than complete.

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.

Resources