Skip to main content
Glama

enforce_session_spending_limit

Circuit breaker financiero de sesión: previene bucles de reintento infinitos y agotamiento de saldo en wallets.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "session_id": "<session_id>",
      "max_budget_sats": "<max_budget_sats>",
      "charge_sats": "<charge_sats>"
    },
    "name": "enforce_session_spending_limit"
  }
}

Input Schema

NameRequiredDescriptionDefault
session_idYesID único de la sesión del agente
charge_satsYesCosto de la llamada actual en Satoshis
max_budget_satsYesPresupuesto máximo permitido en Satoshis

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

C2.6/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It hints at a safety mechanism but does not disclose what happens when the limit is exceeded (error, refusal, partial charge), whether state accumulates across calls within a session, whether the tool is idempotent, or whether it mutates any balance. For a stateful financial control tool these are material omissions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler or repetition. It is efficient, though the brevity borders on under-specification given the tool's stateful financial nature.

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

Completeness2/5

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

With no annotations, no output schema, and three required parameters for a stateful enforcement tool, the description should explain breach behavior and state semantics. It does not, leaving the agent unable to predict the result of a call that exceeds the budget.

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 all three parameters (session_id, charge_sats, max_budget_sats) are already documented in the schema. The description adds no further semantics about units, accumulation behavior, or how max_budget_sats interacts with charge_sats, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description frames the tool as a 'circuit breaker financiero de sesión' that prevents infinite retry loops and wallet depletion, which conveys the general intent. However, it never states the concrete operation: whether it merely checks the budget, records a charge, or throws/blocks on breach. The name says 'enforce' and a parameter is 'charge_sats', but the description does not resolve that ambiguity.

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

Usage Guidelines2/5

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

There is no explicit when-to-use guidance, no call ordering, and no mention of how it relates to siblings such as redeem_credits_for_sats or verify_l402_payment. The agent must infer that it should be invoked before or around each paid call, which is a significant inference.

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.