EU Parliament Monitor — API Documentation - v1.0.0
    Preparing search index...

    Function detectOversizedMEPsFeed

    • Detect whether a get_meps_feed response is an oversized full-census dump.

      Two detection signals (either is sufficient):

      1. Mechanical (primary). The EP MCP server surfaces an OVERSIZED_PAYLOAD entry in dataQualityWarnings[] when the delta-pagination falls back to a full-census dump (> 200 items). This is the authoritative, version-stable signal.
      2. Item-count (defense-in-depth). When the warning is absent (e.g. an older pinned server build, or a future regression that drops the warning), a populated items/data array longer than MEPS_FEED_OVERSIZED_ITEM_THRESHOLD is treated as oversized.

      Returning true lets EuropeanParliamentMCPClient.getMEPsFeed augment the payload with oversizedPayload: true and an OVERSIZED_PAYLOAD: … dataQualityWarnings entry so Stage-A consumers can mechanically detect the condition and fall back to a targeted get_meps({ active: true, limit: 100 }) roster lookup instead of treating the dump as a fresh delta.

      Parameters

      • payload: Record<string, unknown> | undefined

        Parsed get_meps_feed payload (or undefined)

      Returns boolean

      true when the response is an oversized full-census dump