Skip to main content
Glama

get_store_menu

Retrieve a DoorDash store's complete menu including all items and their prices using the store ID. This tool provides structured menu data for browsing or integration purposes.

Instructions

Get a store's full menu with items and prices

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
storeIdYesStore ID from search results
menuIdNoMenu ID (optional)

Implementation Reference

  • The handler function for 'get_store_menu' tool. Calls GraphQL API to fetch store menu data, processes the response to extract store information (name, rating, delivery time, fees, promos) and menu categories with items (prices, descriptions, badges, deals), then returns formatted JSON output.
      async ({ storeId, menuId }) => {
        const result = await graphql("storepageFeed", queries.STORE_PAGE_FEED, {
          storeId,
          menuId,
          fulfillmentType: "Delivery",
        });
    
        const feed = result?.data?.storepageFeed;
        const header = feed?.storeHeader;
    
        const promos = (header?.storeTagsList || [])
          .filter((t) => t.type === "PROMOTION" || t.type === "OFFER" || (t.custom && t.custom.includes("promo")))
          .map((t) => t.name);
    
        const store = header
          ? {
              id: header.id,
              name: header.name,
              description: header.description,
              priceRange: header.priceRangeDisplayString,
              rating: header.ratings?.averageRating,
              numRatings: header.ratings?.numRatingsDisplayString,
              deliveryTime: header.deliveryTimeLayout?.title,
              deliveryFee: header.deliveryFeeLayout?.displayDeliveryFee,
              pickupTime: header.pickupTimeLayout?.title,
              isDashpass: header.isDashpassPartner,
              promos: promos.length > 0 ? promos : undefined,
            }
          : null;
    
        const categories = (feed?.itemLists || []).map((list) => ({
          id: list.id,
          name: list.name,
          items: (list.items || []).map((item) => {
            const badges = (item.badges || []).filter((b) => b.text).map((b) => b.text);
            const deal = item.strikethroughPrice && item.strikethroughPrice > 0
              ? { originalPrice: `$${(item.strikethroughPrice / 100).toFixed(2)}` }
              : undefined;
    
            return {
              id: item.id,
              name: item.name,
              description: item.description,
              price: item.price,
              priceDisplay: item.displayPrice || (item.price ? `$${(item.price / 100).toFixed(2)}` : null),
              deal,
              badges: badges.length > 0 ? badges : undefined,
              tags: (item.itemTagsList || []).map((t) => t.localizedName),
            };
          }),
        }));
    
        return {
          content: [{ type: "text", text: JSON.stringify({ store, categories }, null, 2) }],
        };
      }
    );
  • Input schema definition for 'get_store_menu' tool using Zod. Defines storeId as required string parameter and menuId as optional string parameter, with descriptive metadata.
    {
      storeId: z.string().describe("Store ID from search results"),
      menuId: z.string().optional().describe("Menu ID (optional)"),
    },
  • mcp-server.js:73-136 (registration)
    Registration of the 'get_store_menu' tool with the MCP server. Includes tool name, description, input schema, and the handler function that implements the tool logic.
    server.tool(
      "get_store_menu",
      "Get a store's full menu with items and prices",
      {
        storeId: z.string().describe("Store ID from search results"),
        menuId: z.string().optional().describe("Menu ID (optional)"),
      },
      async ({ storeId, menuId }) => {
        const result = await graphql("storepageFeed", queries.STORE_PAGE_FEED, {
          storeId,
          menuId,
          fulfillmentType: "Delivery",
        });
    
        const feed = result?.data?.storepageFeed;
        const header = feed?.storeHeader;
    
        const promos = (header?.storeTagsList || [])
          .filter((t) => t.type === "PROMOTION" || t.type === "OFFER" || (t.custom && t.custom.includes("promo")))
          .map((t) => t.name);
    
        const store = header
          ? {
              id: header.id,
              name: header.name,
              description: header.description,
              priceRange: header.priceRangeDisplayString,
              rating: header.ratings?.averageRating,
              numRatings: header.ratings?.numRatingsDisplayString,
              deliveryTime: header.deliveryTimeLayout?.title,
              deliveryFee: header.deliveryFeeLayout?.displayDeliveryFee,
              pickupTime: header.pickupTimeLayout?.title,
              isDashpass: header.isDashpassPartner,
              promos: promos.length > 0 ? promos : undefined,
            }
          : null;
    
        const categories = (feed?.itemLists || []).map((list) => ({
          id: list.id,
          name: list.name,
          items: (list.items || []).map((item) => {
            const badges = (item.badges || []).filter((b) => b.text).map((b) => b.text);
            const deal = item.strikethroughPrice && item.strikethroughPrice > 0
              ? { originalPrice: `$${(item.strikethroughPrice / 100).toFixed(2)}` }
              : undefined;
    
            return {
              id: item.id,
              name: item.name,
              description: item.description,
              price: item.price,
              priceDisplay: item.displayPrice || (item.price ? `$${(item.price / 100).toFixed(2)}` : null),
              deal,
              badges: badges.length > 0 ? badges : undefined,
              tags: (item.itemTagsList || []).map((t) => t.localizedName),
            };
          }),
        }));
    
        return {
          content: [{ type: "text", text: JSON.stringify({ store, categories }, null, 2) }],
        };
      }
    );
  • GraphQL helper function that executes API calls to DoorDash. Used by 'get_store_menu' handler to make authenticated requests to the DoorDash GraphQL endpoint with operation name, query, and variables.
    async function graphql(operationName, query, variables = {}) {
      const page = await ensureOnDoordash();
    
      const result = await page.evaluate(
        async ({ operationName, query, variables }) => {
          const res = await fetch(
            `/graphql/${operationName}?operation=${operationName}`,
            {
              method: "POST",
              headers: { "content-type": "application/json" },
              credentials: "include",
              body: JSON.stringify({ operationName, variables, query }),
            }
          );
          return { status: res.status, body: await res.json() };
        },
        { operationName, query, variables }
      );
    
      if (result.status !== 200) {
        throw new Error(`GraphQL ${operationName} failed: ${result.status}`);
      }
    
      return result.body;
    }
  • GraphQL query definition (STORE_PAGE_FEED) used by 'get_store_menu' tool. Defines the query structure for fetching store header data (name, rating, delivery info, promos) and item lists with menu items (prices, descriptions, badges, tags).
    const STORE_PAGE_FEED = `query storepageFeed($storeId: ID!, $menuId: ID, $fulfillmentType: FulfillmentType, $cursor: String) {
      storepageFeed(storeId: $storeId, menuId: $menuId, fulfillmentType: $fulfillmentType, cursor: $cursor) {
        storeHeader {
          id name description priceRange priceRangeDisplayString
          offersDelivery offersPickup isDashpassPartner
          address { displayAddress lat lng }
          deliveryFeeLayout { title displayDeliveryFee }
          deliveryTimeLayout { title subtitle }
          pickupTimeLayout { title }
          ratings { numRatingsDisplayString averageRating }
          storeTagsList { type name custom }
          status {
            delivery { isAvailable minutes }
            pickup { isAvailable minutes }
          }
        }
        itemLists {
          id name description
          items {
            id name description price imageUrl
            displayPrice strikethroughPrice nextCursor
            itemTagsList { tagType localizedName }
            badges { text type isDashpass placement backgroundColor }
          }
        }
      }
    }`;
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. It states the tool retrieves a 'full menu with items and prices', implying a read-only operation, but doesn't cover critical aspects like error handling (e.g., invalid store IDs), rate limits, authentication needs, or response format. This is a significant gap for a tool with no annotation support.

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 fluff or redundancy. It's appropriately sized and front-loaded, making it easy for an agent 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 (a read operation with two parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what the return value includes (e.g., structure of items/prices), error conditions, or dependencies on other tools (e.g., 'storeId' from 'search_restaurants'). This leaves gaps for effective agent use.

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 schema already documents both parameters ('storeId' and optional 'menuId') adequately. The description adds no additional parameter semantics beyond implying the tool fetches menu data, which is redundant with the schema. This meets the baseline for high schema coverage.

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 verb ('Get') and resource ('store's full menu with items and prices'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'search_restaurants' or 'order_history', which might also involve menu-related operations, so it falls short of a perfect score.

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 (e.g., needing a store ID from search results), exclusions, or comparisons to siblings like 'search_restaurants' (which might return menu snippets). This lack of context leaves the agent to infer usage.

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

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