Skip to main content
Glama

Create a spendctl sandbox

sandbox_create

Creates an isolated spendctl sandbox and returns its sandbox_id. Call it first: every other tool needs the sandbox_id, and one sandbox serves a whole conversation (create another only to try a different preset). The sandbox is a real spendctl sidecar with a throwaway wallet, a mock x402 facilitator and two mock paid APIs; no real money moves and nothing outside the sandbox is reachable. Returns the sandbox_id, the agent's policy (budgets, allowed hosts, approval rule) and the paid endpoints with their prices. Limits: 5 sandboxes per minute per client address (claude.ai users share addresses and get a larger allowance); a sandbox expires after 2 hours without calls (24 hours at most). Example: preset "strict" to see refusals, "approvals" to see a payment held for a human.

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": "sandbox_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
presetNoPolicy preset. default: comfortable caps, both endpoints allowed; strict: $0.015 per request and $0.03 per day, weather only, so the search API and a fourth weather call are refused; approvals: payments at or above $0.015 wait for approvedefault

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / preset / description
      Previous value: -"default: comfortable caps; strict: low caps that cause refusals; approvals: payments at or above $0.015 wait for a human"New value: +"Policy preset. default: comfortable caps, both endpoints allowed; strict: $0.015 per request and $0.03 per day, weather only, so the search API and a fourth weather call are refused; approvals: payments at or above $0.015 wait for approve"
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnly=false, openWorld=false, idempotent=false, destructive=false; the description goes well beyond by explaining what the sandbox actually contains (throwaway wallet, mock x402 facilitator, two mock paid APIs), that no real money moves, and that nothing outside is reachable. It also discloses two operational constraints an agent could not infer: a 5-per-minute rate limit per client address and expiry after 2 hours idle (24 hours max).

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?

Front-loads purpose and the prerequisite relationship before dropping into environment details, return payload, limits, and examples. Despite covering a lot, every sentence carries distinct information — no restatement of the title or the schema, and no filler.

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?

For a setup tool with no output schema, the description supplies everything an agent needs: what is created, what is returned (sandbox_id, policy with budgets/hosts/approval rule, paid endpoints with prices), lifetime and rate limits, and the safety envelope. Nothing material about calling it correctly is left unstated.

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?

Schema coverage is 100% and the single enum parameter is already fully documented in the schema, so the baseline is 3. The description adds value by tying preset values to observable scenarios ('strict' produces refusals, 'approvals' produces a held payment), which tells an agent why it would pick each value rather than just what the values are.

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?

Opens with a specific verb and resource ('Creates an isolated spendctl sandbox') and immediately names the artifact produced ('returns its sandbox_id'). It also positions itself against the whole sibling set by declaring 'Call it first: every other tool needs the sandbox_id', so an agent knows this is the prerequisite tool, not one of approve/check_budget/list_receipts.

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 explicit sequencing ('Call it first'), a reuse rule ('one sandbox serves a whole conversation'), and the only condition for creating another ('create another only to try a different preset'). It even maps preset choice to intent ('strict' to see refusals, 'approvals' to see a payment held), which is precisely the when-to-use guidance an agent needs for a setup tool.

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