Skip to main content
Glama

Check whether there is usage budget left

check_budget
Read-only

Checks if your provider usage is below a set threshold so you can decide whether to start an expensive task now or postpone it until the limit resets.

Instructions

Checks if a provider is below a usage threshold, so you can decide whether to start a long or expensive task now or postpone it until the limit resets. Without window, checks every window and reports the tightest one. Returns ok, usedNow, resetsInSeconds and advice.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "provider": "<provider>"
    },
    "name": "check_budget"
  }
}

Input Schema

NameRequiredDescriptionDefault
windowNoLimit window: "5h" (short window, the first) or "7d" (long window, the second). Labels like "1d" or "30d" also work.
providerYesProvider id, e.g. "claude" or "codex".
max_percentNoBudget threshold in percent (default 80). ok = usedNow < max_percent.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare this is a read-only, closed-world operation, so the safety profile is covered. The description adds meaningful behavior beyond that: omitting `window` scans every window and reports the tightest one, and the response includes ok, usedNow, resetsInSeconds and advice — useful for interpreting results. It does not detail what the 'advice' field contains or any cost/latency of a full multi-window scan.

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

Conciseness5/5

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

Three short sentences in a logical order: what it does and why, the default-behavior edge case, then the return shape. No redundant restatement of the name or filler wording.

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?

With no output schema, the description appropriately enumerates the returned fields, and with only three fully documented parameters it covers the input side adequately. It leaves minor gaps around the content of 'advice' and what the tightest-window selection means numerically when multiple limits apply.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, and the description earns one step above it by explaining the semantic consequence of omitting `window` (checks all windows, reports the tightest), which the schema only states as optional. It confirms the ok/usedNow/max_percent relationship but adds little else beyond schema text.

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 (checks a provider against a usage threshold) and frames the decision it supports: start an expensive task now or postpone it. It does not explicitly contrast itself with the siblings get_usage and time_until_reset, so an agent must infer the boundary from the returned fields rather than being told.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear usage context — call this before starting a long or expensive task — and explains the aggregate fallback when `window` is omitted. It stops short of naming when to prefer get_usage or time_until_reset instead, so alternative-selection guidance is implied rather than stated.

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

Deploy Server

Other Tools