list_genres
Discover available music genres to filter nightlife events, concerts, and venues by type.
Instructions
List all available genres. Use this to discover valid genre names before filtering events or venues.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/services/helpers.ts:15-28 (handler)The actual implementation of the listGenres logic that queries the Supabase database.
export async function listGenres( supabase: SupabaseClient, ): Promise<{ genres: GenreRow[] }> { const { data, error } = await supabase .from("genres") .select("id,name,name_en,name_ja") .order("name", { ascending: true }); if (error) { throw new NightlifeError("INTERNAL_ERROR", `Failed to fetch genres: ${error.message}`); } return { genres: data ?? [] }; } - src/tools/helpers.ts:99-111 (registration)MCP tool registration for "list_genres".
server.registerTool( "list_genres", { description: "List all available genres. Use this to discover valid genre names before filtering events or venues.", inputSchema: {}, outputSchema: listGenresOutputSchema, }, async () => runTool("list_genres", listGenresOutputSchema, async () => listGenres(deps.supabase), ), ); - src/tools/helpers.ts:66-75 (schema)Zod schema defining the output structure for the list_genres tool.
const listGenresOutputSchema = z.object({ genres: z.array( z.object({ id: z.string(), name: z.string(), name_en: z.string().nullable(), name_ja: z.string().nullable(), }), ), });