Optionalshared: EPSharedResourcesProtected ReadonlybaseEuropean Parliament API base URL.
Protected ReadonlycacheLRU cache for API responses.
Protected ReadonlyenableEnable automatic retry on transient failures.
Protected ReadonlymaxMaximum allowed response body size in bytes.
Protected ReadonlymaxMaximum number of retry attempts.
Protected ReadonlyrateToken bucket rate limiter.
Protected ReadonlytimeoutRequest timeout in milliseconds.
PrivatebuildMaps internal params to EP API query parameters for meetings.
The EP API /meetings endpoint supports year for filtering by
calendar year. The date-from / date-to parameters are also
forwarded when present (useful for sub-year ranges).
Clears all entries from the LRU cache.
ProtectedevictEvicts a single cache entry matching the given endpoint and params. Sub-clients use this when they detect that a successfully-fetched payload is a content-pending sentinel that must not be served from cache for the remainder of the TTL — eviction lets availability recover as soon as the upstream document is enriched.
ProtectedgetExecutes a cached, rate-limited GET request to the EP API.
Expected response type (extends Record<string, unknown>)
API endpoint path (relative to baseURL)
Optionalparams: Record<string, unknown>Optional query parameters
OptionalminimumTimeoutMs: numberOptional per-request minimum timeout in milliseconds.
When provided, the effective timeout is Math.max(minimumTimeoutMs, this.timeoutMs),
so the global timeout (set via --timeout or EP_REQUEST_TIMEOUT_MS) can still
extend it beyond the per-endpoint minimum.
Use for known slow EP API endpoints such as procedures/feed.
Promise resolving to the typed API response
Returns cache statistics for monitoring and debugging.
{ size, maxSize, hitRate, hits, misses }
Returns EP events (hearings, conferences, etc.).
EP API Endpoint: GET /events
Note: The EP API /events endpoint does not support year,
date-from, or date-to query parameters — it has no date filtering
at all per the OpenAPI spec. Only pagination (limit/offset) is supported.
Retrieves recently updated events via the feed endpoint.
EP API Endpoint: GET /events/feed
Note: The EP API events/feed endpoint is significantly slower
than other feed endpoints. This method uses the global EP request
timeout (no extended slow-feed minimum) and throws APIError on
HTTP failures (including timeouts surfaced as status 408).
The MCP tool layer (handleGetEventsFeed) converts thrown errors into
a machine-readable in-band feed envelope; direct PlenaryClient /
EuropeanParliamentClient consumers should handle APIError throws.
Returns activities linked to a specific meeting (plenary sitting).
EP API Endpoint: GET /meetings/{sitting-id}/activities
Returns a single EP meeting by ID.
EP API Endpoint: GET /meetings/{event-id}
Returns decisions made in a specific meeting (plenary sitting).
EP API Endpoint: GET /meetings/{sitting-id}/decisions
Returns foreseen activities linked to a specific meeting.
EP API Endpoint: GET /meetings/{sitting-id}/foreseen-activities
Returns plenary session document items for a specific meeting.
EP API Endpoint: GET /meetings/{sitting-id}/plenary-session-document-items
Returns plenary session documents for a specific meeting.
EP API Endpoint: GET /meetings/{sitting-id}/plenary-session-documents
Retrieves plenary sessions with year/date and location filtering.
EP API Endpoint: GET /meetings
The EP API supports filtering by year (recommended for annual counts).
dateFrom / dateTo are also forwarded but may be ignored by the API
for certain endpoints.
year, dateFrom, dateTo, location, limit, offset
Paginated plenary session list
PrivatetransformPrivatetransformPrivatetransformPrivatetransform
Sub-client for plenary sessions and meeting-related EP API endpoints.