Skip to main content
Glama

Cloud for Bots

budget-guard: open_budget

budget_open_budget

[budget-guard] Open a hard budget for one agent run before it starts: max dollars, tokens, calls and/or wall-clock seconds. Returns a handle. Give the handle to every sub-agent; they all draw from the same ledger, so one runaway loop or fork cannot exceed the run cap.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoshadow = watch only: track spend and flag where the cap WOULD have stopped the run, never block (free). enforce = return allowed=false at the cap (Pro). Default: enforce on Pro, shadow on free.
labelNoWhat this run is for, e.g. "nightly code cleanup".
max_usdNoDollar cap for the whole run (your own estimates per call).
max_callsNoCap on model/tool calls for the whole run.
ttl_hoursNoHandle lifetime (free max 24, Pro max 168). Default 24.
max_tokensNoToken cap (input + output) for the whole run.
max_secondsNoWall-clock cap in seconds from now.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does useful work: it discloses that a handle is returned, that the ledger is shared across sub-agents, and that the cap is genuinely enforcing ('cannot exceed the run cap'). It omits auth/tier requirements and what an exceeded-cap response looks like (the schema's mode field hints at this but the description doesn't).

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?

Two sentences, front-loaded with the action and scope, then the propagation rule that an agent most needs. No filler, and the handle-sharing constraint is given prominence rather than buried.

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 7-param tool with no output schema and no annotations, the description covers the essentials: what it opens, that it returns a handle, and how to use it across a run. Missing only edge details such as what happens at the cap boundary and whether a companion close/status sibling must be used.

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 description coverage is 100%, so every one of the 7 parameters is already documented in the schema with defaults, enums, and tier limits. The description paraphrases the cap dimensions but adds no format, unit, or interaction detail beyond what the schema provides; baseline 3 is appropriate.

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?

States a specific verb (Open) plus resource (a hard budget) and scope (one agent run, before it starts), and enumerates the cap dimensions: dollars, tokens, calls, wall-clock seconds. This clearly distinguishes it from siblings like budget_budget_status, budget_record, and budget_reserve, which manage an existing ledger rather than opening one.

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 clear lifecycle context ('before it starts') and tells the agent to propagate the returned handle to every sub-agent so they share one ledger. It does not, however, name when NOT to use it or explicitly point to a sibling alternative (e.g. budget_reserve vs this), so it stops short of full routing 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