t2000_send
Send USDC or stablecoins to Sui addresses or contacts using dollar amounts. Preview transactions with dry run mode before signing.
Instructions
Send USDC or stablecoins to a Sui address or contact name. Amount is in dollars. Subject to per-transaction and daily send limits. Set dryRun: true to preview without signing.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Recipient Sui address (0x...) or contact name (e.g. 'Tom') | |
| amount | Yes | Amount in dollars to send | |
| asset | No | Asset to send (default: USDC) | |
| dryRun | No | Preview without signing (default: false) |
Implementation Reference
- packages/mcp/src/tools/write.ts:30-75 (handler)The 't2000_send' tool is registered and implemented in 'packages/mcp/src/tools/write.ts'. It handles sending assets, supports dry runs for previews, and integrates with the agent's contacts and transaction enforcer.
server.tool( 't2000_send', 'Send USDC or stablecoins to a Sui address or contact name. Amount is in dollars. Subject to per-transaction and daily send limits. Set dryRun: true to preview without signing.', { to: z.string().describe("Recipient Sui address (0x...) or contact name (e.g. 'Tom')"), amount: z.number().describe('Amount in dollars to send'), asset: z.string().optional().describe('Asset to send (default: USDC)'), dryRun: z.boolean().optional().describe('Preview without signing (default: false)'), }, async ({ to, amount, asset, dryRun }) => { try { const resolved = agent.contacts.resolve(to); if (dryRun) { agent.enforcer.check({ operation: 'send', amount }); const balance = await agent.balance(); const config = agent.enforcer.getConfig(); return { content: [{ type: 'text', text: JSON.stringify({ preview: true, canSend: balance.available >= amount, amount, to: resolved.address, contactName: resolved.contactName, asset: asset ?? 'USDC', currentBalance: balance.available, balanceAfter: balance.available - amount, safeguards: { dailyUsedAfter: config.dailyUsed + amount, dailyLimit: config.maxDailySend, }, }), }], }; } const result = await mutex.run(() => agent.send({ to, amount, asset })); return { content: [{ type: 'text', text: JSON.stringify(result) }] }; } catch (err) { return errorResult(err); } }, );