Skip to main content
Glama

get_stats

Retrieve aggregate LLM cost, request count, latency, and error-rate stats for your workspace. Monitor spend and usage volume over time.

Instructions

Get aggregate LLM cost, request count, latency, and error-rate stats for the workspace. Use when the user asks about spend, usage volume, or how things have been going.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupByNoWhen set, returns per-group breakdown from /stats/models instead of overview totals.
timeframeNoTime window. Default '7d'.
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It does not state whether the operation is read-only, idempotent, or any side effects. For a tool that likely performs a query, failing to mention that it is safe to call repeatedly is a gap.

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?

Two sentences with no redundancy. First sentence states functionality, second gives usage guidance. Efficient and front-loaded.

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

Completeness3/5

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

The tool has no output schema, so the description should hint at the output format. It lists the types of stats (cost, request count, latency, error-rate) but does not describe the structure (e.g., per time period, totals). With only 0 required parameters and 2 enums, the tool is simple, but the output remains vague.

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?

Both parameters have schema descriptions (100% coverage). The description adds clarifying context for groupBy ('returns per-group breakdown from /stats/models instead of overview totals') and notes the default for timeframe, which improves understanding beyond the schema alone.

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?

Description clearly states it gets aggregate LLM cost, request count, latency, and error-rate stats. It also provides usage guidance. However, it does not explicitly differentiate from sibling tools like get_savings or get_anomalies, which slightly reduces clarity.

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

Usage Guidelines4/5

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

Explicitly says 'Use when the user asks about spend, usage volume, or how things have been going,' which provides clear context. It does not mention when not to use or alternatives, but the guidance is still helpful.

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/spanlens/Spanlens'

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