Token Identification Tool

Token Identification Tool (token_identification_tool)

Helps find the contract address and other basic information (name, ticker) for a Solana token by searching its name or ticker symbol. Essential for when you need a token's address.

Input: Requires a token identifier (name or ticker).

class TokenIdentificationInput(BaseModel):
    identifier: str # e.g., 'Raydium', 'RAY', '$RAY'

Key Functionality:

  • Searches for tokens using the provided name or ticker (e.g., "Bonk", "RAY", "$USDC").

  • Looks up information from a predefined, internal list of known tokens (TOKEN_DATA).

  • Returns the token's full name, ticker, and Solana contract address if found.

  • Supports exact and partial matches (case-insensitive).


Sample Usage Queries (How an AI might use it):

  • "What is the contract address for Raydium?"

  • "Find the token address for $WIF."

  • "Identify the token with ticker SOL." (Note: This tool is primarily for SPL tokens; SOL itself doesn't have a contract address in the same way)

  • "Get me the details for the 'Bonk' token."

  • "Look up token info for 'USDC'."

  • "Search for a token named 'Jupiter Perpetuals'."

  • "What's the mint address for 'mSOL'?"

  • "Find token 'dogwifhat'."

  • "Can you identify the 'RENDER' token?"

  • "I need the address for 'LUMO'."


Quick Code Glance:

class TokenIdentificationTool(BaseTool):
    name: ClassVar[str] = "token_identification_tool"
    description: ClassVar[str] = "Get token information by name or ticker..."
    args_schema: ClassVar[Type[BaseModel]] = TokenIdentificationInput
    # TOKEN_DATA: ClassVar[Dict[str, Dict[str, str]]] = { ... } # Internal list

Important:

  • This tool operates asynchronously (_arun).

  • The list of identifiable tokens is based on a static, hardcoded dictionary within the tool. It will only find tokens present in this internal list.

Last updated