Skip to main content
Glama

get_stats

Read-onlyIdempotent

Retrieve a high-level statistical overview of OpenCode conversations, including session counts, messages, cost, time range, distribution, and top directories by activity.

Instructions

Overview statistics: session counts, messages, cost, time range, and distribution.

Root vs sub-agent breakdown. Top directories by activity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
directoryNoOptional scope (global if omitted)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

Annotations already declare the tool as read-only and idempotent, so the safety profile is covered. The description adds context about the content of the statistics (e.g., root vs sub-agent breakdown, top directories) but does not disclose deeper operational behaviors such as authentication needs, rate limits, or how the optional directory scope affects output. The added content is useful but not rich enough to warrant a higher score.

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 compact: two sentences that front-load the main purpose and then list specific breakdowns. Every word is informative, with no redundancy or fluff. The structure is clear and easy to parse.

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?

The tool is simple (one optional parameter), has an output schema, and benefits from strong annotations. The description covers the core purpose and primary output facets, enough for an agent to know what to expect. It does not mention the directory parameter, but the schema handles that, and the description's job is to add value beyond structured fields, which it does with the statistics breakdown.

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

Parameters3/5

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

Schema coverage is 100% for the single parameter `directory`, and the schema description already explains it as an optional scope. The tool description does not add any additional meaning or usage details for the parameter, so the baseline score of 3 applies.

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

Purpose5/5

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

The description clearly states that the tool provides overview statistics, enumerating specific metrics like session counts, messages, cost, time range, and distribution. It also mentions breakdowns by root vs sub-agent and top directories. This distinguishes it from sibling tools that focus on searching or retrieving individual sessions/messages.

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?

No explicit guidance is given for when to use this tool versus alternatives. The description merely states what it does without mentioning any alternatives or exclusions. Sibling tool names suggest more specific options exist (e.g., get_session_detail, list_sessions), but the description does not clarify when to choose get_stats over them.

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/crottolo/opencode-history-mcp'

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