Skip to main content
Glama

check_agent_spend_limits

Read-onlyIdempotent

Validate an agent's proposed spend against per-transaction, daily, and monthly caps. Returns whether allowed, remaining daily limit, and any violations.

Instructions

Guardrail an agent's proposed spend against per-transaction, daily and monthly caps. Stateless: pass the current spent_today/spent_month running totals; nothing is stored. Returns is_allowed, the remaining daily cap and any violations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesIdentifier of the spending agent.
daily_capNoMaximum USD spendable per day.
per_tx_capNoMaximum USD per single transaction.
monthly_capNoMaximum USD spendable per month.
spent_monthNoUSD already spent this month (caller-supplied).
spent_todayNoUSD already spent today (caller-supplied).
proposed_amount_usdYesProposed spend, in USD.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.0.3

TDQS

A4.2/5.0
Behavior4/5

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

Goes beyond the annotations by disclosing that nothing is persisted and that the caller owns the running totals — an important property that prevents an agent from assuming the check tracks spend itself. It also previews the is_allowed/remaining/violations outcome, though with an output schema present that detail is partly redundant. Idempotency and read-only safety are already covered by annotations.

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?

Three tight sentences: purpose first, then the stateless calling contract, then the return shape. No filler; every clause carries information an agent needs.

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 annotations covering the safety profile and an output schema covering return values, the description supplies the remaining critical fact — statelessness and caller-owned totals. It leaves minor ambiguity about cap boundary behavior and default resolution, but nothing that would cause a miscall.

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%, and the schema already labels spent_today/spent_month as '(caller-supplied)' and defines each cap's meaning and defaults. The description reinforces the caller-supplied totals but adds no format, units, or boundary semantics (e.g., inclusive vs exclusive caps) beyond the schema, so baseline 3 applies.

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 ('guardrail ... proposed spend') and resource ('per-transaction, daily and monthly caps'), and the scope is unambiguous. No sibling in the list (token rates, mandates, x402, ISO 20022 conversions) overlaps, so an agent can select this tool without opening the schema.

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 operating context: it is stateless and the caller must supply spent_today/spent_month running totals rather than relying on stored state. It does not state when-not-to-use it or name alternatives, but no sibling competes for this job, so the omission is low-cost.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.