Skip to main content
Glama

Spend under a mandate

mandate_spend

Call before each payment: checks the mandate and, if allowed, deducts the amount from the budget and records the payment in the agent's tamper-evident log. Refused payments are logged as blocked. Refused at once if the kill switch is on. Over the organization's live-approval threshold it returns approval_required with an approve_url for the human; call again with approval_id once they approve. Requires the organization API key.

Input Schema

NameRequiredDescriptionDefault
payeeYesWho is being paid: 0x address or domain
referenceNoOrder, invoice or transaction reference
mandate_idYesmdt_... ID
amount_usdcYesPayment amount in USDC
approval_idNoapr_... : the human's live approval, if this payment is over the agent's approval threshold

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, idempotentHint=false, destructiveHint=false) by disclosing side effects: budget deduction, tamper-evident logging, blocked refusals, kill-switch short-circuit, and the live-approval threshold handoff. It also states the API-key requirement, which annotations don't carry.

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 the imperative 'Call before each payment', then layers the conditional branches (refused, kill switch, over-threshold) compactly. Every sentence carries distinct operational information with no padding.

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 no output schema, the description correctly compensates by describing the notable return path (approval_required with approve_url). Combined with auth and failure-mode details, an agent has everything needed to invoke it correctly.

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 payee, mandate_id, amount_usdc, reference and approval_id are already documented in the schema. The description reinforces the approval_id round-trip but adds no syntax or format detail beyond what the schema provides, so the baseline 3 applies.

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 chain and resource: it checks the mandate, deducts from budget, and records the payment. This clearly separates it from sibling mandate_check (read-only check) and mandate_create/revoke, so an agent can pick it without opening any schema.

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?

Gives strong when-to-use guidance with 'Call before each payment' and spells out the approval_required workflow (call again with approval_id). It doesn't name a when-not case or point to an alternative sibling, so it falls just short of a full 5.

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