European Parliament MCP Server API - v1.3.9
    Preparing search index...
    • Build (or return cached) lifecycle statistics for the latest N procedures.

      The corpus is cached for CACHE_TTL_MS; subsequent callers within the window receive the same model instance for free. Refreshing is lazy: a stale cache is rebuilt on the next call rather than on a timer, so idle processes pay no background cost. Cache and in-flight builds are keyed by corpusSize so distinct sample sizes never share a model.

      Parameters

      • options: { corpusSize?: number; deadline?: number; forceRefresh?: boolean } = {}

        Optional overrides

        • OptionalcorpusSize?: number

          Number of procedures to sample (default: CORPUS_SIZE)

        • Optionaldeadline?: number

          Optional wall-clock deadline (epoch ms) for the underlying fetchEventsBounded loop. When set, the rebuild stops queueing additional events fetches once the deadline is reached and builds the model from whatever was gathered (possibly empty). This is how the request path keeps a cold-cache rebuild from starving its own rate-limit budget. Concurrent callers that omit deadline still share the same in-flight build, so the budget set by the first caller wins.

        • OptionalforceRefresh?: boolean

          Ignore cached model and rebuild

      Returns Promise<LifecycleStatisticsModel>

      The lifecycle statistics model (possibly partial when deadline fires before the full corpus has been fetched)

      The corpus contains only procedure types, event types, and dates — no PII. Bounded concurrency (≤8) prevents API rate-limit exhaustion.

      0.8.0