Skip to main content
Glama

boxSpendCap

Sets, raises, lowers or clears the box's daily spend cap: the most units its watch hits may draw in a UTC day.

  • Cost: Free. Signed by the box's agent over method POST, path /agent/v1/<address lowercased>/box/spend-cap and the body {"maxUnitsPerDay": ...}: the whole number, or null to clear the cap. Or send an ARCGATE-KEY of the account the box is linked to, with no signature. Another account's key, or any key for a box that is not linked, does not apply to the box: the call is checked as if no key were sent, so it needs the signature. A key nobody holds is a 401 key_invalid. The key keeps working after the account has lapsed (its grace has ended).

  • Inputs: address (path), any letter case, and the body {maxUnitsPerDay}, a whole number of at least 1, or null to clear the cap. Leaving it out is a 400, never a clear. A box has no cap until it sets one.

  • Returns: address and maxUnitsPerDay, the cap now (null: none). boxStatus shows it too.

  • The cap: it counts the units the box's watch hits draw in a UTC day, from its own balance or, when the box is linked to an account, from the account. It is not counted before agent.units.cutover for an unlinked box, whose hits spend the allowance. An inbound post and a notice draw no units and are never limited by it. A hit whose units would take the day past the cap is refused whole: it is not stored, nothing is drawn, and it is counted in unstoredWatchHits. Keyed lookups pass through no box and are never limited by it.

  • At the cap: the box's watches pause (state paused_daily_cap in watchList) and arcgate stores one notice message with event paused_daily_cap, maxUnitsPerDay, since and resumesAt. The notice follows each channel's filter. The watches resume with a fresh baseline at the next UTC day, or when the cap is cleared or raised above the units drawn that day: a condition that became true during the pause fires at the next change, and one that had already fired does not fire again. A cap lowered under the day's count pauses the box at its next hit. The box's balance is not touched by the cap.

  • Errors:

    • 400 invalid_request: maxUnitsPerDay is missing, is not a whole number from 1 or null, or the body has another field.

    • 404 box_not_found: the address has no box. Create one first (boxCreate).

  • Next:

    • boxStatus: read the cap.

    • watchList: see whether the watches are paused.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesThe box's address: the agent's own address (an EOA or an EIP-7702 account), any letter case. The box is keyed by it, and a signed request must be signed by it.
agentSignatureNoThe agent's EIP-712 signature over this request, as the AGENT-SIGNATURE, AGENT-NONCE and AGENT-EXPIRY headers carry it over HTTP. Sign the typed data `AgentRequest` with fields `address` (the box), `method`, `path`, `bodyHash`, `nonce` and `expiry`, under the domain {name: "arcgate", version: "1"} with no chainId (a wallet that can only sign with one, such as Circle's, may add the chainId of the chain this deployment serves, 5042 on Arc mainnet, and no other). The `path` is the request path with every parameter filled in and the address lowercased. The `bodyHash` is the keccak256 of the canonical JSON of the body you send (sorted keys, no whitespace), or of no bytes when there is none. Omitting it is a 401 signature_required unless an ARCGATE-KEY of the account the box is linked to is sent (over MCP, on the connection), and it is never a charge: the call is free.
maxUnitsPerDayYesThe most units the box's watch hits may draw in a UTC day, a whole number from 1, or null to clear the cap. Required: leaving it out is a 400, never a clear.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so richly: it declares the call is free/never charged, details the signature-vs-ARCGATE-KEY auth rules and key lapses, describes pause state transitions (paused_daily_cap, resumesAt), notice emission, refusal semantics (whole hit refused, counted in unstoredWatchHits), and enumerates error codes. This is exceptional 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.

Conciseness4/5

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

Front-loaded with the purpose and organized under bolded sections (Cost, Inputs, Returns, The cap, Errors, Next). It is dense and long, with some redundancy between the Inputs and Errors bullets, but nearly every sentence adds operational value for a genuinely complex tool.

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?

No output schema exists, yet the description specifies the return payload ('address' and 'maxUnitsPerDay', with null meaning none) and cross-references boxStatus. Auth, inputs, cap mechanics, errors, and follow-up tools are all covered, leaving nothing an agent needs missing.

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. The description largely restates what the schema already documents (case-insensitive address, whole number ≥1 or null, missing = 400 not clear), adding only marginal nuance such as 'A box has no cap until it sets one.'

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 set and resource ('Sets, raises, lowers or clears the box's daily spend cap'), defines the cap precisely, and references siblings (boxStatus, watchList, boxCreate) so the agent can route correctly. The scope is unambiguous against neighboring tools.

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?

Provides explicit routing ('Next: boxStatus', 'watchList') and prerequisite handling ('the address has no box. Create one first (boxCreate)'), plus the alternative auth paths. It stops short of stating when NOT to use this tool versus an alternative, but context is clear.

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