Skip to main content
Glama
alcylu

Nightlife Search

by alcylu

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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 ?? [] };
    }
  • 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),
        ),
    );
  • 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(),
        }),
      ),
    });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alcylu/nightlife-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server