Rail
v0.1.1Budgets, propose-then-approve, and receipts for agents that buy for a human.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
set_budget Set budget
Overwrite the local spend budget. Changes the ledger limit only. Does not spend money, approve a card, settle a purchase, or contact Stripe or Link. Passing the same amount again does not add to the budget.
| Parameter | Type | Description |
|---|---|---|
amount_usd * | number | Budget amount in USD |
currency | string | Currency code; default USD |
note | string | Optional note for this budget |
get_budget Get budget
Read the active budget, amount spent, amount remaining, and the count of pending proposals. Does not change the ledger, spend money, or contact Stripe or Link.
propose_purchase Propose purchase
Record a pending purchase intent only. Moves no money, creates no receipt, approves no card, and does not contact Stripe or Link. Needs a later human approval via decide_proposal before anything settles. When a budget exists and the amount is above what remains, the proposal is stored with over_budget set and still spends nothing.
| Parameter | Type | Description |
|---|---|---|
amount_usd * | number | Purchase amount in USD |
merchant * | string | Merchant or seller name |
rationale | string | Why the agent wants this |
sku | string | SKU or product identifier |
url | string | Product or checkout URL |
list_proposals List proposals
Read purchase proposals filtered by status: pending (default), approved, rejected, or all. Does not approve, reject, spend money, or contact Stripe or Link.
| Parameter | Type | Description |
|---|---|---|
status | string | Filter: pending (default), approved, rejected, or all |
decide_proposal Decide proposal
Approve or reject one pending proposal. This is the step a human should confirm. decision=approve settles the purchase: in the default dry-run mode it writes a settled_dry_run receipt, stamps a fake settlement ref (lsrq_dry_…), and decrements the remaining budget, without calling the network. decision=reject spends nothing and writes no receipt. The proposal can be decided only once; repeating the call does not settle again. Live charging stays off unless separate live gates are set on purpose.
| Parameter | Type | Description |
|---|---|---|
decision * | string | approve settles; reject spends nothing |
proposal_id * | string | Proposal id (prop_…) |
note | string | Optional decision note |
get_receipts Get receipts
Read receipts, newest first, including dry-run settlements and refunds. Does not refund, spend money, or contact Stripe or Link.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max receipts to return |
refund_receipt Refund receipt
Reverse a settled dry-run receipt and restore that amount to the remaining budget. This is the step a human should confirm. Does not contact Stripe or Link. A receipt can be refunded only once; repeating the call does not refund again. Refuses receipts that are not settled_dry_run.
| Parameter | Type | Description |
|---|---|---|
receipt_id * | string | Receipt id (rcpt_…) |
reason | string | Refund reason |