Skip to main content
Glama

get_all_time_since_today

Retrieve total coding time statistics for a user from the beginning of tracking until today. Use this tool to analyze overall development activity and 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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes

Implementation Reference

  • The main MCP tool handler function, decorated with @app.tool, that fetches all-time-since-today stats from Wakapi via the client.
    @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 that triggers the tool registration by loading the decorated handler function.
    from mcp_tools.all_time import get_all_time_since_today
    
    _ = get_all_time_since_today  # Trigger registration
  • Pydantic models defining the output schema: AllTimeViewModel, AllTimeData, and AllTimeRange.
    class AllTimeRange(BaseModel):
        """Model for all time range."""
    
        start: str
        start_date: str
        end: str
        end_date: str
        timezone: str
    
    
    class AllTimeData(BaseModel):
        """Model for all time data."""
    
        total_seconds: float
        text: str
        is_up_to_date: bool
        range: AllTimeRange
    
    
    class AllTimeViewModel(BaseModel):
        """Model for all time view."""
    
        data: AllTimeData
  • Underlying WakapiClient method that performs the actual API call to retrieve all-time-since-today data and validates with Pydantic models.
    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)
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds useful context: it mimics a specific external API, requires authentication via ApiKeyAuth with a Basic header, and implies a read-only operation ('retrieve'). However, it doesn't disclose rate limits, error handling, or response format details beyond the schema reference, leaving gaps for a tool with authentication requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is moderately concise but includes extraneous OpenAPI metadata (operationId, summary, tags, responses) that doesn't directly aid tool selection. The core purpose is front-loaded, but the additional details add noise without clear value. It could be more streamlined by focusing only on actionable information for the agent.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 parameter), no annotations, and the presence of an output schema (which handles return values), the description is reasonably complete. It covers authentication needs and parameter semantics adequately. However, it lacks error handling or rate limit info, which would enhance completeness for an authenticated API tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains the 'user' parameter as 'User ID to fetch data for (or 'current')', clarifying the optional default and special value 'current'. This compensates well for the schema's lack of descriptions, though it doesn't detail format constraints or examples beyond this.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'retrieve' and resource 'summary for all time since today for the specified user', making the purpose evident. It distinguishes from siblings by specifying the time scope ('all time since today'), though it doesn't explicitly contrast with tools like get_stats or get_recent_logs. The purpose is specific but not fully differentiated from all alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like get_stats or get_recent_logs. It mentions the API endpoint it mimics but doesn't explain the context or prerequisites for choosing this specific summary retrieval. There's an implied usage based on the time scope, but no explicit when/when-not instructions or named alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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