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
| Name | Required | Description | Default |
|---|---|---|---|
| token_details_requests | Yes |
Implementation Reference
- armor_crypto_mcp/armor_mcp.py:208-223 (handler)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)