Skip to main content
Glama

Get spend headroom

get_spend_balance
Read-onlyIdempotent

Return the bound spend key’s policy headroom for the last 24 hours: daily remaining, pending, and paid. This is not the on-chain USDC wallet balance — use get_wallet_balance for that. Call this before pay_offering to check whether a pay would hit the daily cap. Related: get_wallet_balance, get_limits.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_spend_balance"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
noteNoReminder that this is not on-chain wallet balance.
labelNoLabel the owner gave this spend key.
authModeNoHow this MCP session authenticated.
clientNameNoOAuth client name when authMode is oauth (e.g. Claude).
dailyCapUsdNoMaximum USD this key may request in 24 hours.
perTxMaxUsdNoMaximum USD this key may request in one pay.
spentLast24hUsdNoPending plus paid USD started by this key in the last 24 hours.
remainingDailyUsdNodailyCapUsd minus spentLast24hUsd. Policy headroom only.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds genuine value beyond that: the 24-hour evaluation window, the three field meanings, and the warning that this is policy headroom rather than an on-chain balance. It stops short of saying what happens when no spend key is bound, which keeps it off a 5.

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?

Front-loaded with the primary behavior, then the disambiguation, then the usage trigger — a sensible ordering with no filler. The closing "Related: get_wallet_balance, get_limits" partly repeats get_wallet_balance, which was already named one sentence earlier, so it is slightly redundant.

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

Completeness5/5

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

With zero parameters, an output schema present, and annotations covering the safety profile, the description only needs to establish semantics and routing — and it does both. Nothing an agent would need to select or call this tool correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes no arguments, so per the baseline there is nothing for the description to disambiguate. The schema itself carries the authentication note (OAuth or Bearer vapt_…), which covers the only invocation-relevant context.

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 and resource — return the bound spend key's policy headroom — and enumerates what is returned (daily remaining, pending, paid) over a defined 24-hour window. It explicitly distinguishes itself from get_wallet_balance, so an agent can tell the two apart without opening either schema.

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?

Gives a concrete pre-condition: "Call this before pay_offering to check whether a pay would hit the daily cap," plus an explicit alternative for the related-but-different question ("use get_wallet_balance for that"). Both when-to-use and when-not-to-use are covered.

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