get_wca_continents
Retrieve all continents recognized by the World Cube Association for regional filtering, including names and identifiers.
Instructions
Get all WCA continents.
Returns a list of all continents recognized by the World Cube Association including continent names and identifiers used for regional filtering.
Returns: List of WCA continents with names and identifiers
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/wca_mcp_server/main.py:68-86 (handler)The handler function for the 'get_wca_continents' tool, decorated with @mcp.tool() for automatic registration with the FastMCP server. It creates a WCAAPIClient instance and calls its get_continents() method to fetch and return the list of continents.@mcp.tool() async def get_wca_continents() -> List[Dict[str, Any]]: """Get all WCA continents. Returns a list of all continents recognized by the World Cube Association including continent names and identifiers used for regional filtering. Returns: List of WCA continents with names and identifiers """ try: async with WCAAPIClient() as client: continents = await client.get_continents() return continents except APIError as e: raise Exception(f"Failed to fetch WCA continents: {e}") except Exception as e: raise Exception(f"Unexpected error fetching WCA continents: {e}")
- src/wca_mcp_server/client.py:327-337 (helper)The WCAAPIClient helper method that performs the actual API request to 'continents.json', processes the paginated response by extracting 'items' or falling back to 'continents' key, and returns the list of continent data.async def get_continents(self) -> List[Dict[str, Any]]: """Get all continents. Returns: List of continent data """ data = await self._make_request("continents.json") # The API returns paginated data with items array if isinstance(data, dict) and "items" in data: return data["items"] return data.get("continents", [])