t2000_portfolio
Display investment portfolio details including positions, cost basis, current value, and P&L metrics to monitor performance and strategy groupings.
Instructions
Show investment portfolio — positions, cost basis, current value, unrealized/realized P&L, strategy groupings. For a full account snapshot, prefer t2000_overview instead.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- packages/mcp/src/tools/read.ts:305-320 (handler)The handler implementation for the `t2000_portfolio` tool which fetches the agent's portfolio, performs some minor enrichment on position data, and returns it as a stringified JSON object.
server.tool( 't2000_portfolio', 'Show investment portfolio — positions, cost basis, current value, unrealized/realized P&L, strategy groupings. For a full account snapshot, prefer t2000_overview instead.', {}, async () => { try { const result = await agent.getPortfolio(); const enriched = { ...result, positions: result.positions.map(p => ({ ...p, ...(p.currentPrice === 0 && p.totalAmount > 0 ? { note: 'price unavailable' } : {}), })), }; return { content: [{ type: 'text', text: JSON.stringify(enriched) }] }; } catch (err) {