Skip to main content
Glama

doordash_checkout

Preview checkout details including fees and total before placing an order through the DoorDash MCP server.

Instructions

Preview checkout details (fees, total). Does NOT place the order.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cart_idNoCart ID. Uses most recent if not specified.

Implementation Reference

  • The implementation of the `doordash_checkout` tool, which previews order fees and totals.
    server.registerTool(
      "doordash_checkout",
      {
        description:
          "Preview checkout details (fees, total). Does NOT place the order.",
        inputSchema: {
          cart_id: z
            .string()
            .optional()
            .describe("Cart ID. Uses most recent if not specified."),
        },
      },
      ({ cart_id }) =>
        wrap(async () => {
          let cartId = cart_id ?? "";
          let storeName = "Unknown";
    
          if (!cartId) {
            const carts = await api.cart.listCarts();
            if (carts.length === 0) return err("Cart is empty.");
            cartId = carts[0].id;
            storeName = carts[0].storeName;
          }
    
          const summary = await api.checkout.getFeeTally(cartId);
          const lines = [`# Checkout: ${storeName}\n`];
          for (const item of summary.lineItems) {
            lines.push(`- ${item.label}: ${item.amount}`);
          }
          if (summary.total) lines.push(`\n**Total: ${summary.total}**`);
          lines.push(`\nCart ID: ${cartId}`);
          lines.push(
            "\n*Call doordash_place_order with this cart ID to place the order.*",
          );
          return ok(lines.join("\n"));
        }),
    );
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure and successfully communicates that this is a safe, non-destructive preview operation rather than a transaction. It does not disclose additional behavioral traits such as idempotency, validation behavior, or specific error conditions, but covers the critical safety constraint.

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?

The description consists of two efficient sentences with the primary action front-loaded in the first sentence and the critical safety constraint in the second. There is no redundant or wasteful language.

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?

Given the tool's low complexity (single optional parameter) and lack of output schema, the description adequately covers the return value implicitly by mentioning 'fees, total' and sufficiently distinguishes the tool's role from its siblings. It appropriately addresses the tool's specific purpose without unnecessary elaboration.

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 for the single `cart_id` parameter, establishing a baseline score. The description text adds no additional parameter semantics beyond what the schema already provides.

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 provides a specific verb (preview) and resource (checkout details) with explicit scope (fees, total). The phrase 'Does NOT place the order' clearly distinguishes this tool from its sibling `doordash_place_order`, preventing incorrect agent selection.

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?

The description provides explicit negative guidance stating the tool 'Does NOT place the order,' which implicitly contrasts with `doordash_place_order` and prevents misuse. However, it does not explicitly state the positive use case (e.g., 'use this to review costs before placing an order') or name the alternative tool directly.

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