Skip to main content
Glama

smart_budget_guard

Read-only

Purpose: Team token budget check, count, or usage record. When to use: action=check or count before expensive tools; action=record after token-consuming work. When NOT to use: General chat, reasoning, or as a substitute for the host model. Returns: JSON string with allowance, usage, or record confirmation. Composes with: before smart_fetch/smart_context_gate on large jobs. Omit team_id to use API key tenant.

Input Schema

NameRequiredDescriptionDefault
textNoText for count action.
modelNoModel name for token counting.deepseek-chat
actionYesOne of: check (allowance), count (estimate tokens), record (log usage).
tokensNoTokens to record when action=record.
team_idNoOptional team override; leave empty to use the API key tenant.
messagesNoChat messages for count action.
monthly_limitNoOptional monthly cap override for check.
completion_tokensNoCompletion tokens for record action.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior1/5

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

The annotations declare readOnlyHint=true, but the description includes an action=record path that logs usage, which is a mutating operation. This is a direct safety-profile contradiction that could mislead an agent about whether the tool is safe to call without write expectations.

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 clearly front-loaded with labeled Purpose, When to use, When NOT to use, Returns, and Composes sections. Every line is short and functional, with no wasted text.

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?

It covers usage timing, return shape at a high level, and composition, and an output schema exists. However, for a multi-action tool with a mutating record path, the description does not reconcile that behavior with readOnlyHint=true, leaving a significant safety gap.

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 the schema already explains the eight parameters in detail. The description only restates the action values and the team_id default behavior, adding little parameter-specific meaning beyond the schema.

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 names a specific resource (team token budget) and three concrete actions: check, count, and record. It also distinguishes the tool from general chat/reasoning and from the host model, and it identifies where it composes with smart_fetch/smart_context_gate.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly states when to use each action: check/count before expensive tools and record after token-consuming work. It also gives explicit when-not-to-use guidance and mentions composition with sibling tools on large jobs.

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.