Skip to main content
Glama

spendctl

Approve or deny a held sandbox payment

approve
Idempotent

Approves or denies a payment that sandbox_pay reported as waiting for approval, as the human approver would with spendctl approve. Use it only with an approval id from this sandbox; in the real product a human decides, in the sandbox the model plays that role. Returns the approval id and its new status (approved or denied). An approved payment completes when sandbox_pay is called again with the same approvalId; a denied one stays refused. Deciding the same approval twice keeps the first decision.

Input Schema

NameRequiredDescriptionDefault
noteNoOptional reason recorded with the decision, up to 200 characters
decisionNoapprove releases the held payment; deny refuses it for goodapprove
approvalIdYesThe approval id returned by sandbox_pay in its "waiting for approval" result (Approval id: ...)
sandbox_idYesThe sandbox_id returned by sandbox_create (32 hex characters)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / approvalId / description
      Previous value: -"The approval id reported by sandbox_pay"New value: +"The approval id returned by sandbox_pay in its \"waiting for approval\" result (Approval id: ...)"
    • addedInput schema / properties / decision / description
      Added value: +"approve releases the held payment; deny refuses it for good"
    • addedInput schema / properties / note / description
      Added value: +"Optional reason recorded with the decision, up to 200 characters"
    • addedInput schema / properties / note / maxLength
      Added value: +200
    • changedInput schema / properties / sandbox_id / description
      Previous value: -"The sandbox_id returned by sandbox_create"New value: +"The sandbox_id returned by sandbox_create (32 hex characters)"
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing downstream effects (approved payments complete only on a later sandbox_pay call; denied ones stay refused), the return payload (approval id and new status), and the conflict-resolution rule that the first decision wins on repeats. The first-wins rule sharpens what idempotentHint=true alone cannot express.

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 action and its precondition, then the consequences and the idempotency rule, with no wasted sentences. The real-product-versus-sandbox role framing is mildly tangential but does justify why the model is permitted to decide.

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 4-parameter mutation tool with no output schema, the description covers what it does, when it may be used, what it returns, and what happens afterward. Nothing an agent needs in order to invoke it 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?

Schema coverage is 100%, so the baseline is 3, but the description adds lifecycle meaning for approvalId that the schema does not: it must come from this sandbox and must be reused in sandbox_pay to complete an approved payment. The 'note' parameter and the decision enum are left to the schema, which fully documents them.

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 specific verbs (approves or denies) plus the exact resource (a payment that sandbox_pay reported as waiting for approval), which cleanly separates it from the sibling sandbox_pay that creates those holds. An agent can identify the tool's role without reading the 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 an explicit precondition (only with an approval id from this sandbox), names the sibling that produces that id (sandbox_pay), and frames the role distinction between real product and sandbox. It also tells the agent the downstream step: call sandbox_pay again with the same approvalId for an approved payment.

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