Skip to main content
Glama

DeepInfra MCP by usefulapi

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. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observed

TDQS

B3.2/5.0
Behavior3/5

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

readOnlyHint=true already declares this is a safe read, so the description's job is lighter. It adds the REST mapping (GET /payment/usage/tokens), which is mildly useful context, but says nothing about return grouping, aggregation granularity, or auth requirements. Adequate but not rich.

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 short, front-loaded sentences with no filler; the core purpose leads. The REST endpoint clause is marginally non-essential but not wasteful.

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 two-parameter read tool with fully documented params and no output schema, the definition covers what an agent needs to invoke it correctly. Missing only the sibling disambiguation that would make it fully self-sufficient.

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 both parameters have thorough descriptions ('YYYY.MM', 'current', 'current(-N)', unix timestamp), so the schema carries the semantics. The description adds nothing beyond the period framing, making the baseline 3 correct.

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 is clear enough for an agent to act on. It doesn't differentiate from close siblings like deepinfra_get_usage or deepinfra_get_usage_rent, so it stops short of a 5.

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?

No guidance on when to use this versus deepinfra_get_usage, deepinfra_get_usage_rent, or deepinfra_query_logs. The only hint of usage is the implicit period framing, which an agent must infer.

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.