Skip to main content
Glama
enderekici

Trading 212 MCP Server

by enderekici

get_account_info

Retrieve account metadata including currency code and account ID for Trading 212 investment accounts to enable portfolio tracking and account management.

Instructions

Retrieve account metadata including currency code and account ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler block that executes the 'get_account_info' tool (along with related account tools) using the client.getAccountSummary() method.
    case 'get_account_info':
    case 'get_account_cash':
    case 'get_account_summary': {
      const summary = await client.getAccountSummary();
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(summary, null, 2),
          },
        ],
      };
    }
  • src/index.ts:64-71 (registration)
    The definition and registration of the 'get_account_info' tool within the tools array.
    {
      name: 'get_account_info',
      description: 'Retrieve account metadata including currency code and account ID',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • The 'getAccountSummary' method in the Trading212Client class, which performs the actual API call to retrieve the account information.
    async getAccountSummary(): Promise<AccountSummary> {
      return this.request('/equity/account/summary', {}, AccountSummarySchema);
    }

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