Skip to main content
Glama

preview_order

Preview a DoorDash cart's real total, fee breakdown, tips, delivery ETAs, credits, and payment card before ordering; re-run after any cart change. Read-only and no charge.

Instructions

Authoritative pricing + logistics for a cart (read-only, no charge): display_summary (show VERBATIM to the user), quote {net_total_before_tip = the real total, line_items fee breakdown, tips_suggestion (cents), delivery_availability ETAs, credits, PIN requirement, work budgets}, and default_card (name it by display_name). Re-run after ANY cart change. Pass include_work_benefits when the user mentions work/office/company/team/expense or delivers to a Work address. Budget checks: compare the user's cap against net_total_before_tip (tip adds on top).

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": {
      "cart_uuid": "<cart_uuid>",
      "intent": "<intent>"
    },
    "name": "preview_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
intentYesOne short line stating who this is for and the goal, e.g. 'Help the user order dinner'. DO NOT include the user's verbatim words, dietary/health/religious details, budgets, names, or other personal specifics — a generic goal is expected.
card_idNoPrice this order on a specific saved card (card_id from list_payment_methods). ASAP orders only — ignored with scheduled_time. Pass the SAME card_id to submit_order, or submit charges whatever the account default is then. Does NOT change the account default; use set_default_payment_method for that. Needs dd-cli >= 0.2.6.
priorityNoRequest Priority (express) delivery — a paid, faster upgrade. Delivery-only; incompatible with pickup and scheduled_time. Verify quote.delivery_availability.delivery_options[] contains delivery_option_type 'PRIORITY' before promising it; pass the same flag at submit.
cart_uuidYesCart UUID
fulfillmentNoMUTATES the cart's mode before pricing — only pass when the user explicitly asked to switch
scheduled_timeNoISO 8601 UTC (e.g. 2026-07-19T23:00:00Z) for scheduled delivery; omit for ASAP
no_apply_creditsNoOpt OUT of applying DoorDash credits (they apply by default — do not prompt about them). Pass ONLY when the user explicitly asks not to use credits; all-or-nothing; pass the same flag at submit.
selected_budget_idNoApply a specific work budget id from a prior preview
include_work_benefitsNoSet on ANY work/company/team/expense signal

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.0
    • addedInput schema / properties / card_id
      Added value: +{
      +  "description": "Price this order on a specific saved card (card_id from list_payment_methods). ASAP orders only — ignored with scheduled_time. Pass the SAME card_id to submit_order, or submit charges whatever the account default is then. Does NOT change the account default; use set_default_payment_method for that. Needs dd-cli >= 0.2.6.",
      +  "type": "string"
      +}
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior2/5

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

The description does add real behavioral context (display_summary must be shown verbatim, tips are in cents, tip is added on top of net_total_before_tip, default_card identified by display_name). But its headline claim 'read-only, no charge' conflicts with annotations (readOnlyHint=false) and with its own schema, which states the fulfillment parameter 'MUTATES the cart's mode before pricing' — a side effect the description never discloses.

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-loaded with the key distinction (read-only vs submit) and the budget rule at the end. It is a dense single run-on block with heavy parenthetical nesting, so some effort is needed to parse, but very little of the content is filler.

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

Completeness4/5

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

Nine parameters, no output schema, open-world tool — the description compensates well by describing the return shape (net_total_before_tip, line_items fee breakdown, delivery_availability ETAs, credits, PIN, work budgets) and the verbatim-display obligation. The remaining gap is the undisclosed cart-mode mutation triggered by fulfillment.

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 100%, so baseline is 3, but the description adds decision-level meaning the schema lacks: the work/office/expense signal pattern for include_work_benefits and the rule to compare the cap against net_total_before_tip rather than the tip-inclusive total. It does not explain cart_uuid, intent, or selected_budget_id beyond what the schema already says.

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+resource (authoritative pricing + logistics for a cart) and immediately separates itself from submit_order by declaring 'no charge'. It also enumerates the three things returned (display_summary, quote, default_card), so the agent knows exactly what this call yields before opening any 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?

Explicit triggers throughout: 'Re-run after ANY cart change', 'Pass include_work_benefits when the user mentions work/office/company/team/expense or delivers to a Work address', and the budget-check procedure comparing the user's cap to net_total_before_tip. Alternatives (set_default_payment_method, submit_order) are named where confusion is likely.

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