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',
      });
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states the destructive action ('Delete') but lacks critical details: whether deletion is permanent or reversible, what permissions are required, if there are rate limits, or what happens to associated data. This is inadequate for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a destructive mutation tool with no annotations and no output schema, the description is incomplete. It should explain behavioral aspects like permanence, permissions, or error conditions, but provides only basic purpose. The context signals indicate adequate schema coverage, but the description fails to compensate for missing safety and operational details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds minimal meaning beyond the input schema, which has 100% coverage for the single parameter 'pieId'. It implies the parameter identifies the pie to delete but doesn't provide additional context like format examples or constraints. Baseline 3 is appropriate since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Delete') and the resource ('an investment pie by ID'), providing specific verb+resource pairing. However, it doesn't distinguish this tool from sibling tools like 'cancel_order' or 'update_pie' which might also involve modifications to investment data, missing full sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing pie), exclusions (e.g., cannot delete if pie has active orders), or compare to siblings like 'update_pie' for modifications instead of deletion.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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