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, }); }

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