Skip to main content
Glama
alcylu

Nightlife Search

by alcylu

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

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

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