search_official_token_address
Find the official token address and symbol for cryptocurrency tokens to verify authenticity and avoid scams when trading or managing assets.
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-222 (handler)Handler function for the 'search_official_token_address' tool. Decorated with @mcp.tool() for registration. Executes the tool logic by calling the Armor client API.@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)}]
- Input schema container for the tool: TokenDetailsRequestContainer holding a list of TokenDetailsRequest.class TokenDetailsRequestContainer(BaseModel): token_details_requests: List[TokenDetailsRequest]
- Output schema container for the tool: TokenDetailsResponseContainer holding a list of TokenDetailsResponse.class TokenDetailsResponseContainer(BaseModel): token_details_responses: List[TokenDetailsResponse]
- Supporting client method in ArmorWalletAPIClient that handles the actual API request to fetch 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)
- Inner schema models: TokenDetailsRequest (input with query field) and TokenDetailsResponse (output with symbol and mint_address).class TokenDetailsRequest(BaseModel): query: str = Field(description="token symbol or address") class TokenDetailsResponse(BaseModel): symbol: str = Field(description="symbol of the token") mint_address: str = Field(description="mint address of the token")