Skip to main content
Glama

Check a payment before paying

safepay_check_payment

Checks a planned payment before it is made. Judges the merchant, amount and task against the account's payment rules, the payee's payment history, a live web check of the merchant and an intent check, and returns allow, hold or block with the reasons, a check id and a signed attestation valid for 15 minutes. Moves no money and stores no payee address or task text, only their hashes.

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": {
      "merchant_name": "<merchant_name>",
      "amount": "<amount>",
      "task": "<task>"
    },
    "name": "safepay_check_payment"
  }
}

Input Schema

NameRequiredDescriptionDefault
taskYesWhat the user asked the agent to do, in their words
payeeNoThe payee account if known (email, PayPal id, or wallet address for a stablecoin)
amountYesTotal to pay
networkNoFor PYUSD or USDC: the network (stellar, ethereum, solana, arbitrum, base, polygon); payee is then the wallet address
purposeNoWhat this payment is for
categoryNoe.g. software, travel, groceries
currencyNoISO 4217 code, or a dollar stablecoin: PYUSD or USDCUSD
invoice_refNoInvoice or order number, if any
merchant_urlNoThe store or checkout URL
merchant_nameYesWho is being paid, as shown at checkout

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses the three-way outcome (allow/hold/block) with reasons, the returned check id, an attestation with a concrete 15-minute validity window, and a privacy guarantee that only hashes of payee address and task text are stored. This adds real operational context — the live web check implying latency and open-world behavior — that the readOnly/openWorld/idempotent hints do not convey.

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?

Two tight sentences: the first establishes what is checked, the second states what comes back and what is not done. No filler, and the most decision-relevant facts (outcome vocabulary, attestation lifetime, no money moved) are front-loaded.

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 compensates by naming the return shape (allow/hold/block, reasons, check id, signed attestation) and its expiry, plus the side-effect profile and data-retention behavior. For a 10-parameter open-world check tool this covers everything an agent needs before calling.

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 100%, so every parameter is already documented, and the description only echoes merchant, amount and task without clarifying formats, currency/network interaction, or which fields materially change the verdict. Baseline 3 is appropriate when the schema carries the parameter burden.

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?

The description states a specific verb and resource — checks a planned payment before it is made — and enumerates exactly what is judged (merchant, amount, task) and against what (account rules, payee history, live web check, intent check). It does not name any sibling (safepay_verify, safepay_recent_checks, safepay_policy) or explain how it differs from them, so an agent must infer the boundary from the returned artifact rather than from explicit routing.

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?

'before it is made' and 'Moves no money' clearly establish the pre-payment gating context and rule out mistaking this for an execution tool. There is no explicit statement of when NOT to call it or which sibling to use instead (e.g., verifying a previously issued attestation), which keeps it below 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.