search_dining
Find restaurants and check reservation availability by searching with filters like city, date, time, cuisine, party size, neighborhood, and price range.
Instructions
Search restaurants, dining options, and reservation availability by city, date, time, cuisine, party size, neighborhood, and price range. Use this when the user wants to find a restaurant, book dinner, plan a meal, get reservations, or pick a place to eat on a trip. Dining partnerships are in progress; surfaces availability today, full reservation flow in the next release.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| city | Yes | City name (e.g., 'Miami', 'New York', 'Key West') | |
| date | Yes | Reservation date (YYYY-MM-DD) | |
| time | No | Preferred time in 24h format (e.g., '19:00' for 7pm) | |
| party_size | No | Number of guests (1-20, default: 2) | |
| cuisine | No | Cuisine filter (e.g., 'Italian', 'Seafood', 'Japanese') | |
| price_range | No | Price range filter | |
| neighborhood | No | Neighborhood filter (e.g., 'South Beach', 'Midtown') |
Implementation Reference
- src/server.ts:250-271 (schema)The 'search_dining' tool definition and input schema — describes the tool as searching restaurants/dining options by city, date, time, party size, cuisine, price range, and neighborhood. Requires 'city' and 'date'.
{ name: "search_dining", description: "Search restaurants, dining options, and reservation availability by city, date, time, cuisine, party size, neighborhood, and price range. Use this when the user wants to find a restaurant, book dinner, plan a meal, get reservations, or pick a place to eat on a trip. Dining partnerships are in progress; surfaces availability today, full reservation flow in the next release.", inputSchema: { type: "object" as const, properties: { city: { type: "string", description: "City name (e.g., 'Miami', 'New York', 'Key West')" }, date: { type: "string", description: "Reservation date (YYYY-MM-DD)" }, time: { type: "string", description: "Preferred time in 24h format (e.g., '19:00' for 7pm)" }, party_size: { type: "number", description: "Number of guests (1-20, default: 2)" }, cuisine: { type: "string", description: "Cuisine filter (e.g., 'Italian', 'Seafood', 'Japanese')" }, price_range: { type: "string", enum: ["$", "$$", "$$$", "$$$$"], description: "Price range filter", }, neighborhood: { type: "string", description: "Neighborhood filter (e.g., 'South Beach', 'Midtown')" }, }, required: ["city", "date"], }, }, - src/server.ts:755-758 (handler)The handler for 'search_dining' — calls apiCall('POST', '/v1/dining/search', args) to the backend API and returns the raw JSON result with no trimming.
case "search_dining": { const result = await apiCall("POST", "/v1/dining/search", args); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } - src/server.ts:508-508 (registration)Annotation registration for 'search_dining' in TOOL_ANNOTATIONS, marking it as readOnlyHint: true, idempotentHint: true, openWorldHint: true with title 'Search Restaurants & Dining'.
search_dining: { title: "Search Restaurants & Dining", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }, - src/server.ts:108-127 (helper)The apiCall helper used by the search_dining handler to make POST requests to the Autonomad API.
async function apiCall( method: string, path: string, body?: Record<string, unknown> ): Promise<unknown> { const url = `${API_BASE}${path}`; const headers: Record<string, string> = { "Content-Type": "application/json" }; const key = await ensureMcpKey(); if (key) headers["x-mcp-key"] = key; const options: RequestInit = { method, headers }; if (body) { options.body = JSON.stringify(body); } const res = await fetch(url, options); if (!res.ok) { const error = await res.text(); throw new Error(`API error ${res.status}: ${error}`); } return res.json(); }