Skip to main content
Glama
recallnet

Trading Simulator MCP Server

by recallnet

get_trades

Retrieve your team's trade history with filters for blockchain type, token address, and pagination to analyze past trading activity.

Instructions

Get trade history for your team

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of trades to retrieve (default: 20)
offsetNoOffset for pagination
tokenNoFilter by token address
chainNoFilter by blockchain type

Implementation Reference

  • src/index.ts:130-157 (registration)
    Registration of the 'get_trades' tool in the TRADING_SIM_TOOLS array, including name, description, and JSON input schema for parameters (limit, offset, token, chain).
    {
      name: "get_trades",
      description: "Get trade history for your team",
      inputSchema: {
        type: "object",
        properties: {
          limit: {
            type: "number",
            description: "Maximum number of trades to retrieve (default: 20)"
          },
          offset: {
            type: "number",
            description: "Offset for pagination"
          },
          token: {
            type: "string",
            description: "Filter by token address"
          },
          chain: {
            type: "string",
            enum: ["svm", "evm"],
            description: "Filter by blockchain type"
          }
        },
        additionalProperties: false,
        $schema: "http://json-schema.org/draft-07/schema#"
      }
    },
  • MCP CallToolRequest handler for 'get_trades': validates arguments, constructs TradeHistoryParams object, calls tradingClient.getTradeHistory(), and formats response.
    case "get_trades": {
      if (!args || typeof args !== "object") {
        throw new Error("Invalid arguments for get_trades");
      }
      
      const tradeParams: TradeHistoryParams = {};
      if ("limit" in args) tradeParams.limit = args.limit as number;
      if ("offset" in args) tradeParams.offset = args.offset as number;
      if ("token" in args) tradeParams.token = args.token as string;
      if ("chain" in args) tradeParams.chain = args.chain as BlockchainType;
      
      const response = await tradingClient.getTradeHistory(tradeParams);
      return {
        content: [{ type: "text", text: JSON.stringify(response, null, 2) }],
        isError: false
      };
    }
  • Supporting utility in TradingSimulatorClient: builds URL query string from TradeHistoryParams and executes HTTP GET request to '/api/account/trades' via the internal request() method.
    async getTradeHistory(options?: TradeHistoryParams): Promise<TradeHistoryResponse | ErrorResponse> {
      let path = '/api/account/trades';
      
      // Add query parameters if provided
      if (options) {
        const params = new URLSearchParams();
        
        if (options.limit !== undefined) {
          params.append('limit', options.limit.toString());
        }
        
        if (options.offset !== undefined) {
          params.append('offset', options.offset.toString());
        }
        
        if (options.token) {
          params.append('token', options.token);
        }
        
        if (options.chain) {
          params.append('chain', options.chain);
        }
        
        // Append query string if we have parameters
        const queryString = params.toString();
        if (queryString) {
          path += `?${queryString}`;
        }
      }
      
      return this.request<TradeHistoryResponse>(
        'GET', 
        path,
        null,
        'get trade history'
      );
    }
  • TypeScript interface definition for TradeHistoryParams, matching the input schema parameters for the get_trades tool.
    export interface TradeHistoryParams {
      limit?: number;
      offset?: number;
      token?: string;
      chain?: BlockchainType;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It doesn't disclose whether this requires authentication, what format the history returns, if there are rate limits, or how 'your team' is defined. The description states what it does but not how it behaves.

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 with zero wasted words. It's front-loaded with the core purpose and appropriately sized for a straightforward retrieval tool.

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?

For a tool with 4 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what 'trade history' includes, how results are structured, or any behavioral constraints. The agent would need to guess about authentication, return format, and team context.

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?

Schema description coverage is 100%, so the schema fully documents all 4 parameters. The description adds no parameter-specific information beyond implying trade history retrieval. This meets the baseline of 3 when schema coverage is high.

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 action ('Get') and resource ('trade history for your team'), making the purpose immediately understandable. It doesn't explicitly differentiate from siblings like get_portfolio or get_balances, but the focus on trade history is specific enough for basic understanding.

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 like get_portfolio (which might include trade data) or get_price_history (which tracks price rather than trades). There's no mention of prerequisites, context, or comparison with sibling tools.

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