Skip to main content
Glama

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
NameRequiredDescriptionDefault
toYesRecipient Sui address (0x...) or contact name (e.g. 'Tom')
amountYesAmount in dollars to send
assetNoAsset to send (default: USDC)
dryRunNoPreview without signing (default: false)

Implementation Reference

  • 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);
        }
      },
    );

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/mission69b/t2000'

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