get_leaders
Retrieve ranked user leaderboards showing coding activity metrics to track developer productivity and compare performance across teams.
Instructions
List of users ranked by coding activity in descending order.
operationId: get-wakatime-leaders summary: List of users ranked by coding activity in descending order. description: Mimics https://wakatime.com/developers#leaders tags: [wakatime] responses: 200: description: OK schema: v1.LeadersViewModel
Requires ApiKeyAuth: Set header Authorization to your API Key
encoded as Base64 and prefixed with Basic.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp_tools/leaders.py:7-30 (handler)The handler function for the 'get_leaders' tool. It is decorated with @app.tool, retrieves the Wakapi client via dependency injection, calls client.get_leaders(), and handles exceptions.@app.tool async def get_leaders() -> LeadersViewModel: """List of users ranked by coding activity in descending order. operationId: get-wakatime-leaders summary: List of users ranked by coding activity in descending order. description: Mimics https://wakatime.com/developers#leaders tags: [wakatime] responses: 200: description: OK schema: v1.LeadersViewModel Requires ApiKeyAuth: Set header `Authorization` to your API Key encoded as Base64 and prefixed with `Basic`. """ from mcp_tools.dependency_injection import get_wakapi_client client = get_wakapi_client() try: return await client.get_leaders() except Exception as e: raise ValueError(f"Failed to fetch leaders: {e}") from e
- main.py:136-138 (registration)The import statement and assignment that triggers the registration of the get_leaders tool within the initialize_tools() function.from mcp_tools.leaders import get_leaders _ = get_leaders # Trigger registration
- src/mcp_tools/leaders.py:4-4 (schema)Import of the LeadersViewModel type, used as the return type annotation for the get_leaders handler, serving as the output schema.from wakapi_sdk.client import LeadersViewModel