Skip to main content
Glama

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
NameRequiredDescriptionDefault
toYesOne or multiple recipients
amountYesAmount to send
currencyNoCurrency of specified amount to sendUSD
titleNoA title for the transaction shown to the receiver

Implementation Reference

  • 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; }
  • 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 } },
  • Dispatch logic in the main CallToolRequestSchema handler that routes calls to the send_money function.
    case "send_money": result = await send_money(args); break;
  • 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.";

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/paracetamol951/P-Link-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server