Skip to main content
Glama

Record a payment

record_payment

Record a payment the calling agent already made against a receipt. BotSupply does not hold or move the money. Requires the edit_token from record_approval. Appends a signed hash-chain event payment_recorded. paid_at defaults to now. Sets paid_before_confirmation when the payment time is before the confirm event, or when a contact was set and the receipt was never confirmed. Sets over_cap when amount exceeds the price cap. Those cases are stored and flagged. They are not rejected. Poll get_receipt and pay only when pay_allowed is true; recording an early or over-cap payment does not make pay_allowed true. Same as POST /v1/receipts/:id/payment.

Input Schema

NameRequiredDescriptionDefault
amountYesAmount paid, in the receipt price-cap currency. over_cap is true when this exceeds the price cap. The payment is still recorded.
paid_atNoWhen the payment happened, ISO-8601. Omit to use the server time. paid_before_confirmation is true when this is earlier than the confirm event, or when a contact was set and the receipt was never confirmed. The payment is still recorded.
edit_tokenYesSecret returned once by record_approval. Required to record a payment.
receipt_idYesReceipt id from record_approval (rcpt_…).
external_payment_refYesId from the payment rail. BotSupply does not look it up and does not move the money.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

Rich disclosure beyond annotations: hash-chain event payment_recorded, paid_at defaulting to now, the paid_before_confirmation and over_cap flags, and the crucial "stored and flagged... not rejected" semantics. What's missing is retry guidance: idempotentHint is false, so an agent should be warned about re-submitting the same external_payment_ref and double-recording.

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 purpose before mechanics, and nearly every sentence carries a distinct rule. Some sentences are fragmentary ("Those cases are stored and flagged. They are not rejected.") and the passage is dense, but nothing is redundant with the schema.

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?

Covers the prerequisite token, flags, and the follow-up action (poll get_receipt) needed to act correctly, which compensates for having no output schema. A brief note on what the call returns or how to safely retry would close the last gap for a non-idempotent write.

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 100%, so the baseline is 3; the description still adds value by explaining what edit_token's provenance is, that paid_at defaults to now, and the consequence of an over-cap amount. external_payment_ref's behavior is left entirely to the schema, so it's not a full 5.

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?

"Record a payment the calling agent already made against a receipt" names a specific verb (record), resource (payment), and scope (a payment already made, not one BotSupply executes). The added "BotSupply does not hold or move the money" separates it cleanly from siblings like create_checkout, purchase, and refund_job.

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?

It states a hard prerequisite ("Requires the edit_token from record_approval"), and a precise sequencing rule with the sibling: "Poll get_receipt and pay only when pay_allowed is true." It also explicitly says recording does not flip pay_allowed, which tells the agent when this tool alone is insufficient.

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