edinburgh_festival_venue_routes
Calculate walking routes between Edinburgh festival venues to help plan event attendance and navigate festival locations efficiently.
Instructions
Calculate route between venues
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| origin | Yes | ||
| destination | Yes |
Implementation Reference
- main.py:51-63 (handler)The handler function decorated with @mcp.tool, implementing the tool logic by using Google Maps CLI to fetch walking directions between two venues, with error handling for missing API key.@mcp.tool(description="Calculate route between venues") def edinburgh_festival_venue_routes(origin: str, destination: str) -> Dict: """ Calculates the route between two venues. :param origin: The starting venue :param destination: The destination venue. :return: A dictionary containing route information:. """ gmaps_cli = gmaps.GMAPS() if not gmaps_cli.enabled: return {"error": "Google Maps API key is not set. This tool is not available."} directions = gmaps_cli.get_directions(origin, destination, mode="walking") return directions
- main.py:51-51 (registration)The @mcp.tool decorator registers the edinburgh_festival_venue_routes function as an MCP tool.@mcp.tool(description="Calculate route between venues")