Skip to main content
Glama

get_user

Retrieve user profile and statistics from WakaTime to track development activity and coding metrics for productivity analysis.

Instructions

Retrieve the given user.

operationId: get-wakatime-user summary: Retrieve the given user description: Mimics https://wakatime.com/developers#users tags: [wakatime] parameters:

  • name: user in: path description: User ID to fetch (or 'current') required: true schema: type: string responses: 200: description: OK schema: v1.UserViewModel

Requires ApiKeyAuth: Set header Authorization to your API Key encoded as Base64 and prefixed with Basic.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userNocurrent

Implementation Reference

  • The main handler function for the 'get_user' tool, decorated with @app.tool. Includes input parameter 'user: str', calls wakapi client, and returns UserViewModel. Docstring provides OpenAPI schema.
    @app.tool async def get_user(user: str = "current") -> UserViewModel: """Retrieve the given user. operationId: get-wakatime-user summary: Retrieve the given user description: Mimics https://wakatime.com/developers#users tags: [wakatime] parameters: - name: user in: path description: User ID to fetch (or 'current') required: true schema: type: string responses: 200: description: OK schema: v1.UserViewModel 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: user_model: UserViewModel = await client.get_user(user=user) return user_model except Exception as e: raise ValueError(f"Failed to fetch user: {e}") from e
  • main.py:139-141 (registration)
    Explicit import of get_user in initialize_tools() to trigger @app.tool registration.
    from mcp_tools.users import get_user _ = get_user # Trigger registration
  • Helper function used by get_user to obtain the WakapiClient instance via dependency injection.
    def get_wakapi_client() -> WakapiClient: """Get global Wakapi client.""" return _injector.get_wakapi_client()

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/impure0xntk/mcp-wakapi'

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