Skip to main content
Glama
enderekici

Trading 212 MCP Server

by enderekici

get_pies

Retrieve all investment portfolio buckets with their configurations and holdings from Trading 212 accounts for portfolio analysis and management.

Instructions

List all investment pies (portfolio buckets) with their configurations and holdings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The switch case block in the tool execution handler that calls client.getPies() to fetch the list of pies.
    case 'get_pies': {
      const pies = await client.getPies();
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(pies, null, 2),
          },
        ],
      };
  • src/index.ts:291-299 (registration)
    The registration of the 'get_pies' tool, defining its name, description, and input schema.
    {
      name: 'get_pies',
      description:
        'List all investment pies (portfolio buckets) with their configurations and holdings',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • The underlying client method that performs the API request to fetch pies.
    async getPies(): Promise<Pie[]> {
      return this.request('/equity/pies', {}, z.array(PieSchema));
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states it's a list operation but does not disclose behavioral traits like pagination, rate limits, authentication needs, or whether it returns real-time or cached data. For a read tool with zero annotation coverage, this is a significant gap.

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 that front-loads the purpose ('List all investment pies') and adds necessary detail ('with their configurations and holdings'). There is zero waste or redundancy.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, no output schema), the description is adequate but incomplete. It lacks behavioral context (e.g., data freshness, error handling) that would be helpful for an AI agent, though the low complexity mitigates some need for extensive detail.

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

Parameters4/5

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

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the absence of inputs. The description adds no parameter semantics, but with no parameters, the baseline is 4 as it does not need to compensate for any gaps.

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

Purpose5/5

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

The description clearly states the verb ('List') and resource ('all investment pies (portfolio buckets)') with specific scope ('with their configurations and holdings'). It distinguishes from siblings like 'get_pie' (singular) and 'get_portfolio' (broader portfolio data).

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

Usage Guidelines4/5

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

The description implies usage for retrieving comprehensive pie data, but does not explicitly state when to use this versus alternatives like 'get_pie' (single pie) or 'get_portfolio' (overall portfolio). It provides clear context but lacks explicit exclusions or named alternatives.

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