Skip to main content
Glama

deepinfra

Get token usage

deepinfra_get_usage_tokens
Read-only

Get per-model token usage for a period. DeepInfra REST: GET /payment/usage/tokens.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoPeriod end (same format as `from`); defaults to the current period.
fromYesPeriod start (required). Format 'YYYY.MM', or 'current', or 'current(-N)' for N months back, or a unix timestamp in seconds.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior3/5

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

The readOnlyHint annotation already establishes this as a safe read, so the description's bar is lower. It adds the REST endpoint mapping (GET /payment/usage/tokens), which is useful provenance, but says nothing about rate limits, auth scope, or the shape of the returned usage data.

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?

Two compact sentences with the purpose front-loaded and the endpoint reference appended. Nothing is wasted, though the REST endpoint line is developer trivia rather than agent-facing guidance.

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?

For a two-parameter read tool with full schema documentation and a readOnlyHint, this is close to adequate. However, there is no output schema, and the description does not describe what 'per-model token usage' returns, leaving the caller to guess at the response structure.

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 description coverage is 100%, so both 'from' and 'to' are fully documented with format details ('YYYY.MM', 'current', 'current(-N)', unix seconds) and the default for 'to'. The description adds nothing beyond 'for a period', so the baseline of 3 applies.

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?

States a specific verb and resource ('Get per-model token usage') plus the scope ('for a period'), which reads as distinct from generic siblings like deepinfra_get_usage and deepinfra_get_usage_rent. It stops short of explicitly naming those siblings, so differentiation is by inference rather than declaration.

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?

The description gives no guidance about when to choose this over deepinfra_get_usage or deepinfra_get_usage_rent, both of which live in the same account/billing space. Usage is only implied by the name and the 'per-model token' phrasing.

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.