list_cities
Discover available cities with metadata to identify valid city slugs for finding music events, concerts, festivals, and nightlife venues.
Instructions
List all available cities with metadata. Use this to discover valid city slugs before calling other tools.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/services/cities.ts:64-76 (handler)The core function that queries the database for the list of cities.
export async function listCities( supabase: SupabaseClient, topLevelCities?: string[], ): Promise<{ cities: Array<{ slug: string; name: string; timezone: string; country_code: string }>; }> { const { data, error } = await supabase .from("cities") .select("slug,name_en,timezone,country_code") .order("slug", { ascending: true }); if (error || !data) { return { cities: [] }; - src/tools/helpers.ts:86-96 (registration)The registration of the 'list_cities' tool, linking the schema and the handler.
"list_cities", { description: "List all available cities with metadata. Use this to discover valid city slugs before calling other tools.", inputSchema: {}, outputSchema: listCitiesOutputSchema, }, async () => runTool("list_cities", listCitiesOutputSchema, async () => listCities(deps.supabase, deps.config.topLevelCities), ), - src/tools/helpers.ts:55-60 (schema)The Zod schema definition for the output of 'list_cities'.
const listCitiesOutputSchema = z.object({ cities: z.array( z.object({ slug: z.string(), name: z.string(), timezone: z.string(),