search_events
Find live events in any city, including concerts, sports, theater, and comedy. Filter by date, category, and keyword to discover shows or games during your trip.
Instructions
Search live events, concerts, sports games, theater, comedy, and shows in a city (Ticketmaster + SeatGeek catalog). Filter by city, date range, category (music / sports / arts / theater / family / comedy), and keyword (artist name, team name, show title). Use this when the user wants tickets to a concert, a sports game, a Broadway show, or any live event during their trip.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| city | Yes | City name (e.g., 'New York', 'Las Vegas', 'London') | |
| date_from | Yes | Start date (YYYY-MM-DD) | |
| date_to | No | Optional end date (YYYY-MM-DD) | |
| category | No | Optional category filter — comma-separated list. Values: 'music', 'sports', 'arts', 'theater', 'family', 'comedy' | |
| keyword | No | Optional keyword search (artist name, team, show title) |
Implementation Reference
- src/server.ts:288-302 (schema)Input schema definition for the 'search_events' tool. Defines required (city, date_from) and optional (date_to, category, keyword) parameters for searching live events via Ticketmaster + SeatGeek.
name: "search_events", description: "Search live events, concerts, sports games, theater, comedy, and shows in a city (Ticketmaster + SeatGeek catalog). Filter by city, date range, category (music / sports / arts / theater / family / comedy), and keyword (artist name, team name, show title). Use this when the user wants tickets to a concert, a sports game, a Broadway show, or any live event during their trip.", inputSchema: { type: "object" as const, properties: { city: { type: "string", description: "City name (e.g., 'New York', 'Las Vegas', 'London')" }, date_from: { type: "string", description: "Start date (YYYY-MM-DD)" }, date_to: { type: "string", description: "Optional end date (YYYY-MM-DD)" }, category: { type: "string", description: "Optional category filter — comma-separated list. Values: 'music', 'sports', 'arts', 'theater', 'family', 'comedy'" }, keyword: { type: "string", description: "Optional keyword search (artist name, team, show title)" }, }, required: ["city", "date_from"], }, }, - src/server.ts:510-510 (registration)Tool annotation registration for 'search_events' in the TOOL_ANNOTATIONS record, providing metadata (title, readOnlyHint, etc.) required by the Anthropic Connector Directory.
search_events: { title: "Search Live Events & Tickets", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }, - src/server.ts:774-778 (handler)Handler implementation for 'search_events'. Calls POST /v1/events/search via the apiCall helper, then trims the response using trimEventResponse and returns the result as text content.
case "search_events": { const result = await apiCall("POST", "/v1/events/search", args); const trimmed = trimEventResponse(result); return { content: [{ type: "text", text: JSON.stringify(trimmed, null, 2) }] }; } - src/server.ts:695-714 (helper)The trimEventResponse helper function that reduces raw event API responses down to key fields (event_id, name, category, venue, city, date, time, price_min_usd, price_max_usd, url, thumbnail) with a limit of 25 items.
function trimEventResponse(raw: any, limit = 25): any { const data = Array.isArray(raw?.data) ? raw.data : []; const trimmed = data.slice(0, limit).map((e: any) => ({ event_id: e.event_id || e.id, name: e.name || e.title, category: e.category || e.type, venue: e.venue || e.venue_name, city: e.city, date: e.date || e.start_date || e.local_date, time: e.time || e.local_time, price_min_usd: e.price_min_usd || e.price?.min, price_max_usd: e.price_max_usd || e.price?.max, url: e.url || e.purchase_url, thumbnail: e.thumbnail || (typeof e.images?.[0] === "string" ? e.images[0] : e.images?.[0]?.url), })); return { data: trimmed, meta: { count: trimmed.length, total_returned: data.length, trimmed_for_llm: data.length > limit }, }; }