Skip to main content
Glama
enderekici

Trading 212 MCP Server

by enderekici

get_pie

Retrieve detailed information about a specific investment pie by its unique ID for portfolio analysis and management.

Instructions

Get detailed information about a specific pie by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pieIdYesThe unique identifier of the pie

Implementation Reference

  • The handler logic for the 'get_pie' tool, which extracts the pie ID from arguments, calls the client, and returns the response.
    case 'get_pie': {
      const { pieId } = PieIdInputSchema.parse(args);
      const pie = await client.getPie(pieId);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(pie, null, 2),
          },
        ],
      };
    }
  • The API client helper function that performs the actual network request to retrieve a specific pie by ID.
    async getPie(pieId: number): Promise<Pie> {
      return this.request(`/equity/pies/${pieId}`, {}, PieSchema);
    }
  • src/index.ts:301-313 (registration)
    The tool registration for 'get_pie' in the list of available tools.
      name: 'get_pie',
      description: 'Get detailed information about a specific pie by ID',
      inputSchema: {
        type: 'object',
        properties: {
          pieId: {
            type: 'number',
            description: 'The unique identifier of the pie',
          },
        },
        required: ['pieId'],
      },
    },

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