Skip to main content
Glama

Check before a payment

preflight_payment
Read-only

For a structured invoice, call review_invoice first. Before paying, compare the supplied human approval with the payment and run rail checks (invoice: IBAN, account change). Without approved: review_required or stop, never no_blockers_found. Returns checks and signed evidence. Never pays; unrun checks never pass. Free, no token.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
railYesPayment fields are always required, approved fields only when approved is supplied: approved.amount and payment.amount/currency (not x402); invoice_bank also approved.payee.name, payment.iban/payeeName; card_or_giftcard approved.payee.merchant, payment.merchant/instrument; crypto_bridge approved.payee.merchant, payment.provider/merchant; x402 approved.amountAtomic/asset/network/payee.payTo, payment.challenge/resourceUrl.
checksNoOpt-in registers, run only on a connected door.
invoiceNoThe invoice as review_invoice takes it.
mandateNo
paymentYes
approvedNoOnly supply what a human explicitly approved in this conversation or a supplied approval record; NEVER construct it from the payment request itself; omit it when there is no approval.
ibanOnFileNoThe account on the vendor record.
instructionSourceNoOnly supply what a human explicitly approved in this conversation or a supplied approval record; NEVER construct it from the payment request itself; omit it when there is no approval.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
kindYes
evidenceNoSigned decision evidence, present when a signing key is configured.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / approved / description
      Added value: +"Only supply what a human explicitly approved in this conversation or a supplied approval record; NEVER construct it from the payment request itself; omit it when there is no approval."
    • addedInput schema / properties / instructionSource / description
      Added value: +"Only supply what a human explicitly approved in this conversation or a supplied approval record; NEVER construct it from the payment request itself; omit it when there is no approval."
    • changedInput schema / properties / rail / description
      Previous value: -"Required: approved.amount and payment.amount/currency (not x402); invoice_bank also approved.payee.name, payment.iban/payeeName; card_or_giftcard approved.payee.merchant, payment.merchant/instrument; crypto_bridge approved.payee.merchant, payment.provider/merchant; x402 approved.amountAtomic/asset/network/payee.payTo, payment.challenge/resourceUrl."New value: +"Payment fields are always required, approved fields only when approved is supplied: approved.amount and payment.amount/currency (not x402); invoice_bank also approved.payee.name, payment.iban/payeeName; card_or_giftcard approved.payee.merchant, payment.merchant/instrument; crypto_bridge approved.payee.merchant, payment.provider/merchant; x402 approved.amountAtomic/asset/network/payee.payTo, payment.challenge/resourceUrl."
    • changedInput schema / required
      Previous value: -[
      -  "rail",
      -  "approved",
      -  "payment"
      -]New value: +[
      +  "rail",
      +  "payment"
      +]
  2. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnlyHint, destructiveHint=false), yet the description adds substantial behavior: it never pays, unrun checks never pass, it returns signed evidence, it is free with no token, and it defines a forbidden success state when no approval is supplied. That is exactly the kind of context annotations cannot carry.

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?

Very compact and front-loaded with the prerequisite, and the cost note ('Free, no token') earns its place. The telegraphic style ('Without approved: review_required or stop') is dense enough to risk ambiguity for an unfamiliar reader.

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?

An output schema exists, so return values need not be explained, and the description still notes checks plus signed evidence. For a complex 8-parameter tool with nested objects, it covers prerequisites, failure states, and side-effect freedom well, though rail-specific input requirements are left entirely to the schema.

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 75% and the schema already documents rail-specific required fields and the approved/instructionSource rules. The description still adds the core relationship semantics: approval must be compared against the payment, and the invoice rail specifically checks IBAN and account change. This meaningfully supplements the schema without repeating it.

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 action (compare supplied approval with the payment and run rail checks) and a clear precondition (review_invoice first for structured invoices). It distinguishes itself from review_invoice by sequencing, but does not explicitly separate itself from the sibling check_payment_change, which overlaps with the 'account change' check it mentions.

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 explicit ordering (call review_invoice first for a structured invoice), the condition for use (before paying), and the required outcome state without an approval (review_required or stop, never no_blockers_found). An agent knows both when to call it and what result to expect.

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.