send_money
Send payments to recipients via email, phone number, or Solana wallet address. Unclaimed funds automatically return to sender after 3 days.
Instructions
Send money to an email, Solana wallet or phone number. The provided email or phone can be used to claim the money of the wallet. If new user does not claim for 3 days, the money is returned to the sender.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | One or multiple recipients | |
| amount | Yes | Amount to send | |
| currency | No | Currency of specified amount to send | USD |
| title | No | A title for the transaction shown to the receiver |
Implementation Reference
- src/tools/payments.ts:50-81 (handler)The primary handler function implementing the send_money tool logic by making an HTTP POST request to the payment API endpoint.export async function send_money(args: any) { const { to, amount, currency, title } = args; const { apiKey } = resolveAuth(undefined, undefined); var jsP = { myKey: apiKey, to:'', amount, currencyUsed: currency, title, destList:null } if (typeof to == "string") jsP.to = to; else { jsP.to = to[0]; jsP.destList = to.join(';'); } const fet = await fetch(BASE + '/api/tr4usr', { method: 'POST', headers: { Accept: 'application.json', 'Content-Type': 'application/json' }, body: JSON.stringify(jsP) }); var dat = await fet.text(); process.stderr.write(`[caisse][info] dat ${dat}\n`); //console.log(dat); var result = JSON.parse(dat); return result; }
- src/tools/payments.ts:18-23 (schema)Zod shape/schema definition for the input parameters of the send_money tool.export const getSendMoneyShape = { to: toZod, amount: z.number().positive().describe("Amount to send"), currency: currencyZOD.describe("Currency of specified amount to send"), title: z.string().optional().describe("A title for the transaction shown to the receiver") };
- src/solution.ts:50-55 (registration)Registration of the send_money tool in the static tools array used by the ListToolsRequestSchema handler.{ name: "send_money", description: send_money_title, inputSchema: jsonSchema(zodToJsonSchema(z.object(getSendMoneyShape))).jsonSchema, annotations: { title: send_money_title, readOnlyHint: true } },
- src/solution.ts:136-138 (handler)Dispatch logic in the main CallToolRequestSchema handler that routes calls to the send_money function.case "send_money": result = await send_money(args); break;
- src/tools/payments.ts:190-190 (schema)Title and description string used for the send_money tool in registrations.export const send_money_title = "Send money to an email, Solana wallet or phone number. The provided email or phone can be used to claim the money of the wallet. If new user does not claim for 3 days, the money is returned to the sender.";