Skip to main content
Glama
This connector has been deprecated

This connector is a duplicate. Use Hubris instead — same endpoint (https://api.hubris.pw/mcp), but with ownership verified, OAuth, all five tools inspected and a quality score.

Get spending for a period

usage_get
Read-onlyIdempotent

What this connection has spent over a period: requests, tokens, cache savings and the total in rubles. Same as GET /v1/usage. With an API key that is the key's spending; connected through OAuth, it is the spending of the whole app connection over the period, not just of the current hourly token.

Use it to report what a run cost, to check spending against a budget, or to see the charge of tools that do not return their own price (image_generate, speech_create). balance_get shows what is left on the account.

Free to call: it only reads.

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": "usage_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
periodNoPeriod: "today", "24h" (default), "7d", "30d" or "mtd" — month to date. All times in UTC.

Output Schema

NameRequiredDescriptionDefault
scopeYes
by_keyNo
objectYes
periodYes
totalsYes
bucketsYes
by_modelNo
granularityYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedOutput schema / properties / by_model / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "completion_tokens": {
      -          "minimum": 0,
      -          "type": "integer"
      -        },
      -        "cost_kopecks": {
      -          "type": "string"
      -        },
      -        "model": {
      -          "type": "string"
      -        },
      -        "prompt_tokens": {
      -          "minimum": 0,
      -          "type": "integer"
      -        },
      -        "requests": {
      -          "minimum": 0,
      -          "type": "integer"
      -        }
      -      },
      -      "required": [
      -        "model",
      -        "requests",
      -        "prompt_tokens",
      -        "completion_tokens",
      -        "cost_kopecks"
      -      ],
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "cache_read_tokens": {
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "cache_write_tokens": {
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "completion_tokens": {
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "cost_kopecks": {
      +          "type": "string"
      +        },
      +        "input_tokens_total": {
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "model": {
      +          "type": "string"
      +        },
      +        "prompt_tokens": {
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "requests": {
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "total_tokens": {
      +          "minimum": 0,
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "model",
      +        "requests",
      +        "prompt_tokens",
      +        "completion_tokens",
      +        "cache_read_tokens",
      +        "cache_write_tokens",
      +        "input_tokens_total",
      +        "total_tokens",
      +        "cost_kopecks"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / properties / totals / properties / input_tokens_total
      Added value: +{
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedOutput schema / properties / totals / required
      Previous value: -[
      -  "requests",
      -  "prompt_tokens",
      -  "completion_tokens",
      -  "total_tokens",
      -  "cost_rub",
      -  "cost_kopecks",
      -  "cache_read_tokens",
      -  "cache_write_tokens",
      -  "reasoning_tokens",
      -  "cache_hit_rate",
      -  "cache_savings_kopecks",
      -  "cache_savings_rub"
      -]New value: +[
      +  "requests",
      +  "prompt_tokens",
      +  "completion_tokens",
      +  "input_tokens_total",
      +  "total_tokens",
      +  "cost_rub",
      +  "cost_kopecks",
      +  "cache_read_tokens",
      +  "cache_write_tokens",
      +  "reasoning_tokens",
      +  "cache_hit_rate",
      +  "cache_savings_kopecks",
      +  "cache_savings_rub"
      +]
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that results differ by auth mode (API key = that key's spend; OAuth = whole app connection's spend, not the hourly token), which is a scope caveat an agent cannot infer from readOnlyHint/idempotentHint. It also adds cost transparency ('free to call') — unusually relevant for a billing tool — and an endpoint mapping for cross-referencing.

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 the return contents, then usage, then the sibling pointer — a sensible order with no filler. Slightly long for a one-parameter read tool, but every sentence carries distinct information.

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?

For a read-only, single-param tool with an output schema and full annotations, the description covers the remaining gaps: auth-dependent scope, cost of calling, and the sibling boundary. Nothing an agent needs to invoke it correctly 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% and the single enum parameter is fully documented, including the UTC note, so the schema does the heavy lifting. The description only implies period-based filtering ('over a period') without adding format guidance, matching the baseline 3 for high-coverage schemas.

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 opening clause names a specific resource (spend over a period) and enumerates exactly what is returned: requests, tokens, cache savings, and total in rubles. It also pins the monetary unit (rubles) and maps to the underlying endpoint (GET /v1/usage), which the other 14 siblings don't overlap with.

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?

Explicitly lists three concrete use cases (report run cost, check against budget, price tools that don't return cost such as image_generate/speech_create) and names the alternative for a different question: balance_get for what remains. Both when-to-use and when-to-use-something-else are stated.

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.