Skip to main content
Glama

create_delivery_quote

Generate delivery cost estimates for DoorDash orders using pickup and dropoff addresses, business details, and order value to plan logistics.

Instructions

Get a quote for a delivery request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
external_delivery_idYesUnique identifier for the delivery
pickup_addressYesPickup address
pickup_business_nameNoBusiness name for pickup
pickup_phone_numberNoPhone number for pickup
pickup_instructionsNoSpecial instructions for pickup
dropoff_addressYesDropoff address
dropoff_business_nameNoBusiness name for dropoff
dropoff_phone_numberNoPhone number for dropoff
dropoff_instructionsNoSpecial instructions for dropoff
order_valueNoValue of the order in cents

Implementation Reference

  • index.js:66-66 (handler)
    The handler function that executes the core logic of the 'create_delivery_quote' tool by calling DoorDashClient.deliveryQuote with the provided arguments.
    handler: (client, args) => client.deliveryQuote(args),
  • Input schema defining the parameters and validation for the 'create_delivery_quote' tool.
    inputSchema: {
      type: 'object',
      properties: {
        external_delivery_id: { type: 'string', description: 'Unique identifier for the delivery' },
        pickup_address: { type: 'string', description: 'Pickup address' },
        pickup_business_name: { type: 'string', description: 'Business name for pickup' },
        pickup_phone_number: { type: 'string', description: 'Phone number for pickup' },
        pickup_instructions: { type: 'string', description: 'Special instructions for pickup' },
        dropoff_address: { type: 'string', description: 'Dropoff address' },
        dropoff_business_name: { type: 'string', description: 'Business name for dropoff' },
        dropoff_phone_number: { type: 'string', description: 'Phone number for dropoff' },
        dropoff_instructions: { type: 'string', description: 'Special instructions for dropoff' },
        order_value: { type: 'number', description: 'Value of the order in cents' },
      },
      required: ['external_delivery_id', 'pickup_address', 'dropoff_address'],
    },
  • index.js:47-67 (registration)
    Registration of the 'create_delivery_quote' tool within the TOOLS array used by the MCP server.
    {
      name: 'create_delivery_quote',
      description: 'Get a quote for a delivery request',
      inputSchema: {
        type: 'object',
        properties: {
          external_delivery_id: { type: 'string', description: 'Unique identifier for the delivery' },
          pickup_address: { type: 'string', description: 'Pickup address' },
          pickup_business_name: { type: 'string', description: 'Business name for pickup' },
          pickup_phone_number: { type: 'string', description: 'Phone number for pickup' },
          pickup_instructions: { type: 'string', description: 'Special instructions for pickup' },
          dropoff_address: { type: 'string', description: 'Dropoff address' },
          dropoff_business_name: { type: 'string', description: 'Business name for dropoff' },
          dropoff_phone_number: { type: 'string', description: 'Phone number for dropoff' },
          dropoff_instructions: { type: 'string', description: 'Special instructions for dropoff' },
          order_value: { type: 'number', description: 'Value of the order in cents' },
        },
        required: ['external_delivery_id', 'pickup_address', 'dropoff_address'],
      },
      handler: (client, args) => client.deliveryQuote(args),
    },
  • index.js:164-191 (registration)
    MCP server request handler for calling tools, which dispatches to the specific tool handler based on the tool name.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      if (!ddClient) {
        ddClient = initializeDoorDashClient();
        if (!ddClient) {
          throw new Error('DoorDash client not initialized. Please set environment variables.');
        }
      }
    
      const { name, arguments: args } = request.params;
      const tool = TOOLS.find((t) => t.name === name);
      if (!tool) {
        throw new Error(`Unknown tool: ${name}`);
      }
    
      try {
        const response = await tool.handler(ddClient, args);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(response.data, null, 2),
            },
          ],
        };
      } catch (error) {
        throw new Error(`DoorDash API error: ${error.message}`);
      }
    });
  • Helper function to initialize the DoorDashClient instance used by all tool handlers, including create_delivery_quote.
    function initializeDoorDashClient() {
      const developerId = process.env.DOORDASH_DEVELOPER_ID;
      const keyId = process.env.DOORDASH_KEY_ID;
      const signingSecret = process.env.DOORDASH_SIGNING_SECRET;
      
      if (!developerId || !keyId || !signingSecret) {
        console.error('Missing required DoorDash environment variables: DOORDASH_DEVELOPER_ID, DOORDASH_KEY_ID, DOORDASH_SIGNING_SECRET');
        return null;
      }
      
      return new DoorDashClient({
        developer_id: developerId,
        key_id: keyId,
        signing_secret: signingSecret,
      });
    }
Behavior2/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 but only states it 'gets a quote,' implying a read-only operation. It lacks details on permissions, rate limits, whether it's idempotent, or what the quote includes (e.g., cost, ETA), which is insufficient for a tool with 10 parameters and no output schema.

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 is a single, efficient sentence that directly states the tool's purpose without any wasted words. It's front-loaded and appropriately sized for its simple function, making it easy to parse quickly.

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

Completeness2/5

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

Given the tool's complexity (10 parameters, no output schema, and no annotations), the description is incomplete. It doesn't explain what the quote returns, how it's used with siblings, or behavioral aspects like error handling, leaving significant gaps for the agent to operate effectively.

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 schema description coverage is 100%, so the input schema already documents all parameters thoroughly. The description adds no additional meaning beyond implying it's for delivery requests, which is minimal value. This meets the baseline of 3 since the schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('quote for a delivery request'), making it easy to understand what it does. However, it doesn't explicitly distinguish itself from sibling tools like 'create_delivery' or 'accept_delivery_quote', which might handle related but different operations.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, such as needing a delivery request ready, or differentiate from siblings like 'accept_delivery_quote' for post-quote actions, leaving the agent to infer usage context.

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/amannm/doordash-mcp'

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