Skip to main content
Glama

Get Stats

get_stats

Retrieve coding statistics for a specific Wakapi user and time range; filter results by project, language, editor, operating system, machine, or label.

Instructions

Retrieve statistics for a given user.

operationId: get-wakatime-stats summary: Retrieve statistics for a given user description: Mimics https://wakatime.com/developers#stats tags: [wakatime] parameters:

  • name: user in: path description: User ID to fetch data for (or 'current') required: true schema: type: string

  • name: range in: path description: Range interval identifier required: true schema: type: string enum: [ "today", "yesterday", "week", "month", "year", "7_days", "last_7_days", "30_days", "last_30_days", "6_months", "last_6_months", "12_months", "last_12_months", "last_year", "any", "all_time" ]

  • name: project in: query description: Project to filter by schema: type: string

  • name: language in: query description: Language to filter by schema: type: string

  • name: editor in: query description: Editor to filter by schema: type: string

  • name: operating_system in: query description: OS to filter by schema: type: str

  • name: machine in: query description: Machine to filter by schema: type: string

  • name: label in: query description: Project label to filter by schema: type: string responses: 200: description: OK schema: v1.StatsViewModel

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userYes
labelNo
rangeYes
editorNo
machineNo
projectNo
languageNo
operating_systemNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesModel for stats data.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 schema fields changedv0.2.0
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / editor / title
      Removed value: -"Editor"
    • removedInput schema / properties / label / title
      Removed value: -"Label"
    • removedInput schema / properties / language / title
      Removed value: -"Language"
    • removedInput schema / properties / machine / title
      Removed value: -"Machine"
    • removedInput schema / properties / operating_system / title
      Removed value: -"Operating System"
    • removedInput schema / properties / project / title
      Removed value: -"Project"
    • removedInput schema / properties / range / title
      Removed value: -"Range"
    • removedInput schema / properties / user / title
      Removed value: -"User"
    • removedOutput schema / $defs
      Removed value: -{
      -  "StatsData": {
      -    "description": "Model for stats data.",
      -    "properties": {
      -      "branches": {
      -        "anyOf": [
      -          {
      -            "items": {
      -              "$ref": "#/$defs/SummariesEntry"
      -            },
      -            "type": "array"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": [],
      -        "title": "Branches"
      -      },
      -      "categories": {
      -        "anyOf": [
      -          {
      -            "items": {
      -              "$ref": "#/$defs/SummariesEntry"
      -            },
      -            "type": "array"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": [],
      -        "title": "Categories"
      -      },
      -      "daily_average": {
      -        "title": "Daily Average",
      -        "type": "number"
      -      },
      -      "days_including_holidays": {
      -        "title": "Days Including Holidays",
      -        "type": "integer"
      -      },
      -      "editors": {
      -        "items": {
      -          "$ref": "#/$defs/SummariesEntry"
      -        },
      -        "title": "Editors",
      -        "type": "array"
      -      },
      -      "end": {
      -        "title": "End",
      -        "type": "string"
      -      },
      -      "human_readable_daily_average": {
      -        "title": "Human Readable Daily Average",
      -        "type": "string"
      -      },
      -      "human_readable_range": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "title": "Human Readable Range"
      -      },
      -      "human_readable_total": {
      -        "title": "Human Readable Total",
      -        "type": "string"
      -      },
      -      "is_coding_activity_visible": {
      -        "title": "Is Coding Activity Visible",
      -        "type": "boolean"
      -      },
      -      "is_other_usage_visible": {
      -        "title": "Is Other Usage Visible",
      -        "type": "boolean"
      -      },
      -      "languages": {
      -        "items": {
      -          "$ref": "#/$defs/SummariesEntry"
      -        },
      -        "title": "Languages",
      -        "type": "array"
      -      },
      -      "machines": {
      -        "items": {
      -          "$ref": "#/$defs/SummariesEntry"
      -        },
      -        "title": "Machines",
      -        "type": "array"
      -      },
      -      "operating_systems": {
      -        "items": {
      -          "$ref": "#/$defs/SummariesEntry"
      -        },
      -        "title": "Operating Systems",
      -        "type": "array"
      -      },
      -      "projects": {
      -        "items": {
      -          "$ref": "#/$defs/SummariesEntry"
      -        },
      -        "title": "Projects",
      -        "type": "array"
      -      },
      -      "range": {
      -        "title": "Range",
      -        "type": "string"
      -      },
      -      "start": {
      -        "title": "Start",
      -        "type": "string"
      -      },
      -      "status": {
      -        "title": "Status",
      -        "type": "string"
      -      },
      -      "total_seconds": {
      -        "title": "Total Seconds",
      -        "type": "number"
      -      },
      -      "user_id": {
      -        "title": "User Id",
      -        "type": "string"
      -      },
      -      "username": {
      -        "title": "Username",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "total_seconds",
      -      "human_readable_total",
      -      "daily_average",
      -      "human_readable_daily_average",
      -      "languages",
      -      "projects",
      -      "editors",
      -      "operating_systems",
      -      "machines",
      -      "range",
      -      "start",
      -      "end",
      -      "status",
      -      "is_coding_activity_visible",
      -      "is_other_usage_visible",
      -      "days_including_holidays",
      -      "user_id",
      -      "username"
      -    ],
      -    "title": "StatsData",
      -    "type": "object"
      -  },
      -  "SummariesEntry": {
      -    "description": "Model for summaries entry.",
      -    "properties": {
      -      "digital": {
      -        "title": "Digital",
      -        "type": "string"
      -      },
      -      "hours": {
      -        "title": "Hours",
      -        "type": "integer"
      -      },
      -      "minutes": {
      -        "title": "Minutes",
      -        "type": "integer"
      -      },
      -      "name": {
      -        "title": "Name",
      -        "type": "string"
      -      },
      -      "percent": {
      -        "title": "Percent",
      -        "type": "number"
      -      },
      -      "seconds": {
      -        "anyOf": [
      -          {
      -            "type": "integer"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "title": "Seconds"
      -      },
      -      "text": {
      -        "title": "Text",
      -        "type": "string"
      -      },
      -      "total_seconds": {
      -        "title": "Total Seconds",
      -        "type": "number"
      -      }
      -    },
      -    "required": [
      -      "name",
      -      "percent",
      -      "total_seconds",
      -      "text",
      -      "digital",
      -      "hours",
      -      "minutes"
      -    ],
      -    "title": "SummariesEntry",
      -    "type": "object"
      -  }
      -}
    • removedOutput schema / properties / data / $ref
      Removed value: -"#/$defs/StatsData"
    • addedOutput schema / properties / data / description
      Added value: +"Model for stats data."
    • addedOutput schema / properties / data / properties
      Added value: +{
      +  "branches": {
      +    "anyOf": [
      +      {
      +        "items": {
      +          "description": "Model for summaries entry.",
      +          "properties": {
      +            "digital": {
      +              "type": "string"
      +            },
      +            "hours": {
      +              "type": "integer"
      +            },
      +            "minutes": {
      +              "type": "integer"
      +            },
      +            "name": {
      +              "type": "string"
      +            },
      +            "percent": {
      +              "type": "number"
      +            },
      +            "seconds": {
      +              "anyOf": [
      +                {
      +                  "type": "integer"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "default": null
      +            },
      +            "text": {
      +              "type": "string"
      +            },
      +            "total_seconds": {
      +              "type": "number"
      +            }
      +          },
      +          "required": [
      +            "name",
      +            "percent",
      +            "total_seconds",
      +            "text",
      +            "digital",
      +            "hours",
      +            "minutes"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "default": []
      +  },
      +  "categories": {
      +    "anyOf": [
      +      {
      +        "items": {
      +          "description": "Model for summaries entry.",
      +          "properties": {
      +            "digital": {
      +              "type": "string"
      +            },
      +            "hours": {
      +              "type": "integer"
      +            },
      +            "minutes": {
      +              "type": "integer"
      +            },
      +            "name": {
      +              "type": "string"
      +            },
      +            "percent": {
      +              "type": "number"
      +            },
      +            "seconds": {
      +              "anyOf": [
      +                {
      +                  "type": "integer"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "default": null
      +            },
      +            "text": {
      +              "type": "string"
      +            },
      +            "total_seconds": {
      +              "type": "number"
      +            }
      +          },
      +          "required": [
      +            "name",
      +            "percent",
      +            "total_seconds",
      +            "text",
      +            "digital",
      +            "hours",
      +            "minutes"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "default": []
      +  },
      +  "daily_average": {
      +    "type": "number"
      +  },
      +  "days_including_holidays": {
      +    "type": "integer"
      +  },
      +  "editors": {
      +    "items": {
      +      "description": "Model for summaries entry.",
      +      "properties": {
      +        "digital": {
      +          "type": "string"
      +        },
      +        "hours": {
      +          "type": "integer"
      +        },
      +        "minutes": {
      +          "type": "integer"
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "percent": {
      +          "type": "number"
      +        },
      +        "seconds": {
      +          "anyOf": [
      +            {
      +              "type": "integer"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null
      +        },
      +        "text": {
      +          "type": "string"
      +        },
      +        "total_seconds": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "name",
      +        "percent",
      +        "total_seconds",
      +        "text",
      +        "digital",
      +        "hours",
      +        "minutes"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  "end": {
      +    "type": "string"
      +  },
      +  "human_readable_daily_average": {
      +    "type": "string"
      +  },
      +  "human_readable_range": {
      +    "anyOf": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "default": null
      +  },
      +  "human_readable_total": {
      +    "type": "string"
      +  },
      +  "is_coding_activity_visible": {
      +    "type": "boolean"
      +  },
      +  "is_other_usage_visible": {
      +    "type": "boolean"
      +  },
      +  "languages": {
      +    "items": {
      +      "description": "Model for summaries entry.",
      +      "properties": {
      +        "digital": {
      +          "type": "string"
      +        },
      +        "hours": {
      +          "type": "integer"
      +        },
      +        "minutes": {
      +          "type": "integer"
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "percent": {
      +          "type": "number"
      +        },
      +        "seconds": {
      +          "anyOf": [
      +            {
      +              "type": "integer"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null
      +        },
      +        "text": {
      +          "type": "string"
      +        },
      +        "total_seconds": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "name",
      +        "percent",
      +        "total_seconds",
      +        "text",
      +        "digital",
      +        "hours",
      +        "minutes"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  "machines": {
      +    "items": {
      +      "description": "Model for summaries entry.",
      +      "properties": {
      +        "digital": {
      +          "type": "string"
      +        },
      +        "hours": {
      +          "type": "integer"
      +        },
      +        "minutes": {
      +          "type": "integer"
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "percent": {
      +          "type": "number"
      +        },
      +        "seconds": {
      +          "anyOf": [
      +            {
      +              "type": "integer"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null
      +        },
      +        "text": {
      +          "type": "string"
      +        },
      +        "total_seconds": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "name",
      +        "percent",
      +        "total_seconds",
      +        "text",
      +        "digital",
      +        "hours",
      +        "minutes"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  "operating_systems": {
      +    "items": {
      +      "description": "Model for summaries entry.",
      +      "properties": {
      +        "digital": {
      +          "type": "string"
      +        },
      +        "hours": {
      +          "type": "integer"
      +        },
      +        "minutes": {
      +          "type": "integer"
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "percent": {
      +          "type": "number"
      +        },
      +        "seconds": {
      +          "anyOf": [
      +            {
      +              "type": "integer"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null
      +        },
      +        "text": {
      +          "type": "string"
      +        },
      +        "total_seconds": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "name",
      +        "percent",
      +        "total_seconds",
      +        "text",
      +        "digital",
      +        "hours",
      +        "minutes"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  "projects": {
      +    "items": {
      +      "description": "Model for summaries entry.",
      +      "properties": {
      +        "digital": {
      +          "type": "string"
      +        },
      +        "hours": {
      +          "type": "integer"
      +        },
      +        "minutes": {
      +          "type": "integer"
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "percent": {
      +          "type": "number"
      +        },
      +        "seconds": {
      +          "anyOf": [
      +            {
      +              "type": "integer"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null
      +        },
      +        "text": {
      +          "type": "string"
      +        },
      +        "total_seconds": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "name",
      +        "percent",
      +        "total_seconds",
      +        "text",
      +        "digital",
      +        "hours",
      +        "minutes"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  "range": {
      +    "type": "string"
      +  },
      +  "start": {
      +    "type": "string"
      +  },
      +  "status": {
      +    "type": "string"
      +  },
      +  "total_seconds": {
      +    "type": "number"
      +  },
      +  "user_id": {
      +    "type": "string"
      +  },
      +  "username": {
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / properties / data / required
      Added value: +[
      +  "total_seconds",
      +  "human_readable_total",
      +  "daily_average",
      +  "human_readable_daily_average",
      +  "languages",
      +  "projects",
      +  "editors",
      +  "operating_systems",
      +  "machines",
      +  "range",
      +  "start",
      +  "end",
      +  "status",
      +  "is_coding_activity_visible",
      +  "is_other_usage_visible",
      +  "days_including_holidays",
      +  "user_id",
      +  "username"
      +]
    • addedOutput schema / properties / data / type
      Added value: +"object"
    • removedOutput schema / title
      Removed value: -"StatsViewModel"
  2. First observed

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses the authentication requirement and encoding format, and 'Retrieve' implies a read operation, but it does not explicitly state read-only behavior, rate limits, pagination, or other operational traits.

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

Conciseness2/5

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

The useful opening sentence is followed by a large pasted OpenAPI/YAML block with operationId, summary, description, tags, parameter definitions, responses, and auth. Much of this is redundant with the input schema or overly low-level, making the description poorly structured and bloated.

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?

Because an output schema exists, return values need not be explained. The description compensates for 0% schema description coverage by documenting every parameter and the authentication method, making the tool callable, though it still lacks sibling-routing guidance.

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

Parameters5/5

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

Input schema description coverage is 0%, but the description includes a detailed parameter list covering all 8 parameters. It explains that user can be 'current', provides the full enum for range, and describes each filter, adding substantial meaning beyond the raw schema.

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 first sentence states a clear verb and resource: retrieve statistics for a given user. It does not differentiate the tool from siblings like get_user or get_projects, and 'statistics' is somewhat generic, but the core purpose is understandable.

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 gives no when-to-use or when-not-to-use guidance relative to alternatives. It mentions the API key requirement, but does not help an agent choose this tool over get_user, get_recent_logs, or other siblings.

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