Skip to main content
Glama

list_cities

Find cities with available bookable experiences on tickadoo to help users discover destinations for theatre, shows, events, and tours.

Instructions

List all cities where tickadoo® has bookable experiences. Use to help users discover available destinations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
languageNoLanguage codeen
queryNoOptional city name or slug filter (e.g. 'new', 'paris', 'tokyo')
limitNoMaximum number of cities to return (default 50)

Implementation Reference

  • The handler for the 'list_cities' tool, which filters and formats a list of cities.
    async ({ language, query, limit }) => {
      try {
        const filter = query?.trim().toLowerCase();
        const withSlug = (await getCities(language))
          .filter((city): city is City & { slug: string } => Boolean(city.slug))
          .filter(city => !filter || city.name.toLowerCase().includes(filter) || city.slug.toLowerCase().includes(filter))
          .sort((a, b) => a.name.localeCompare(b.name));
    
        if (!withSlug.length) {
          return createTextResponse(`No cities found matching "${query}".`);
        }
    
        const cities = withSlug.slice(0, limit);
        const list = cities.map(city => `📍 ${city.name} → ${buildBookingUrl(city.slug)}`).join("\n");
        const header = filter
          ? `Found ${withSlug.length} matching cities${withSlug.length > cities.length ? ` (showing ${cities.length})` : ""}:`
          : `Showing ${cities.length} of ${withSlug.length} cities, sorted alphabetically. Use the optional query parameter to filter further:`;
    
        return createTextResponse(`tickadoo® city directory\n\n${header}\n\n${list}`);
      } catch (error) {
        return createTextResponse(`Error: ${getErrorMessage(error)}`, { isError: true });
      }
    },
  • Registration of the 'list_cities' tool with its schema definition in src/shared/server.ts.
    server.tool(
      "list_cities",
      "List all cities where tickadoo® has bookable experiences. Use to help users discover available destinations.",
      {
        language: z.string().optional().default("en").describe("Language code"),
        query: z.string().optional().describe("Optional city name or slug filter (e.g. 'new', 'paris', 'tokyo')"),
        limit: z.number().int().positive().max(200).optional().default(50).describe("Maximum number of cities to return (default 50)"),
      },

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/tickadoo/tickadoo-mcp'

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