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(),
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool updates a configuration, implying a mutation, but doesn't cover permissions, side effects (e.g., impact on related data), error handling, or response format. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves.

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 front-loaded with the core action and resource, making it easy to parse. Every word earns its place, and there's no redundancy or 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 the complexity (6 parameters, nested objects, mutation operation) and lack of annotations and output schema, the description is incomplete. It doesn't explain what a 'pie configuration' entails, the scope of updates, or behavioral aspects like validation or errors. For a tool with rich input schema but no other structured data, more context is needed to guide effective use.

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?

Schema description coverage is 100%, so the schema fully documents all 6 parameters. The description adds no additional meaning beyond implying that parameters relate to 'configuration,' which is vague. With high schema coverage, the baseline is 3, as the description doesn't compensate but also doesn't detract from the schema's clarity.

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 ('Update') and resource ('an existing pie configuration'), making the purpose evident. It distinguishes from siblings like create_pie (creation) and delete_pie (deletion), though it doesn't explicitly differentiate from other update-like operations. The description is specific but could be more precise about what 'configuration' entails.

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), compare to siblings like get_pie for viewing or create_pie for initial setup, or specify scenarios for updates. Usage is implied from the verb 'Update,' but no explicit context or exclusions are given.

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