# Function handleTrackMepAttendance

- handleTrackMepAttendance(args: unknown): Promise<ToolResult>

  Handles the track_mep_attendance MCP tool request.

  Tracks plenary attendance and participation rates for individual MEPs or groups of MEPs filtered by country or political group. Derives attendance metrics from plenary vote participation records and computes an overall attendance rating and trend for each MEP.

  #### Parameters

  - args: unknown

    Raw tool arguments, validated against TrackMepAttendanceSchema

  #### Returns Promise<ToolResult>

  MCP tool result containing individual MEP attendance rates, overall summary statistics, attendance trend classification, and computed participation scores

  #### Throws

  - If `args` fails schema validation (e.g., missing required fields or invalid format)
  - If the European Parliament API is unreachable or returns an error response

  #### Example

      const result = await handleTrackMepAttendance({
        mepId: '124810',
        dateFrom: '2024-01-01',
        dateTo: '2024-12-31'
      });
      // Returns attendance analysis with participation rate, trend,
      // and session-level breakdown for the specified MEP

  #### Security

  - Input is validated with Zod before any API call.
  - Personal data in responses is minimised per GDPR Article 5(1)(c).
  - All requests are rate-limited and audit-logged per ISMS Policy AU-002.

  #### Since

  0.8.0

  #### See

  - trackMepAttendanceToolMetadata for MCP schema registration
  - handleAssessMepInfluence for comprehensive MEP influence and activity scoring
  - Defined in tools/trackMepAttendance.ts:369