European Parliament MCP Server API - v1.3.9
    Preparing search index...
    • Handles the analyze_legislative_effectiveness MCP tool request.

      Fans out four EP Open Data Portal sources in parallel under independent 6 s timeouts, then aggregates the results through aggregateLegislativeEffectiveness to produce defensible effectiveness metrics for an MEP or committee.

      Parameters

      Returns Promise<ToolResult>

      MCP tool result with a LegislativeEffectivenessAnalysis envelope that includes metrics, scores, per-source dataSources flags, dataQualityWarnings, and full attribution lists sorted ascending.

      const result = await handleAnalyzeLegislativeEffectiveness({
      subjectType: 'MEP',
      subjectId: 'person/124936',
      dateFrom: '2024-01-01',
      dateTo: '2024-12-31',
      });

      Input is validated with Zod before any API call. Per-source fetches are audit-logged with truncated counts (no MEP names beyond IDs). Per-source 6 s timeouts use AbortController to prevent dangling fetches.

      Warm cache: <300 ms. Cold worst case: ≈6-8 s (parallel sources). 15-minute cache keyed by (subjectType, subjectId, dateFrom, dateTo).

      0.8.0