Skip to main content
Glama

Budget and spend

get_budget
Read-only

Your monthly and daily budget limits, what has been spent this month and today, what running jobs have reserved and what is left. Check it before a large batch or an expensive compute class; a price limit for a single job is set with max_cost when the job is started.

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

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
alertNoSpend reached the alert threshold.
blockedNoNo new paid work fits into the budget.
currencyNoBilling currency.
left_todayNoLeft today, if there is a daily limit.
daily_limitNoDaily limit (micros and amount), or null.
spent_todayNoSpent today (micros and amount).
monthly_limitNoMonthly limit (micros and amount), or null.
left_this_monthNoLeft this month, if there is a monthly limit.
spent_this_monthNoSpent this month (micros and amount).
reserved_by_running_jobsNoReserved by running jobs (micros and amount).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare a read-only, non-destructive, closed-world call, so safety is covered. The description adds meaningful semantics beyond that: the values include amounts reserved by running jobs, not just realized spend, which an agent could not infer from annotations alone. It stops short of stating freshness, reset timezone, or whether figures are cached, so with an output schema present a 3 is fair.

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 sentences, front-loaded with what the tool returns and followed by the decision point that selects it. The max_cost clause is a useful routing hint rather than filler, but it consumes roughly half the text to describe another tool's argument, which keeps this just below top marks.

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 inputs, a full annotation set, and an output schema, the description only needs to convey scope and timing of use, which it does. The remaining gap is minor operational detail such as how often limits reset or how stale the reported spend may be.

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?

The tool takes zero parameters, so the baseline of 4 applies; there is nothing to mis-specify. The only mention of a parameter, max_cost, correctly belongs to a different tool and is not presented as an input here.

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?

The description names the exact resource and its contents: monthly and daily limits, spend this month and today, reserved amounts from running jobs, and remaining balance. That is concrete enough to separate it from every sibling listed (none of which report budget), though it is phrased as a noun inventory rather than an explicit verb+resource statement.

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 a clear trigger — check before a large batch or an expensive compute class — and routes the per-job case elsewhere by naming max_cost at job start. There is no explicit 'when not to use' or warning against polling it in a loop, but the decision context is stated plainly.

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