get_stats
Retrieve aggregated session statistics including totals, streaks, and remaining credits to track behavioral activities like meditation, focus, and exercise.
Instructions
Get pre-computed session aggregates. Costs 1 credit.
Returns total sessions, total seconds, current streak in days, and credits remaining. Offloads all calendar arithmetic to the server.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.py:111-120 (handler)The get_stats tool implementation decorated with @mcp.tool(). This function makes a GET request to /stats endpoint and returns pre-computed session aggregates including total sessions, total seconds, current streak in days, and credits remaining. The @mcp.tool() decorator registers this function as an MCP tool.
@mcp.tool() def get_stats() -> dict: """Get pre-computed session aggregates. Costs 1 credit. Returns total sessions, total seconds, current streak in days, and credits remaining. Offloads all calendar arithmetic to the server. """ with _client() as client: response = client.get("/stats") return response.json()