Skip to main content
Glama
richarda23

Edinburgh Festivals MCP Server

by richarda23

edinburgh_festival_events

Search and filter Edinburgh festival events by date, festival type, genre, venue, artist, or title to find specific performances and shows.

Instructions

Searches this year's Edinburgh festival events. :param datetime_from: An optional ISO8601-like timestamp. e.g. '2025-08-12 00:00:00' :param datetime_to: An optional ISO8601-like timestamp. e.g. '2025-08-12 00:00:00' :param festival: possible values are fringe, demofringe, jazz, book, international, tattoo, art, hogmanay, science, imaginate, film, mela, storytelling. :param genre: The genre of the show. This will vary by festival type but may include comedy, theatre etc :param venue_name: The genre of the show. This will vary by festival type but may include comedy, theatre etc :param search_text: description of the show to search for. :param artist: Name of an artist or performer to search for. :param title: the title of the show to search for. :param year: The year of the festival. Defaults to "*", which means all years. :param datetime_from: The start date and time for the search range. :param number_of_results: The maximum number of results to retrieve, up to 100 at a time. :param page: The page number for pagination, starting from 0. :return:

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
datetime_fromNo2025-01-01 00:00:00
datetime_toNo2025-12-31 23:59:59
festivalNointernational
genreNo
venue_nameNo
search_textNo
titleNo
artistNo
number_of_resultsNo
pageNo
yearNo*

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • main.py:78-131 (handler)
    The edinburgh_festival_events tool handler function. Decorated with @mcp.tool() for registration. Processes parameters for date range, festival, genre, etc., calls edfestcli.EdFestCli().events() to retrieve events from the Edinburgh Festival API, and returns the list of events.
    @mcp.tool()
    def edinburgh_festival_events(
        datetime_from="2025-01-01 00:00:00",
        datetime_to="2025-12-31 23:59:59",
        festival="international",
        genre=None,
        venue_name=None,
        search_text=None,
        title=None,
        artist=None,
        number_of_results=25,
        page=0,
        year="*",
    ) -> List[Dict]:
        """
        Searches this year's Edinburgh festival events.
        :param datetime_from: An optional ISO8601-like timestamp. e.g. '2025-08-12 00:00:00'
        :param datetime_to:  An optional ISO8601-like timestamp. e.g. '2025-08-12 00:00:00'
        :param festival:  possible values are fringe, demofringe, jazz, book, international, tattoo, art, hogmanay, science, imaginate, film, mela, storytelling.
        :param genre: The genre of the show. This will vary by festival type but may include comedy, theatre etc
        :param venue_name: The genre of the show. This will vary by festival type but may include comedy, theatre etc
        :param search_text:  description  of the show to search for.
        :param artist:  Name of an artist or performer to search for.
        :param title: the title of the show to search for.
        :param year: The year of the festival. Defaults to "*", which means all years.
        :param datetime_from: The start date and time for the search range.
        :param number_of_results: The maximum number of results to retrieve, up to 100 at a time.
        :param page: The page number for pagination, starting from 0.
        :return:
        """
        params = {
            "festival": festival,
            "year": year,
            "date_from": datetime_from.replace("T", " "),
            "date_to": datetime_to.replace("T", " "),
            "genre": genre,
            "venue_name": venue_name,
            "description": search_text,
            "artist": artist,
            "title": title,
            "size": number_of_results,
            "page": page,
        }
        ## If year is "*", we remove the date filters
        if year == "*":
            del params["date_from"]
            del params["date_to"]
        filtered_params = {k: v for k, v in params.items() if v}
    
        results = cli.events(filtered_params)
        # for r in results:
        #     del r['images']
        return results
  • The events() method in EdFestCli class, which is invoked by the tool handler. Adjusts festival param if needed and calls _send_request to fetch events from the API.
    def events(self, params: Dict) -> List[Dict]:
        if params.get("festival") == "fringe" and self._fringe_mode != "real":
            params["festival"] = "demofringe"
        return self._send_request("events", params)
  • The _send_request() private method used by events() to sign the API request with HMAC-SHA1 and make HTTP GET to edinburghfestivalcity.com API.
    def _send_request(self, path: str, params: Dict) -> Dict:
        params["key"] = self._apikey
        query = urlencode(params)
        url_to_sign = f"/{path}?{query}"
        signature = hmac.new(
            self._apisecret.encode("utf-8"), url_to_sign.encode("utf-8"), hashlib.sha1
        ).hexdigest()
        signed_url = f"{url_to_sign}&signature={signature}"
        url_to_request = f"{EdFestCli.base_url}{signed_url}"
        original_stderr = sys.stderr  # Save the original stderr
        with open("error.log", "a") as f:
            sys.stderr = f  # Redirect stderr to the file
    
            # Any stderr output now goes to 'error.log'
            print(url_to_request, file=sys.stderr)
        sys.stderr = original_stderr  # Restore the original stderr
        response = requests.get(url_to_request)
        return response.json()
  • The __init__ method of EdFestCli, loads API credentials from env vars.
    def __init__(self):
        load_dotenv()
        self._apikey = os.getenv("api_key")
        self._apisecret = os.getenv("api_secret")
        self._fringe_mode = os.getenv("fringe_mode", "demo")
  • main.py:10-11 (helper)
    Instantiation of the EdFestCli() as 'cli' global, used by the tool.
    cli = edfestcli.EdFestCli()
    gmaps_cli = gmaps.GMAPS()
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but provides minimal behavioral information. It mentions pagination and a 100-result limit, but doesn't cover important aspects like authentication requirements, rate limits, error conditions, or what happens with invalid parameters. The return format is hinted at but not explained.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Poorly structured with parameter documentation mixed into the description rather than separate. Contains redundant information (datetime_from appears twice), contradictory statements ('this year's' vs year parameter), and incorrect parameter descriptions. The single opening sentence is followed by a parameter dump without clear organization.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 11 parameters with no schema descriptions and no annotations, the description provides substantial parameter information but has significant gaps. The presence of an output schema reduces the need to describe return values, but behavioral aspects like authentication, error handling, and rate limits are missing. The contradictory statements about temporal scope undermine completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description provides substantial parameter documentation, explaining 11 parameters with examples and constraints. However, there are issues: 'venue_name' incorrectly repeats the 'genre' description, and 'datetime_from' appears twice with different explanations. Still, it compensates well for the schema gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description starts with 'Searches this year's Edinburgh festival events' which clearly states the verb (search) and resource (events), but it's vague about scope - 'this year's' contradicts the 'year' parameter allowing all years. It doesn't distinguish from sibling tools like venue-related tools, though the purpose is reasonably clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus the sibling venue tools (edinburgh_festival_venue_routes, edinburgh_festival_venues). The description mentions searching 'this year's' events but the year parameter defaults to all years, creating confusion about temporal scope without explicit usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/richarda23/edfest-mcp'

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