EU Parliament Monitor — API Documentation - v0.8.30
    Preparing search index...

    Class WorldBankMCPClient

    MCP Client for World Bank economic data access. Extends MCPConnection with World Bank-specific tool wrapper methods.

    Always supplies an explicit World Bank server path so the base class never falls back to the European Parliament MCP server defaults.

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Get connection health metrics for telemetry

      Returns { timeoutCount: number; reconnectCount: number; connected: boolean }

      Object with timeout count, reconnection count, and current connection status

    • Send a request to the MCP server

      Type Parameters

      • T = unknown

      Parameters

      • method: string

        RPC method name

      • params: Record<string, unknown> = {}

        Method parameters

      Returns Promise<T>

      Server response

    • Call an MCP tool with automatic retry on timeout or connection loss. Reconnects automatically if the connection was lost between attempts.

      Only transient failures are retried (see isRetriableError). Non-retriable errors — rate-limit (429), session-expired (401), and programmer errors such as TypeError — are re-thrown immediately without consuming any retry budget.

      Parameters

      • name: string

        Tool name

      • args: object = {}

        Tool arguments (plain object, non-null, not an array)

      • OptionalmaxRetries: number

        Override the default retry count from options

      Returns Promise<MCPToolResult>

      Tool execution result

    • Get economic indicator data for a specific country.

      Calls the get_indicator_for_country tool on the World Bank MCP server.

      Parameters

      • countryId: string

        World Bank country code (e.g., 'DEU' for Germany, 'FRA' for France)

      • indicatorId: string

        World Bank indicator ID (e.g., 'NY.GDP.MKTP.CD' for GDP)

      Returns Promise<MCPToolResult>

      MCP tool result with CSV-formatted indicator data, or empty text on error

    Properties

    serverLabel: string

    Human-readable server name for log messages