Skip to main content
Glama

Snapback

budget_guard

Live MID-RUN budget check (fast, no LLM). Send whatever counters you have and get an advisory on context %, token burn, cost burn, step budget, and off-task drift - with concrete suggested_actions and the projected cost of NOT acting. Call it every few steps to catch a runaway BEFORE you hit a limit. Advisory only (never blocks). Params: step, max_steps, tokens_used, token_budget, cost_used_usd, cost_budget_usd, context_used, context_window.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stepNo
taskNo
formatNo'summary' adds a one-line relayable answer (for chat/Telegram agents); 'summary_only' returns just that line. Default full.
max_stepsNo
tokens_usedNo
context_usedNo
token_budgetNo
cost_used_usdNo
context_windowNo
recent_actionsNo
cost_budget_usdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations provided, the description carries the full disclosure burden. It clearly states the tool is fast, does not invoke an LLM, is advisory only, and never blocks, which is valuable transparency about side effects and execution behavior. It could mention persistence or output details, but the core behavioral nature is well conveyed.

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?

The description is front-loaded with the core value proposition, then gives a clear call cadence, an important behavioral guarantee, and a parameter list. Every sentence earns its place and there is no filler or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the tool's purpose, advisory nature, and usage cadence, which is enough for basic invocation. However, it does not explain the full set of parameters, the output structure, or how missing counters are handled, and there is no output schema to fill that gap.

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

Parameters2/5

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

Schema description coverage is only 9%, so the description must compensate. It merely lists parameter names like step, max_steps, tokens_used, and cost_budget_usd without explaining their meaning, units, or relationships to the computed metrics. It also omits task, format, and recent_actions, leaving significant ambiguity for an agent deciding what to pass.

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 clearly states the tool performs a live mid-run budget check, returning advisory information on context, token, cost, step, and drift metrics. It does not explicitly name sibling tools, but the 'MID-RUN' and 'advisory only' framing helps distinguish it from preflight checks or recovery suggestions.

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?

The description explicitly tells the agent when to call it: 'every few steps' during a run, to catch runaway behavior before hitting a limit. It does not explicitly state when not to use it or name alternatives, so it stops short of a 5.

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.