Skip to main content
Glama
YuchengMaUTK

Unofficial WCA MCP Server

by YuchengMaUTK

get_competition_by_id

Retrieve detailed WCA competition information including venue, events, results, and organizers by providing the competition ID.

Instructions

Get detailed information about a specific competition by its ID.

Returns comprehensive information about a WCA competition including venue details, events, results, and organizer information.

Args: competition_id: WCA competition ID (e.g., "WC2023")

Returns: Detailed competition information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
competition_idYes

Implementation Reference

  • The primary handler function for the 'get_competition_by_id' MCP tool. Decorated with @mcp.tool() which handles both implementation and FastMCP registration. Fetches competition details via WCAAPIClient.
    @mcp.tool() async def get_competition_by_id(competition_id: str) -> Dict[str, Any]: """Get detailed information about a specific competition by its ID. Returns comprehensive information about a WCA competition including venue details, events, results, and organizer information. Args: competition_id: WCA competition ID (e.g., "WC2023") Returns: Detailed competition information """ try: async with WCAAPIClient() as client: competition_data = await client.get_competition(competition_id) return competition_data except APIError as e: raise Exception(f"Failed to get competition {competition_id}: {e}") except Exception as e: raise Exception(f"Unexpected error getting competition {competition_id}: {e}")
  • Helper method in WCAAPIClient that performs the actual API request to retrieve competition data by ID from the WCA static API.
    async def get_competition(self, competition_id: str) -> Dict[str, Any]: """Get a specific competition by ID. Args: competition_id: Competition ID Returns: Competition data """ return await self._make_request(f"competitions/{competition_id}.json")

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