Skip to main content
Glama
enderekici

Trading 212 MCP Server

by enderekici

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
NameRequiredDescriptionDefault
pieIdYesThe unique identifier of the pie
nameNoUpdated name of the pie
iconNoUpdated icon identifier
instrumentSharesNoUpdated instrument allocations
dividendCashActionNoUpdated dividend action
goalNoUpdated investment goal

Implementation Reference

  • 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),
          },
  • 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(),

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/enderekici/trading212-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server