Skip to main content
Glama

Spend-policy check (allow / deny / needs_approval)

check_spend_policy

[Spend policy: agent payment risk check] Before an agent pays: check a proposed payment against the buyer's rules (per-tx limit, rolling cap with spent-so-far, merchant categories, allow/deny lists, allowed hours + timezone, assets/chains, human-approval threshold). Returns decision, the rules that fired, every check, and a signed decision receipt. Stateless, deterministic; not custody, does not execute payments. Paid: $0.02 USDC on Base, paid in-band via x402 MCP (@x402/mcp; _meta "x402/payment"). Also at POST https://micro-saas-agent.onrender.com/api/spend/check.

Input Schema

NameRequiredDescriptionDefault
passNoOptional GW8 day pass token (from buy_day_pass / POST /api/pass/day); skips per-call payment
policyYescurrency, perTxLimit, rollingCap {limit, spentSoFar, windowHours}, allowedCategories, blockedCategories, allowList, denyList, onUnlisted (deny|needs_approval), allowedHours {start, end, timezone, days}, allowedAssets, allowedChains, requireApprovalAbove
paymentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior5/5

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

With zero annotations the description carries the full burden and does it well: stateless, deterministic, not custody, does not execute payments — the key risk facts an agent needs before routing a payment decision here. It also discloses the paid cost, the exact payment mechanism (_meta "x402/payment"), and the fallback HTTP endpoint, none of which appear in structured fields.

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 bracket tag then the trigger clause, and each subsequent sentence adds distinct information (rule coverage, return contents, guarantees, pricing). The parenthetical rule list is dense but efficient; the leading '[Spend policy: agent payment risk check]' label is mild redundancy against the title.

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

Completeness4/5

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

Given no output schema and a nested two-object input, the description covers the return shape ('decision, the rules that fired, every check, and a signed decision receipt'), the statelessness guarantee, and the paywall, which is most of what an agent needs. Edge behavior — malformed policy, currency mismatch, or what happens when payment is rejected — is not addressed.

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 67% and the nested policy object has an empty properties block, so the prose is doing real work: the parenthetical maps the policy object's semantics (rolling cap with spentSoFar, onUnlisted behavior implied, requireApprovalAbove) and the payment object is framed as the proposed transaction. Individual payment fields (memo, recipientDomain, timestamp) remain uninterpreted in both prose and schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — 'check a proposed payment against the buyer's rules' — and enumerates the rule dimensions (per-tx limit, rolling cap, merchant categories, hours/timezone, approval threshold), so the scope is unambiguous. It never names the overlapping sibling should_i_pay or check_seller_reputation, so the agent must infer the boundary between policy-checking and pay/reputation decisions.

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?

The 'Before an agent pays' framing is an explicit trigger condition, and the payment terms ($0.02 USDC on Base in-band via x402, with a day-pass bypass documented in the schema) tell the agent what must be in place to call it. There is no explicit statement of when NOT to use it or which sibling to pick instead of this check.

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.