Skip to main content
Glama

Store API

История трат

get_usage
Read-onlyIdempotent

Spending history for this key: how much went to each model over the last N days, with request counts. — История трат по ключу: сколько ушло на каждую модель за последние N дней.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoHow many days back to look, 1 to 90, 7 by default

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNo
by_modelNo
total_rubNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "by_model": {
      +      "items": {
      +        "properties": {
      +          "cost_rub": {
      +            "type": "number"
      +          },
      +          "input_tokens": {
      +            "type": "number"
      +          },
      +          "model": {
      +            "type": "string"
      +          },
      +          "output_tokens": {
      +            "type": "number"
      +          },
      +          "requests": {
      +            "type": "number"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "days": {
      +      "type": "number"
      +    },
      +    "total_rub": {
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Added

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, covering the safety profile. The description adds context about output grouping (per model, request counts) but does not disclose additional behavioral traits such as data freshness, rate limits, or scope limitations beyond 'this key.'

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?

The description is short and front-loaded with the core purpose. The bilingual repetition of the same sentence adds no new information but is not harmful; it slightly reduces efficiency.

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?

For a simple read-only tool with one optional parameter and an output schema, the description is mostly complete: it states the scope, the time window, and the breakdown by model. It leaves out explicit alternative routing, but that gap was already accounted for in usage guidelines.

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 (1–90, default 7). The description only references 'N days' and adds no meaning beyond the schema, 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?

The description names a specific verb-resource pair: 'spending history for this key' with a per-model breakdown over N days and request counts. This clearly distinguishes it from siblings like get_balance and list_models, even without naming them.

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 when to use the tool: when you need spending history per model over a recent period. However, it does not explicitly state when not to use it or point to alternatives such as get_balance, so guidance is only implied.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.