Skip to main content
Glama

get_all_time_since_today

Retrieve coding time summary from today onwards for specified user to track development activity and analyze productivity patterns.

Instructions

Retrieve summary for all time since today for the specified user.

operationId: get-all-time summary: Retrieve summary for all time description: Mimics https://wakatime.com/developers#all_time_since_today tags: [wakatime] parameters:

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

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userNocurrent

Implementation Reference

  • MCP tool handler function decorated with @app.tool(). Fetches the Wakapi client and calls its get_all_time_since_today method to retrieve and return AllTimeViewModel.
    @app.tool async def get_all_time_since_today(user: str = "current") -> AllTimeViewModel: """Retrieve summary for all time since today for the specified user. operationId: get-all-time summary: Retrieve summary for all time description: Mimics https://wakatime.com/developers#all_time_since_today tags: [wakatime] parameters: - name: user in: path description: User ID to fetch data for (or 'current') required: true schema: type: string responses: 200: description: OK schema: v1.AllTimeViewModel 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: model: AllTimeViewModel = await client.get_all_time_since_today(user=user) return model except Exception as e: raise ValueError(f"Failed to fetch all time stats: {e}") from e
  • main.py:142-144 (registration)
    Import statement in main.py's initialize_tools() that loads the module, triggering automatic registration via the @app.tool decorator.
    from mcp_tools.all_time import get_all_time_since_today _ = get_all_time_since_today # Trigger registration
  • Underlying WakapiClient helper method that performs the HTTP GET request to the Wakapi API and validates the JSON response into an AllTimeViewModel instance.
    async def get_all_time_since_today(self, user: str = "current") -> AllTimeViewModel: """ Retrieve summary for all time since today for the specified user. operationId: get-all-time summary: Retrieve summary for all time description: Mimics https://wakatime.com/developers#all_time_since_today tags: [wakatime] parameters: - name: user in: path description: User ID to fetch data for (or 'current') required: true schema: type: string responses: 200: description: OK schema: v1.AllTimeViewModel Requires ApiKeyAuth: Set header `Authorization` to your API Key encoded as Base64 and prefixed with `Basic`. """ url = f"{self.base_url}{self.api_path}/users/{user}/all_time_since_today" logger = logging.getLogger(__name__) logger.debug("Calling real Wakapi API for get_all_time_since_today") try: response = await self.client.get(url, headers=self._get_headers()) response.raise_for_status() except httpx.HTTPStatusError as e: raise ApiError( f"Wakapi API error in get_all_time_since_today: " f"{e.response.status_code} - {e.response.text}", details={ "status_code": e.response.status_code, "method": "get_all_time_since_today", }, ) from e json_data = response.json() return AllTimeViewModel.model_validate(json_data)

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