doordash_menu
Retrieve restaurant menu details using a store ID obtained from doordash_search to view available items and prices.
Instructions
Get a restaurant's menu by store ID. Use doordash_search first to find the store ID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| store_id | Yes | DoorDash store ID (numeric) |
Implementation Reference
- src/tools/index.ts:168-219 (handler)The handler for `doordash_menu` is defined and registered in `src/tools/index.ts`. It takes a `store_id`, fetches the menu using `api.menu.getStoreMenu`, and formats it as a string for the model.
server.registerTool( "doordash_menu", { description: "Get a restaurant's menu by store ID. Use doordash_search first to find the store ID.", inputSchema: { store_id: z.string().describe("DoorDash store ID (numeric)"), }, }, ({ store_id }) => wrap(async () => { const menu = await api.menu.getStoreMenu(store_id); const lines: string[] = []; lines.push(`# ${menu.name}`); if (menu.description) lines.push(`*${menu.description}*`); if (menu.isConvenience) lines.push("**Type: Convenience store**"); lines.push(""); if (menu.rating) lines.push(`Rating: ${menu.rating}`); if (menu.deliveryMinutes) lines.push(`Delivery: ~${menu.deliveryMinutes} min`); if (menu.priceRange) lines.push(`Price: ${menu.priceRange}`); if (menu.address) lines.push(`Address: ${menu.address}`); lines.push(""); if (menu.isConvenience) { lines.push("This is a convenience store with a large catalog."); lines.push( "Use `doordash_convenience_search` with this store ID to find specific items.", ); return ok(lines.join("\n")); } for (const cat of menu.categories) { lines.push(`## ${cat.name}`); for (const item of cat.items) { let line = `- **${item.name}** ${item.displayPrice}`; if (!item.quickAddEligible) line += " ⚙️"; if (item.description) { const desc = item.description.length > 80 ? item.description.slice(0, 80) + "..." : item.description; line += ` — ${desc}`; } line += ` (ID: ${item.id})`; lines.push(line); } lines.push(""); } return ok(lines.join("\n")); }),