Skip to main content
Glama
recallnet

Trading Simulator MCP Server

by recallnet

get_leaderboard

Retrieve competition rankings to track performance and compare results in the Trading Simulator.

Instructions

Get the competition leaderboard

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
competitionIdNoOptional competition ID (if not provided, the active competition is used)

Implementation Reference

  • src/index.ts:361-375 (registration)
    Registration of the 'get_leaderboard' tool in the TRADING_SIM_TOOLS array, including name, description, and input schema.
    { name: "get_leaderboard", description: "Get the competition leaderboard", inputSchema: { type: "object", properties: { competitionId: { type: "string", description: "Optional competition ID (if not provided, the active competition is used)" } }, additionalProperties: false, $schema: "http://json-schema.org/draft-07/schema#" } },
  • MCP tool handler for 'get_leaderboard' in the CallToolRequestSchema switch statement. Extracts competitionId from arguments and calls tradingClient.getLeaderboard().
    case "get_leaderboard": { const competitionId = "competitionId" in args ? args.competitionId as string : undefined; const response = await tradingClient.getLeaderboard(competitionId); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }], isError: false }; }
  • Input schema definition for the 'get_leaderboard' tool, specifying optional competitionId parameter.
    inputSchema: { type: "object", properties: { competitionId: { type: "string", description: "Optional competition ID (if not provided, the active competition is used)" } }, additionalProperties: false, $schema: "http://json-schema.org/draft-07/schema#"
  • Implementation of getLeaderboard method in TradingSimulatorClient class, which makes the actual API request to /api/competition/leaderboard.
    async getLeaderboard(competitionId?: string): Promise<LeaderboardResponse | ErrorResponse> { let query = ''; if (competitionId) { query = `?competitionId=${encodeURIComponent(competitionId)}`; } return this.request<LeaderboardResponse>( 'GET', `/api/competition/leaderboard${query}`, null, 'get leaderboard' ); }

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