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));
    }

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