Skip to main content
Glama

transfer_nft

Transfer NFTs across EVM and Solana networks to recipient addresses. Supports ERC-721, ERC-1155, and Metaplex standards with configurable parameters for token amounts and wallet selection.

Instructions

Transfer an NFT (ERC-721/ERC-1155/Metaplex) to a recipient address. Default tier: APPROVAL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesRecipient address (0x-hex for EVM, base58 for Solana).
token_addressYesNFT contract address (EVM) or mint address (Solana).
token_idYesToken ID within the contract (EVM). Use "0" for Solana Metaplex.
standardYesNFT standard.
networkYesNetwork identifier (e.g., "ethereum-mainnet", "solana-mainnet" or CAIP-2 "eip155:1").
amountNoNumber of tokens to transfer (default: "1"). Only relevant for ERC-1155 multi-copy NFTs. This is a count, not a smallest-unit value.
wallet_idNoTarget wallet ID. Required for multi-wallet sessions.

Implementation Reference

  • The handler function that executes the logic for the "transfer_nft" tool, which constructs a request body with type 'NFT_TRANSFER' and sends it to the /v1/transactions/send API endpoint.
      async (args) => {
        const body: Record<string, unknown> = {
          type: 'NFT_TRANSFER',
          to: args.to,
          token: {
            address: args.token_address,
            tokenId: args.token_id,
            standard: args.standard,
          },
          network: args.network,
        };
        if (args.amount !== undefined) body.amount = args.amount;
        if (args.wallet_id) body.walletId = args.wallet_id;
        const result = await apiClient.post('/v1/transactions/send', body);
        return toToolResult(result);
      },
    );
  • The function that registers the "transfer_nft" tool with the MCP server, defining its schema and the handler logic.
    export function registerTransferNft(
      server: McpServer,
      apiClient: ApiClient,
      walletContext?: WalletContext,
    ): void {
      server.tool(
        'transfer_nft',
        withWalletPrefix(
          'Transfer an NFT (ERC-721/ERC-1155/Metaplex) to a recipient address. Default tier: APPROVAL.',
          walletContext?.walletName,
        ),
        {
          to: z.string().describe('Recipient address (0x-hex for EVM, base58 for Solana).'),
          token_address: z.string().describe('NFT contract address (EVM) or mint address (Solana).'),
          token_id: z.string().describe('Token ID within the contract (EVM). Use "0" for Solana Metaplex.'),
          standard: z.enum(['erc721', 'erc1155', 'metaplex']).describe('NFT standard.'),
          network: z.string().describe('Network identifier (e.g., "ethereum-mainnet", "solana-mainnet" or CAIP-2 "eip155:1").'),
          amount: z.string().optional().describe('Number of tokens to transfer (default: "1"). Only relevant for ERC-1155 multi-copy NFTs. This is a count, not a smallest-unit value.'),
          wallet_id: z.string().optional().describe('Target wallet ID. Required for multi-wallet sessions.'),
        },
        async (args) => {
          const body: Record<string, unknown> = {
            type: 'NFT_TRANSFER',
            to: args.to,
            token: {
              address: args.token_address,
              tokenId: args.token_id,
              standard: args.standard,
            },
            network: args.network,
          };
          if (args.amount !== undefined) body.amount = args.amount;
          if (args.wallet_id) body.walletId = args.wallet_id;
          const result = await apiClient.post('/v1/transactions/send', body);
          return toToolResult(result);
        },
      );
    }
  • The Zod schema definition for the input parameters of the "transfer_nft" tool, specifying required fields like recipient, token address, ID, standard, and network.
    {
      to: z.string().describe('Recipient address (0x-hex for EVM, base58 for Solana).'),
      token_address: z.string().describe('NFT contract address (EVM) or mint address (Solana).'),
      token_id: z.string().describe('Token ID within the contract (EVM). Use "0" for Solana Metaplex.'),
      standard: z.enum(['erc721', 'erc1155', 'metaplex']).describe('NFT standard.'),
      network: z.string().describe('Network identifier (e.g., "ethereum-mainnet", "solana-mainnet" or CAIP-2 "eip155:1").'),
      amount: z.string().optional().describe('Number of tokens to transfer (default: "1"). Only relevant for ERC-1155 multi-copy NFTs. This is a count, not a smallest-unit value.'),
      wallet_id: z.string().optional().describe('Target wallet ID. Required for multi-wallet sessions.'),
    },

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