Skip to main content
Glama

budget_guard

Read-onlyIdempotent

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "description": "A JSON object (returned as text in result.content[0].text). Diagnosis tools return {matched, family, fix, confidence, source, action_class, auto_safe, gate}; other tools return their own JSON result.",
      +  "type": "object"
      +}
  2. First observed

TDQS

A3.9/5.0
Behavior5/5

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

Annotations already establish readOnly, idempotent, non-destructive, closed-world behavior. The description adds important context beyond annotations: it is advisory only and never blocks, runs mid-run without LLM latency, accepts whatever counters are available, and returns suggested_actions plus projected cost of not acting.

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?

Front-loads the core purpose, then output behavior, usage cadence, advisory nature, and a compact parameter list. Every sentence is useful and the description is appropriately sized.

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?

An output schema exists, so return values need not be explained. However, with 11 parameters and very low schema description coverage, the description leaves several inputs semantically unclear, especially task and recent_actions. It is adequate for knowing when to call the tool but not fully complete for invoking it with confidence.

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 should compensate. It lists 8 of 11 parameter names but gives no semantics, units, or usage guidance for them, and omits task, format, and recent_actions entirely. The phrase 'send whatever counters you have' implies optionality but adds little meaning beyond the schema.

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: live MID-RUN budget check, advisory only, fast/no LLM. It is clear what the tool does, but it does not explicitly differentiate itself from related siblings such as suggest_budget_recovery or preflight.

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 usage context: call it every few steps to catch a runaway before hitting a limit. It does not name alternatives or state when not to use it, but the intended cadence and purpose are explicit.

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.