Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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()
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well by disclosing key behavioral traits: it mentions a cost ('Costs 1 credit'), describes what it returns (specific metrics), and explains a performance benefit ('Offloads all calendar arithmetic to the server'). It doesn't cover error handling or rate limits, but given the lack of annotations, this is a solid effort that adds meaningful context beyond basic functionality.

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

Conciseness5/5

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

The description is highly concise and well-structured: three sentences that efficiently convey cost, return values, and a key benefit. Every sentence earns its place by providing essential information without waste, and it's front-loaded with the core purpose. No extraneous details are included.

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 complexity (simple read operation with no parameters) and the absence of both annotations and an output schema, the description is quite complete: it explains what the tool does, its cost, what it returns, and a server-side advantage. However, it doesn't detail the exact format of the return values (e.g., data types), which could be helpful since there's no output schema, leaving a minor gap.

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 input schema has 0 parameters with 100% coverage, so the baseline is 4. The description appropriately doesn't discuss parameters, as none exist, and instead focuses on the tool's output and behavior, which adds value without redundancy. No compensation is needed since there are no parameters to document.

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 tool's purpose: 'Get pre-computed session aggregates' with specific metrics returned (total sessions, total seconds, current streak, credits remaining). It distinguishes itself from siblings like list_sessions by focusing on aggregated statistics rather than raw session listings. However, it doesn't explicitly contrast with check_session which might also provide some statistical information.

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

Usage Guidelines3/5

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

The description implies usage through the mention of 'Costs 1 credit' and 'Offloads all calendar arithmetic to the server,' suggesting this tool should be used when you need aggregated metrics without client-side computation. However, it doesn't explicitly state when to use this versus alternatives like list_sessions for raw data or check_session for session status, nor does it mention prerequisites or exclusions.

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/thunderrabbit/jikan'

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