Skip to main content
Glama

Payment decision: may this agent pay, plus a signed audit record

should_i_pay

[Payment decision: may this agent pay, plus a signed audit record] May this agent pay this seller, under the buyer's rules? One call runs the spend-policy check and the x402 seller reputation check and returns one verdict (pay / dont_pay / ask_human), the reasons, both sub-results, and a signed audit record (Ed25519 decisionReceipt plus X-GW8-Receipt / X-GW8-Receipt-Signature). Verify free at POST /api/receipt/verify; public key at GET /.well-known/gw8-receipt-key (enabled should be true). Deterministic; stateless; never pays anyone. Free when the seller data source is down. $0.02. 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/pay/should-i-pay.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "payment": "<payment>",
      "policy": "<policy>",
      "seller": "<seller>"
    },
    "name": "should_i_pay"
  }
}

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
sellerYes
paymentYes
sellerRulesNo

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 no annotations at all, the description carries the full burden and delivers: deterministic, stateless, never moves funds, only charges when seller data is available, $0.02 USDC on Base via x402 MCP with the _meta payment key, and a signed Ed25519 decisionReceipt with named headers plus free verification and public-key endpoints. That is exactly the mutation, cost, and trust context an agent needs before invoking.

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 decision question and verdict, then receipts, then pricing/payment mechanics, so the important framing comes first. It is dense with some redundancy — the bracketed title is restated, price appears twice ('$0.02' then again as USDC), and the full HTTP endpoint is tacked on — but nearly every sentence adds operational value.

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

Completeness3/5

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

The description fully covers output and cost behavior, which matters given there is no output schema. However, for a 5-parameter tool with deep nested objects and only 40% schema description coverage, the input side (policy shape, sellerRules semantics, what the day pass accepts) is left to the schema.

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 description coverage is 40% and the description adds essentially nothing about the five parameters beyond 'under the buyer's rules' loosely implying the policy object; nested shapes like sellerRules (minScore, onCaution, onUnknown) and the policy fields are undocumented in the description. It does clarify return semantics, but for input meaning it barely exceeds the schema.

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 precise decision verb and object ('May this agent pay this seller, under the buyer's rules?') and spells out the composed sub-checks (spend-policy plus x402 seller reputation) and the single verdict returned. An agent can tell this is a composite gate, not the same as the standalone check_spend_policy or check_seller_reputation siblings.

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 clear conditions for calling it (deciding spend approval before paying) and useful cost notes: 'Free when the seller data source is down', a day-pass path to skip per-call payment, and the explicit statement 'never pays anyone'. It lacks explicit 'when not to use this, call X instead' routing against the sibling check tools, so it stops short of a 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.