Skip to main content
Glama

doordash_place_order

Place a DoorDash order to complete your food delivery. This tool submits your cart for processing and charges your payment method.

Instructions

Place a DoorDash order. THIS WILL CHARGE YOUR CARD.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cart_idYesCart ID from doordash_checkout
tip_centsNoTip in cents (default 0)
payment_card_idNoPayment card ID
store_idNoStore ID (auto-detected)

Implementation Reference

  • Handler implementation for 'doordash_place_order' which invokes the checkout API to create an order.
    ({ cart_id, tip_cents, payment_card_id, store_id }) =>
      wrap(async () => {
        // Get fee tally for total
        const summary = await api.checkout.getFeeTally(cart_id);
        if (summary.totalCents === 0)
          return err("Could not determine order total.");
    
        // Resolve store ID
        let sid = store_id ?? "";
        if (!sid) {
          const carts = await api.cart.listCarts();
          sid = carts.find((c) => c.id === cart_id)?.storeId ?? "";
        }
    
        const result = await api.checkout.createOrder({
          cartId: cart_id,
          storeId: sid,
          totalCents: summary.totalCents,
          tipCents: tip_cents,
          paymentCardId: payment_card_id,
        });
    
        if (result.paymentStatus === "paid") {
          return ok(
            `Order placed and payment confirmed! Order ID: ${result.orderUuid}\nTotal: $${(result.totalCents / 100).toFixed(2)} (includes $${(result.tipCents / 100).toFixed(2)} tip)\n\nUse doordash_order_status to track.`,
          );
        }
        if (result.paymentStatus === "failed") {
          return err(
            `Order submitted but payment failed: ${result.errorMessage}`,
          );
        }
  • The "doordash_place_order" tool is registered and implemented in src/tools/index.ts. It calls the checkout API to create an order.
      "doordash_place_order",
      {
        description: "Place a DoorDash order. THIS WILL CHARGE YOUR CARD.",
        inputSchema: {
          cart_id: z.string().describe("Cart ID from doordash_checkout"),
          tip_cents: z
            .number()
            .optional()
            .default(0)
            .describe("Tip in cents (default 0)"),
          payment_card_id: z.string().optional().describe("Payment card ID"),
          store_id: z.string().optional().describe("Store ID (auto-detected)"),
        },
      },
      ({ cart_id, tip_cents, payment_card_id, store_id }) =>
        wrap(async () => {
          // Get fee tally for total
          const summary = await api.checkout.getFeeTally(cart_id);
          if (summary.totalCents === 0)
            return err("Could not determine order total.");
    
          // Resolve store ID
          let sid = store_id ?? "";
          if (!sid) {
            const carts = await api.cart.listCarts();
            sid = carts.find((c) => c.id === cart_id)?.storeId ?? "";
          }
    
          const result = await api.checkout.createOrder({
            cartId: cart_id,
            storeId: sid,
            totalCents: summary.totalCents,
            tipCents: tip_cents,
            paymentCardId: payment_card_id,
          });
    
          if (result.paymentStatus === "paid") {
            return ok(
              `Order placed and payment confirmed! Order ID: ${result.orderUuid}\nTotal: $${(result.totalCents / 100).toFixed(2)} (includes $${(result.tipCents / 100).toFixed(2)} tip)\n\nUse doordash_order_status to track.`,
            );
          }
          if (result.paymentStatus === "failed") {
            return err(
              `Order submitted but payment failed: ${result.errorMessage}`,
            );
          }
          return ok(
            `Order submitted. Order ID: ${result.orderUuid}\nPayment processing. Use doordash_order_status to check.`,
          );
        }),
    );
  • MCP tool registration for 'doordash_place_order' including input schema.
    server.registerTool(
      "doordash_place_order",
      {
        description: "Place a DoorDash order. THIS WILL CHARGE YOUR CARD.",
        inputSchema: {
          cart_id: z.string().describe("Cart ID from doordash_checkout"),
          tip_cents: z
            .number()
            .optional()
            .default(0)
            .describe("Tip in cents (default 0)"),
          payment_card_id: z.string().optional().describe("Payment card ID"),
          store_id: z.string().optional().describe("Store ID (auto-detected)"),
        },
      },
Behavior4/5

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

With no annotations provided, the description carries full behavioral burden. The explicit financial impact warning ('THIS WILL CHARGE YOUR CARD') is critical transparency for a destructive operation, though it omits other behavioral details like idempotency, cart state changes, or error scenarios.

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

Conciseness5/5

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

Two sentences with zero waste: the first establishes purpose, the second provides essential financial risk disclosure. Perfectly front-loaded with every word earning its place.

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

Completeness3/5

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

For a 4-parameter financial transaction tool with no output schema, the description covers the critical 'charging' aspect but lacks operational context such as return values, success/failure behaviors, or order confirmation details.

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

Parameters3/5

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

The input schema has 100% description coverage (cart_id, tip_cents, etc.), establishing a baseline of 3. The description adds no parameter-specific semantics beyond the schema, such as explaining the relationship between cart_id and the checkout workflow.

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?

The description clearly states the specific action ('Place') and resource ('DoorDash order'), distinguishing it from sibling tools like doordash_checkout or doordash_add_to_cart by indicating this is the final transaction step.

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

Usage Guidelines3/5

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

While the uppercase warning 'THIS WILL CHARGE YOUR CARD' implicitly signals this is the terminal payment step, the description lacks explicit guidance on prerequisites (e.g., 'use after doordash_checkout') or when to use alternatives like group orders.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ashah360/doordash-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server