Skip to main content
Glama

get_usage_trends

Read-onlyIdempotent

Track daily sessions, token use, estimated costs, tool calls, and cache hit rates to spot cost spikes; read-only time-series data for cost and adoption analysis.

Instructions

Daily token usage time-series: sessions, tokens, estimated cost, tool calls, prompt-cache hit rate 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, cache_hit_rate, cache_hit_rate_by_provider }], totals }.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_usage_trends"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoNumber of days to show (default: 30)

Schema Changelog

Changes observed during successful MCP inspections.

  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.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, so restating 'Read-only' is redundant. However, the description adds value beyond annotations by disclosing the exact return shape (daily array plus totals) in the absence of an output schema. It does not mention how cost or cache_hit_rate are computed, which would have earned a 5.

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

Conciseness4/5

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

Front-loaded with purpose, then the alternative, then the return shape — a sensible order with no filler. The inline JSON return description is lengthy but justified because no output schema exists; it is the one area that could be trimmed if a schema were added.

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?

With no output schema, the description compensates by specifying the response fields precisely, and the single parameter is covered by the schema. Combined with the alternative-routing sentence and the safety profile from annotations, an agent has everything needed to invoke and interpret this tool.

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% and the single 'days' parameter is fully documented in the schema, including its default and 1-365 bounds. The description adds no parameter-specific semantics beyond what the schema provides, so the baseline 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?

Opens with a specific verb+resource ('Daily token usage time-series') and enumerates the exact metrics returned (sessions, tokens, cost, tool calls, cache hit rate). It explicitly distinguishes itself from the sibling get_session_analytics, so an agent can select between them without opening either schema.

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?

States the selecting condition ('For spotting cost spikes') and names the alternative plus its condition ('For detailed session breakdown use get_session_analytics instead'). This is explicit when-to-use and when-not-to-use guidance tied to a named sibling.

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