update_pie
Modify an existing investment portfolio configuration by adjusting its name, icon, asset allocations, dividend strategy, or financial goal.
Instructions
Update an existing pie configuration
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pieId | Yes | The unique identifier of the pie | |
| name | No | Updated name of the pie | |
| icon | No | Updated icon identifier | |
| instrumentShares | No | Updated instrument allocations | |
| dividendCashAction | No | Updated dividend action | |
| goal | No | Updated investment goal |
Implementation Reference
- src/client.ts:240-248 (handler)The actual implementation of the updatePie API client method.
async updatePie(pieId: number, pie: Partial<CreatePieRequest>): Promise<Pie> { return this.request( `/equity/pies/${pieId}`, { method: 'POST', body: JSON.stringify(pie), }, PieSchema, ); - src/index.ts:772-780 (registration)The tool execution handler for 'update_pie' within the MCP server.
case 'update_pie': { const { pieId, ...updateData } = UpdatePieInputSchema.parse(args); const pie = await client.updatePie(pieId, updateData); return { content: [ { type: 'text', text: JSON.stringify(pie, null, 2), }, - src/index.ts:516-521 (schema)Zod schema defining the input validation for 'update_pie'.
const UpdatePieInputSchema = z.object({ pieId: z.number(), name: z.string().optional(), icon: z.string().optional(), instrumentShares: z.record(z.string(), z.number()).optional(), dividendCashAction: z.enum(['REINVEST', 'TO_ACCOUNT_CASH']).optional(),