Skip to main content
Glama

spendctl

Check remaining budget

check_budget
Read-only

Shows the sandbox agent's spending limits, what has been spent in each window and what is left. Use it before a paid call when the remaining budget matters, or after a refusal to see which limit was hit. Returns the agent name and mode, the per-request limit, the approval threshold, what happens when a budget is exceeded, the allowed hosts and one line per window (hourly, daily: spent, limit, remaining). Read-only; changes nothing.

Input Schema

NameRequiredDescriptionDefault
sandbox_idYesThe sandbox_id returned by sandbox_create (32 hex characters)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / sandbox_id / description
      Previous value: -"The sandbox_id returned by sandbox_create"New value: +"The sandbox_id returned by sandbox_create (32 hex characters)"
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

The annotations already establish read-only and closed-world behavior, and the description adds useful detail about what the tool returns: agent name and mode, limits, approval threshold, exceeded-budget behavior, allowed hosts, and per-window spent/limit/remaining values. The phrase 'Read-only; changes nothing' repeats the annotation but also reinforces the safety profile.

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 front-loaded with purpose, then usage, then return details. It is efficient overall, though the final read-only sentence is largely redundant with the annotations and the return-value list is somewhat dense.

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?

There is no output schema, so the description carries the burden of explaining return values, and it does so thoroughly: agent mode, per-request limit, approval threshold, exceeded-budget behavior, allowed hosts, and hourly/daily window status. That is sufficient for an agent to call and interpret this read-only budget check.

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?

The schema has 100% description coverage for the single sandbox_id parameter, so the baseline is 3. The description does not add syntax, format, or selection guidance beyond what the schema already provides for sandbox_id.

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 uses a specific verb and resource: it shows the sandbox agent's spending limits, spent amounts, and remaining budget by window. This clearly separates it from siblings such as sandbox_pay, get_policy, and list_receipts, which cover payment, policy, and receipts rather than live budget status.

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?

It gives clear usage contexts: before a paid call when remaining budget matters, or after a refusal to identify the limit hit. It does not explicitly name alternative tools or state when not to use this one, so it falls short of the strongest possible guidance.

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.

Resources