Skip to main content
Glama

send_token

Send SOL, ETH, or SPL/ERC-20 tokens from your wallet to any address on supported blockchains. Specify token details for custom transfers and configure gas conditions for optimal execution.

Instructions

Send SOL/ETH or tokens from the wallet. For token transfers, specify type and token info.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesDestination wallet address
amountYesAmount in smallest units (wei for EVM, lamports for Solana). Example: "1000000000000000000" = 1 ETH, "1000000000" = 1 SOL
memoNoOptional transaction memo
typeNoTransaction type. Default: TRANSFER (native). TOKEN_TRANSFER for SPL/ERC-20
networkNoTarget network (e.g., "polygon-mainnet" or CAIP-2 "eip155:137"). Required for EVM wallets; auto-resolved for Solana.
tokenNoRequired for TOKEN_TRANSFER. Provide full metadata (address/decimals/symbol) OR assetId alone for auto-resolve.
wallet_idNoTarget wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet.
gas_conditionNoGas price condition for deferred execution. At least one of max_gas_price or max_priority_fee required.

Implementation Reference

  • The handler function within `registerSendToken` which prepares the payload and makes a POST request to `/v1/transactions/send` using the `apiClient`.
    async (args) => {
      const body: Record<string, unknown> = { to: args.to, amount: args.amount };
      if (args.memo !== undefined) body.memo = args.memo;
      if (args.type) body.type = args.type;
      if (args.token) body.token = args.token;
      if (args.network !== undefined) body.network = args.network;
      if (args.wallet_id) body.walletId = args.wallet_id;
      if (args.gas_condition) {
        body.gasCondition = {
          maxGasPrice: args.gas_condition.max_gas_price,
          maxPriorityFee: args.gas_condition.max_priority_fee,
          timeout: args.gas_condition.timeout,
        };
      }
      const result = await apiClient.post('/v1/transactions/send', body);
      return toToolResult(result);
    },
  • The Zod schema definition for `send_token` arguments, including token details, destination, and gas conditions.
    {
      to: z.string().describe('Destination wallet address'),
      amount: z.string().describe('Amount in smallest units (wei for EVM, lamports for Solana). Example: "1000000000000000000" = 1 ETH, "1000000000" = 1 SOL'),
      memo: z.string().optional().describe('Optional transaction memo'),
      type: z.enum(['TRANSFER', 'TOKEN_TRANSFER']).optional()
        .describe('Transaction type. Default: TRANSFER (native). TOKEN_TRANSFER for SPL/ERC-20'),
      network: z.string().optional().describe('Target network (e.g., "polygon-mainnet" or CAIP-2 "eip155:137"). Required for EVM wallets; auto-resolved for Solana.'),
      token: z.object({
        address: z.string().optional().describe('Token mint (SPL) or contract address (ERC-20). Optional when assetId is provided.'),
        decimals: z.number().optional().describe('Token decimals (e.g., 6 for USDC). Optional when assetId is provided.'),
        symbol: z.string().optional().describe('Token symbol (e.g., USDC). Optional when assetId is provided.'),
        assetId: z.string().optional().describe(
          'CAIP-19 asset identifier. When provided alone (without address/decimals/symbol), the daemon auto-resolves from the token registry.',
        ),
      }).optional().describe('Required for TOKEN_TRANSFER. Provide full metadata (address/decimals/symbol) OR assetId alone for auto-resolve.'),
      wallet_id: z.string().optional().describe('Target wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet.'),
      gas_condition: z.object({
        max_gas_price: z.string().optional().describe('Max gas price in wei (EVM baseFee+priorityFee)'),
        max_priority_fee: z.string().optional().describe('Max priority fee in wei (EVM) or micro-lamports (Solana)'),
        timeout: z.number().optional().describe('Max wait time in seconds (60-86400)'),
      }).optional().describe('Gas price condition for deferred execution. At least one of max_gas_price or max_priority_fee required.'),
    },
  • The `registerSendToken` function that registers the `send_token` tool with the McpServer instance.
    export function registerSendToken(server: McpServer, apiClient: ApiClient, walletContext?: WalletContext): void {
      server.tool(
        'send_token',
        withWalletPrefix('Send SOL/ETH or tokens from the wallet. For token transfers, specify type and token info.', walletContext?.walletName),
        {
          to: z.string().describe('Destination wallet address'),
          amount: z.string().describe('Amount in smallest units (wei for EVM, lamports for Solana). Example: "1000000000000000000" = 1 ETH, "1000000000" = 1 SOL'),
          memo: z.string().optional().describe('Optional transaction memo'),
          type: z.enum(['TRANSFER', 'TOKEN_TRANSFER']).optional()
            .describe('Transaction type. Default: TRANSFER (native). TOKEN_TRANSFER for SPL/ERC-20'),
          network: z.string().optional().describe('Target network (e.g., "polygon-mainnet" or CAIP-2 "eip155:137"). Required for EVM wallets; auto-resolved for Solana.'),
          token: z.object({
            address: z.string().optional().describe('Token mint (SPL) or contract address (ERC-20). Optional when assetId is provided.'),
            decimals: z.number().optional().describe('Token decimals (e.g., 6 for USDC). Optional when assetId is provided.'),
            symbol: z.string().optional().describe('Token symbol (e.g., USDC). Optional when assetId is provided.'),
            assetId: z.string().optional().describe(
              'CAIP-19 asset identifier. When provided alone (without address/decimals/symbol), the daemon auto-resolves from the token registry.',
            ),
          }).optional().describe('Required for TOKEN_TRANSFER. Provide full metadata (address/decimals/symbol) OR assetId alone for auto-resolve.'),
          wallet_id: z.string().optional().describe('Target wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet.'),
          gas_condition: z.object({
            max_gas_price: z.string().optional().describe('Max gas price in wei (EVM baseFee+priorityFee)'),
            max_priority_fee: z.string().optional().describe('Max priority fee in wei (EVM) or micro-lamports (Solana)'),
            timeout: z.number().optional().describe('Max wait time in seconds (60-86400)'),
          }).optional().describe('Gas price condition for deferred execution. At least one of max_gas_price or max_priority_fee required.'),
        },
        async (args) => {
          const body: Record<string, unknown> = { to: args.to, amount: args.amount };
          if (args.memo !== undefined) body.memo = args.memo;
          if (args.type) body.type = args.type;
          if (args.token) body.token = args.token;
          if (args.network !== undefined) body.network = args.network;
          if (args.wallet_id) body.walletId = args.wallet_id;
          if (args.gas_condition) {
            body.gasCondition = {
              maxGasPrice: args.gas_condition.max_gas_price,
              maxPriorityFee: args.gas_condition.max_priority_fee,
              timeout: args.gas_condition.timeout,
            };
          }
          const result = await apiClient.post('/v1/transactions/send', body);
          return toToolResult(result);
        },
      );
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full disclosure burden for this financial mutation tool. It fails to disclose critical behavioral traits: that this creates irreversible on-chain transactions, requires gas fees, may fail if balance is insufficient, or that it blocks until transaction submission (not necessarily confirmation). 'Send' implies mutation but lacks safety-critical context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise with two front-loaded sentences. No redundant words, though the brevity may be excessive given the high complexity (8 parameters, nested objects) and financial risk of the operation. Structure is clear: purpose first, parameter hint second.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Inadequate for the complexity: 8 parameters including nested gas conditions and token metadata structures, financial mutation risk, no output schema, and no annotations. The two-sentence description fails to address error scenarios, chain-specific behaviors (EVM vs Solana differences), or wallet selection prerequisites beyond what the schema itself documents.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, establishing a baseline of 3. The description adds minimal semantic value beyond the schema: the phrase 'specify type and token info' loosely maps to the `type` enum and `token` object structure but does not explain syntax, format, or relationships beyond what the schema already documents clearly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States specific action ('Send') and clear resources ('SOL/ETH or tokens') with source ('from the wallet'). Mentions specific blockchain ecosystems which helps distinguish from generic tools, though it does not explicitly differentiate from sibling tools like `send_batch` or `approve_token`.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Lacks explicit guidance on when to use this tool versus alternatives like `send_batch` (for multiple transfers) or `approve_token` (for spending allowances). The second sentence ('For token transfers...') provides parameter usage guidance rather than tool selection guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/minhoyoo-iotrust/WAIaaS'

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