Skip to main content
Glama
richarda23

Edinburgh Festivals MCP Server

by richarda23

edinburgh_festival_venues

Search for Edinburgh festival venues by name, postcode, or festival to find locations and details for planning visits.

Instructions

Search Edinburgh festival venues

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
festivalNointernational
postcodeNo
nameNo
yearNo2025
number_of_resultsNo
pageNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • main.py:17-48 (handler)
    The primary handler function for the edinburgh_festival_venues MCP tool. It defines the input schema via parameters, includes documentation, prepares and filters query parameters, and delegates to the EdFestCli.venues() helper to perform the API search for Edinburgh festival venues.
    @mcp.tool(description="Search Edinburgh festival venues")
    def edinburgh_festival_venues(
        festival: str = "international",
        postcode: str = None,
        name: str = None,
        year: str = "2025",
        number_of_results=25,
        page=0,
    ) -> List[Dict]:
        """
        Searches Edinburgh festival venues.
        :param festival: The type of festival to search for venues in.
        :param postcode: The postcode to filter venues by.
        :param name: The name of the venue to search for.
        :param year: The year of the festival.
        :return: A dictionary containing venue information.
        :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.
        :
        """
        params = {
            "festival": festival,
            "year": year,
            "postcode": postcode,
            "name": name,
            "size": number_of_results,
            "page": page,
        }
        filtered_params = {k: v for k, v in params.items() if v}
    
        results = cli.venues(filtered_params)
        return results
  • Supporting methods in EdFestCli class: events(), venues(), and _send_request(). The venues() method is called by the tool handler and uses _send_request() to sign and send HTTP GET requests to the Edinburgh Festival City API for fetching venue data.
    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)
    
    def venues(self, params: Dict) -> List[Dict]:
        return self._send_request("venues", params)
    
    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()
  • main.py:17-17 (registration)
    The @mcp.tool decorator registers the edinburgh_festival_venues function as an MCP tool with the description 'Search Edinburgh festival venues'.
    @mcp.tool(description="Search Edinburgh festival venues")
  • main.py:18-25 (schema)
    Input schema defined by function parameters with defaults and type hints, output as List[Dict], along with detailed docstring describing parameters and return value.
    def edinburgh_festival_venues(
        festival: str = "international",
        postcode: str = None,
        name: str = None,
        year: str = "2025",
        number_of_results=25,
        page=0,
    ) -> List[Dict]:
Behavior1/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers none. It doesn't indicate whether this is a read-only operation, what permissions might be needed, whether it's paginated (though parameters suggest it might be), rate limits, or what the search returns. The description is purely functional without any behavioral context.

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

Conciseness5/5

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

The description is extremely concise at just three words, with zero wasted language. It's front-loaded with the core action ('Search') and resource. While it lacks detail, it's structurally efficient and doesn't bury key information.

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

Completeness2/5

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

Given the tool has 6 parameters with 0% schema coverage, no annotations, and an output schema (which helps but doesn't compensate for input gaps), the description is inadequate. It doesn't explain what the search does, how parameters interact, or what results to expect. For a search tool with multiple filtering options, this leaves too much undefined for effective use.

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

Parameters2/5

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

The schema description coverage is 0%, meaning none of the 6 parameters have descriptions in the schema. The tool description doesn't mention any parameters at all, failing to compensate for this gap. Parameters like 'festival', 'postcode', 'name', 'year', 'number_of_results', and 'page' are completely undocumented in both schema and description, leaving their semantics unclear.

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 'Search Edinburgh festival venues' clearly states the verb ('search') and resource ('Edinburgh festival venues'), making the basic purpose understandable. However, it doesn't distinguish this tool from its sibling 'edinburgh_festival_events' (which presumably searches events rather than venues) or 'edinburgh_festival_venue_routes' (which likely provides routing information). The description is functional but lacks specificity about what makes this search tool unique.

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?

The description provides no guidance on when to use this tool versus its siblings. There's no mention of alternatives, exclusions, or specific contexts where this tool is preferred. The agent must infer usage from the tool name alone, which is insufficient for optimal tool selection.

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