Skip to main content
Glama
armorwallet
by armorwallet

search_official_token_address

Retrieve the official token address and symbol using a token symbol or address. Essential for verifying token details before initiating blockchain operations in the Armor Crypto MCP ecosystem.

Instructions

Get the official token address and symbol for a token symbol or token address.
Try to use this first to get address and symbol of coin. If not found, use search_token_details to get details.

Expects a TokenDetailsRequestContainer, returns a TokenDetailsResponseContainer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
token_details_requestsYes

Implementation Reference

  • MCP tool handler and registration for 'search_official_token_address'. Handles authentication check, calls the client method, and returns results or errors.
    @mcp.tool()
    async def search_official_token_address(token_details_requests: TokenDetailsRequestContainer) -> TokenDetailsResponseContainer:
        """
        Get the official token address and symbol for a token symbol or token address.
        Try to use this first to get address and symbol of coin. If not found, use search_token_details to get details.
    
        Expects a TokenDetailsRequestContainer, returns a TokenDetailsResponseContainer.
        """
        if not armor_client:
            return [{"error": "Not logged in"}]
        try:
            result: TokenDetailsResponseContainer = await armor_client.get_official_token_address(token_details_requests)
            return result
        except Exception as e:
            return [{"error": str(e)}]
  • Pydantic model defining the input structure (TokenDetailsRequestContainer) for the tool.
    class TokenDetailsRequestContainer(BaseModel):
        token_details_requests: List[TokenDetailsRequest]
  • Pydantic model defining the output structure (TokenDetailsResponseContainer) for the tool.
    class TokenDetailsResponseContainer(BaseModel):
        token_details_responses: List[TokenDetailsResponse]
  • Helper method in ArmorWalletAPIClient that makes the actual API POST request to retrieve official token addresses.
    async def get_official_token_address(self, data: TokenDetailsRequestContainer) -> TokenDetailsResponseContainer:
        """Retrieve the mint address of token."""
        payload = data.model_dump(exclude_none=True)['token_details_requests']
        return await self._api_call("POST", "tokens/official-token-detail/", payload)

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

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