get_token_info
Retrieve detailed information about a cryptocurrency token, including its address, blockchain type, and specific chain details for EVM tokens.
Instructions
Get detailed information about a token
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | Token address | |
| chain | No | Optional blockchain type | |
| specificChain | No | Optional specific chain for EVM tokens |
Implementation Reference
- src/index.ts:186-211 (registration)Registers the 'get_token_info' tool with the MCP server by defining its name, description, and input schema in the TRADING_SIM_TOOLS array.{ name: "get_token_info", description: "Get detailed information about a token", inputSchema: { type: "object", properties: { token: { type: "string", description: "Token address" }, chain: { type: "string", enum: ["svm", "evm"], description: "Optional blockchain type" }, specificChain: { type: "string", enum: ["eth", "polygon", "bsc", "arbitrum", "base", "optimism", "avalanche", "linea", "svm"], description: "Optional specific chain for EVM tokens" } }, required: ["token"], additionalProperties: false, $schema: "http://json-schema.org/draft-07/schema#" } },
- src/index.ts:511-525 (handler)MCP server handler for the 'get_token_info' tool: validates input parameters and delegates execution to the tradingClient.getTokenInfo method.case "get_token_info": { if (!args || typeof args !== "object" || !("token" in args)) { throw new Error("Invalid arguments for get_token_info"); } const token = args.token as string; const chain = "chain" in args ? args.chain as BlockchainType : undefined; const specificChain = "specificChain" in args ? args.specificChain as SpecificChain : undefined; const response = await tradingClient.getTokenInfo(token, chain, specificChain); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }], isError: false }; }
- src/api-client.ts:359-376 (handler)Core implementation of getTokenInfo: constructs API request to /api/price/token-info endpoint with token, chain, and specificChain parameters, and handles the HTTP GET request via the client's request method.async getTokenInfo( token: string, chain?: BlockchainType, specificChain?: SpecificChain ): Promise<TokenInfoResponse | ErrorResponse> { const params = new URLSearchParams(); params.append('token', token); if (chain) params.append('chain', chain); if (specificChain) params.append('specificChain', specificChain); return this.request<TokenInfoResponse>( 'GET', `/api/price/token-info?${params.toString()}`, null, 'get token info' ); }