Skip to main content
Glama

get_usage_trends

Read-onlyIdempotent

Track daily token usage and cost trends to identify spending spikes across sessions, tokens, and tool calls.

Instructions

Daily token usage time-series: sessions, tokens, estimated cost, tool calls per day. For spotting cost spikes. Read-only. For detailed session breakdown use get_session_analytics instead. Returns JSON: { days, daily: [{ date, sessions, tokens, cost_usd, tool_calls }], totals }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoNumber of days to show (default: 30)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changedv3.3.0
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
  2. Addedv1.41.0
  3. Removedv1.38.0
  4. Changed1 schema field changedv1.35.1
    • removedInput schema / additionalProperties
      Removed value: -false
  5. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the read-only nature disclosed in the description is consistent but not new. The description adds value by revealing the exact return shape (JSON with days, daily array, totals) and the daily time-series granularity, which the annotations do not convey.

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?

Three dense sentences with no fluff. The main purpose is front-loaded, the use case and alternative follow immediately, and the return format is compactly summarized. Every sentence earns its place.

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

Completeness5/5

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

The tool has only one optional parameter, no output schema, and low complexity. The description covers the purpose, the use case, the alternative tool, the safety profile is in annotations, and the return JSON shape is fully specified. There is nothing an agent needs to call this correctly that is missing.

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% with the parameter description already stating it is the number of days and the default of 30. The tool description adds no additional semantics for the 'days' parameter, but it does corroborate that the output contains a 'days' field, which is minimal extra context. Baseline 3 is appropriate.

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?

States a specific verb and resource: produces a daily token usage time-series with sessions, tokens, estimated cost, and tool calls. The phrase 'For spotting cost spikes' clarifies the intended use, and it explicitly differentiates itself from get_session_analytics, so an agent can distinguish it from siblings without opening schemas.

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

Usage Guidelines5/5

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

Gives an explicit use case ('For spotting cost spikes') and names the alternative when a different need exists ('For detailed session breakdown use get_session_analytics instead'). This gives clear selection criteria with no inference required.

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

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/nikolai-vysotskyi/trace-mcp'

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