Skip to main content
Glama

Shared Budget

budget_spend

Shared Budget: ask before each purchase. ALLOW records it against the team cap (returns spend_id + what's left); DENY or ESCALATE records nothing, with the reason. Idempotent by idempotency_key, so retries never double-count. Header X-Budget-Key. Honest limit: two spends in the same instant can both pass; per_tx_max_usd bounds that. By OMENZ. (MCP calls run in AYNE, the free playzone; production: POST https://www.omenz.org/api/tollbooth/v1/budget/spend, $0.002 via x402.)

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": {
      "budget_id": "<budget_id>",
      "amount_usd": "<amount_usd>"
    },
    "name": "budget_spend"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNofull https URL to check
memoNomemo
agentNoagent
budget_idYesbudget id
recipientNorecipient
amount_usdYesamount usd
idempotency_keyNoidempotency key

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the annotations it discloses side effects (ALLOW writes against the team cap, DENY/ESCALATE write nothing), the return contents (spend_id plus remaining budget), an auth requirement (Header X-Budget-Key), and an honest concurrency caveat about two simultaneous spends both passing. The 'Idempotent by idempotency_key' claim sits in tension with idempotentHint=false, though it is defensible as keyed idempotency rather than a true contradiction. The trailing AYNE/x402/branding text is operational noise rather than behavioral disclosure.

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

Conciseness3/5

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

The core outcome semantics are front-loaded and efficient, but the definition then packs in a header name, an edge-case caveat, a vendor attribution, an environment note, a production URL and a per-call price. Several of these do not help an agent decide whether or how to call the tool and dilute the signal.

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?

For a 7-parameter mutation tool with no output schema, it covers the important gaps: what is written, what is returned, the auth header, and the race-condition limit. Missing pieces are minor but real — it does not explain what an ESCALATE outcome obligates the caller to do next, and per_tx_max_usd is cited without existing as a parameter.

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 coverage is 100%, so the baseline is 3, and the description does add real meaning for idempotency_key (retries never double-count) and introduces the X-Budget-Key requirement. But it leaves amount_usd, budget_id, recipient, url, memo and agent entirely to the bare schema strings. It also references per_tx_max_usd, which is not present in the input schema at all.

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 uses a specific verb+resource framing: it is a pre-purchase spend authorization against a shared team budget that returns ALLOW/DENY/ESCALATE. It clearly separates this from a status/read tool by stating it 'records' spending. It stops short of naming the sibling that handles the non-recording path (e.g. budget_status), so it is clear but not fully differentiated.

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?

'ask before each purchase' gives an unambiguous trigger condition, and the ALLOW/DENY/ESCALATE sentence tells an agent what to expect on each path. However, it never states when not to call it or which alternative to use for a read-only cap check, so no exclusions or explicit alternatives are provided.

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.

Resources