Skip to main content
Glama

transfer_tokens

Send cryptocurrency tokens between wallets using the Armor Crypto MCP server to facilitate token transfers across supported blockchain networks.

Instructions

Transfer tokens from one wallet to another. Expects a TransferTokensRequestContainer, returns a list of TransferTokenResponse.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transfer_tokens_requestsYes

Implementation Reference

  • MCP tool handler for 'transfer_tokens'. Decorated with @mcp.tool() for registration and executes the tool logic by calling the ArmorWalletAPIClient's transfer_tokens method, handling errors and authentication.
    @mcp.tool() async def transfer_tokens(transfer_tokens_requests: TransferTokensRequestContainer) -> List[TransferTokenResponse]: """ Transfer tokens from one wallet to another. Expects a TransferTokensRequestContainer, returns a list of TransferTokenResponse. """ if not armor_client: return [{"error": "Not logged in"}] try: result: List[TransferTokenResponse] = await armor_client.transfer_tokens(transfer_tokens_requests) return result except Exception as e: return [{"error": str(e)}]
  • Pydantic models defining the input (TransferTokensRequest) and output (TransferTokenResponse) schemas for the transfer_tokens tool.
    class TransferTokensRequest(BaseModel): from_wallet: str = Field(description="name of the wallet to transfer tokens from") to_wallet_address: str = Field(description="public address of the wallet to transfer tokens to. Use `get_user_wallets_and_group_list` if you only have a wallet name") token: str = Field(description="public contract address of the token to transfer. To get the address from a token symbol use `get_token_details`") amount: float = Field(description="amount of tokens to transfer") class TransferTokenResponse(BaseModel): amount: float = Field(description="amount of tokens transferred") from_wallet_address: str = Field(description="public address of the wallet tokens were transferred from") to_wallet_address: str = Field(description="public address of the wallet tokens were transferred to") token_address: str = Field(description="public address of the token transferred") transaction_url: str = Field(description="public url of the transaction") message: str = Field(description="message of the operation showing if tokens were transferred")
  • Container model for batch input to transfer_tokens tool, wrapping a list of TransferTokensRequest.
    class TransferTokensRequestContainer(BaseModel): transfer_tokens_requests: List[TransferTokensRequest]
  • ArmorWalletAPIClient method implementing the core transfer logic via API call to the backend service.
    async def transfer_tokens(self, data: TransferTokensRequestContainer) -> List[TransferTokenResponse]: """Transfer tokens from one wallet to another.""" # payload = [v.model_dump() for v in data.transfer_tokens_requests] payload = data.model_dump(exclude_none=True)['transfer_tokens_requests'] return await self._api_call("POST", "transfers/transfer/", payload)
  • @mcp.tool() decorator registers the transfer_tokens function as an MCP tool.
    @mcp.tool()

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/emmaThompson07/armor-crypto-mcp'

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