get_portfolio
Retrieve detailed portfolio information by specifying a portfolio ID, enabling users to manage and analyze trading data through the Paper MCP Server interface.
Instructions
Get portfolio details
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| portfolioId | Yes | Portfolio ID |
Implementation Reference
- src/index.ts:121-131 (schema)Tool definition including name, description, and input schema for validating portfolioId parameter.{ name: 'get_portfolio', description: 'Get portfolio details', inputSchema: { type: 'object', properties: { portfolioId: { type: 'string', description: 'Portfolio ID' } }, required: ['portfolioId'] } },
- src/index.ts:426-428 (handler)Core handler logic: performs authenticated GET request to the Paper Invest API endpoint for portfolio details using the provided portfolioId.case 'get_portfolio': response = await api.get(`/accounts/portfolios/${args.portfolioId}`); break;
- src/index.ts:388-392 (registration)Registers the listTools handler which exposes the get_portfolio tool (among others) to MCP clients.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });