get_token_info
Retrieve detailed token information by specifying token address and optional blockchain type, enabling effective analysis and decision-making in the Trading Simulator MCP Server environment.
Instructions
Get detailed information about a token
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | Optional blockchain type | |
| specificChain | No | Optional specific chain for EVM tokens | |
| token | Yes | Token address |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"chain": {
"description": "Optional blockchain type",
"enum": [
"svm",
"evm"
],
"type": "string"
},
"specificChain": {
"description": "Optional specific chain for EVM tokens",
"enum": [
"eth",
"polygon",
"bsc",
"arbitrum",
"base",
"optimism",
"avalanche",
"linea",
"svm"
],
"type": "string"
},
"token": {
"description": "Token address",
"type": "string"
}
},
"required": [
"token"
],
"type": "object"
}
Implementation Reference
- src/index.ts:186-211 (schema)Input schema definition for the get_token_info tool, specifying parameters like token (required), chain, and specificChain.{ 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)Executes the get_token_info tool by validating input arguments, extracting token, chain, and specificChain, calling tradingClient.getTokenInfo, and returning the JSON-stringified response.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/index.ts:411-415 (registration)Registers the list of available tools including get_token_info by returning TRADING_SIM_TOOLS in response to ListToolsRequest.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: TRADING_SIM_TOOLS }; });