Skip to main content
Glama
YuchengMaUTK

Unofficial WCA MCP Server

by YuchengMaUTK

search_competitions_by_event

Find WCA competitions that feature a specific speedcubing event. Returns paginated results of competitions including the specified event ID.

Instructions

Search for WCA competitions that include a specific event.

Returns competitions that feature the specified WCA event. Results are paginated to manage the response size.

Args: event_id: WCA event ID (e.g., "333" for 3x3x3 Cube, "222" for 2x2x2, "333bf" for 3x3x3 Blindfolded) page: Page number for pagination (default: 1)

Returns: Paginated competition data for competitions featuring the specified event

Example: search_competitions_by_event(event_id="333bf") - Competitions with 3x3x3 Blindfolded

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
event_idYes
pageNo

Implementation Reference

  • The main MCP tool handler for 'search_competitions_by_event'. Decorated with @mcp.tool() for automatic registration. Implements the core logic by delegating to WCAAPIClient.get_competitions_by_event(). Includes input schema via type hints and comprehensive docstring.
    @mcp.tool() async def search_competitions_by_event( event_id: str, page: int = 1 ) -> Dict[str, Any]: """Search for WCA competitions that include a specific event. Returns competitions that feature the specified WCA event. Results are paginated to manage the response size. Args: event_id: WCA event ID (e.g., "333" for 3x3x3 Cube, "222" for 2x2x2, "333bf" for 3x3x3 Blindfolded) page: Page number for pagination (default: 1) Returns: Paginated competition data for competitions featuring the specified event Example: search_competitions_by_event(event_id="333bf") - Competitions with 3x3x3 Blindfolded """ try: async with WCAAPIClient() as client: competitions_data = await client.get_competitions_by_event(event_id, page) return competitions_data except APIError as e: raise Exception(f"Failed to search competitions by event: {e}") except Exception as e: raise Exception(f"Unexpected error searching competitions by event: {e}")
  • Supporting method in WCAAPIClient class that performs the actual API request to the WCA static API endpoints for competitions filtered by event ID, handling pagination.
    async def get_competitions_by_event( self, event_id: str, page: int = 1 ) -> Dict[str, Any]: """Get competitions that feature a specific event. Args: event_id: Event ID (e.g., "333", "222", "333bf") page: Page number (1-based) Returns: Paginated competition data for the event """ if page == 1: endpoint = f"competitions/{event_id}.json" else: endpoint = f"competitions/{event_id}-page-{page}.json" return await self._make_request(endpoint)

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/YuchengMaUTK/unofficial-wca-mcp-server'

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