Skip to main content
Glama
recallnet

Trading Simulator MCP Server

by recallnet

get_price

Retrieve current token prices for trading simulation by specifying token addresses and optional blockchain parameters to support informed decision-making.

Instructions

Get the current price for a token

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesToken address
chainNoOptional blockchain type
specificChainNoOptional specific chain for EVM tokens

Implementation Reference

  • src/index.ts:160-185 (registration)
    Registration of the 'get_price' MCP tool, including name, description, and input schema definition.
    {
      name: "get_price",
      description: "Get the current price for 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#"
      }
    },
  • MCP server handler for the 'get_price' tool: validates input arguments, extracts parameters, calls tradingClient.getPrice(), and returns the response.
    case "get_price": {
      if (!args || typeof args !== "object" || !("token" in args)) {
        throw new Error("Invalid arguments for get_price");
      }
      
      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.getPrice(token, chain, specificChain);
      return {
        content: [{ type: "text", text: JSON.stringify(response, null, 2) }],
        isError: false
      };
    }
  • Core implementation of getPrice in TradingSimulatorClient: constructs query parameters and makes HTTP GET request to the backend API endpoint /api/price.
    async getPrice(
      token: string,
      chain?: BlockchainType,
      specificChain?: SpecificChain
    ): Promise<PriceResponse | ErrorResponse> {
      const params = new URLSearchParams();
      params.append('token', token);
      
      if (chain) params.append('chain', chain);
      if (specificChain) params.append('specificChain', specificChain);
      
      return this.request<PriceResponse>(
        'GET', 
        `/api/price?${params.toString()}`,
        null,
        'get token price'
      );
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'Get[s] the current price', implying a read-only operation, but doesn't disclose any behavioral traits such as rate limits, data sources, freshness of prices, error conditions, or response format. This is a significant gap for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'current price' means (e.g., in what currency, from which source), nor does it describe the return values or potential errors. For a tool with no structured behavioral data, this leaves significant gaps in understanding how to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds no meaning beyond what the input schema provides. With 100% schema description coverage, the schema already documents all parameters (token, chain, specificChain) with descriptions and enums. The baseline score of 3 is appropriate as the schema does the heavy lifting, but the description doesn't compensate with additional context like examples or parameter interactions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('current price for a token'), making it easy to understand what it does. However, it doesn't distinguish itself from sibling tools like 'get_quote' or 'get_token_info', which might also provide price-related information, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'get_quote' or 'get_price_history', nor does it specify use cases or prerequisites, leaving the agent to infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/recallnet/trading-simulator-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server