get_pies
Retrieve all investment portfolio buckets with their configurations and holdings from Trading 212 accounts for portfolio analysis and management.
Instructions
List all investment pies (portfolio buckets) with their configurations and holdings
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:734-743 (handler)The switch case block in the tool execution handler that calls client.getPies() to fetch the list of pies.
case 'get_pies': { const pies = await client.getPies(); return { content: [ { type: 'text', text: JSON.stringify(pies, null, 2), }, ], }; - src/index.ts:291-299 (registration)The registration of the 'get_pies' tool, defining its name, description, and input schema.
{ name: 'get_pies', description: 'List all investment pies (portfolio buckets) with their configurations and holdings', inputSchema: { type: 'object', properties: {}, }, }, - src/client.ts:221-223 (helper)The underlying client method that performs the API request to fetch pies.
async getPies(): Promise<Pie[]> { return this.request('/equity/pies', {}, z.array(PieSchema)); }