Skip to main content
Glama
recallnet

Trading Simulator MCP Server

by recallnet

get_portfolio

Retrieve current portfolio holdings and performance data for your trading team in the simulation environment.

Instructions

Get portfolio information for your team

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP CallToolRequest handler case for 'get_portfolio': calls tradingClient.getPortfolio() and returns formatted text response.
    case "get_portfolio": { const response = await tradingClient.getPortfolio(); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }], isError: false }; }
  • TradingSimulatorClient.getPortfolio(): performs authenticated HTTP GET to backend /api/account/portfolio endpoint.
    async getPortfolio(): Promise<PortfolioResponse | ErrorResponse> { return this.request<PortfolioResponse>( 'GET', '/api/account/portfolio', null, 'get portfolio' ); }
  • src/index.ts:120-129 (registration)
    Tool registration in TRADING_SIM_TOOLS array (returned by ListToolsRequest): name, description, empty input schema.
    { name: "get_portfolio", description: "Get portfolio information for your team", inputSchema: { type: "object", properties: {}, additionalProperties: false, $schema: "http://json-schema.org/draft-07/schema#" } },
  • Output type definitions: TokenPortfolioItem and PortfolioResponse (extends ApiResponse).
    export interface TokenPortfolioItem { token: string; amount: number; price: number; value: number; chain: BlockchainType; specificChain: SpecificChain | null; } export interface PortfolioResponse extends ApiResponse { teamId: string; totalValue: number; tokens: TokenPortfolioItem[]; snapshotTime: string; source: PortfolioSource; }

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