Skip to main content
Glama
enderekici

Trading 212 MCP Server

by enderekici

delete_pie

Remove an investment pie from your Trading 212 portfolio using its unique identifier to manage your investment allocations.

Instructions

Delete an investment pie by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pieIdYesThe unique identifier of the pie to delete

Implementation Reference

  • The MCP tool handler case for 'delete_pie' which parses the input and calls the client method.
    case 'delete_pie': {
      const { pieId } = DeletePieInputSchema.parse(args);
      await client.deletePie(pieId);
      return {
        content: [
          {
            type: 'text',
            text: `Pie ${pieId} deleted successfully`,
          },
        ],
      };
    }
  • Input schema for 'delete_pie' validating that pieId is a number.
    const DeletePieInputSchema = z.object({
      pieId: z.number(),
    });
  • The client method implementation that performs the actual DELETE HTTP request to the Trading 212 API.
    async deletePie(pieId: number): Promise<void> {
      await this.request(`/equity/pies/${pieId}`, {
        method: 'DELETE',
      });
    }

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