# Function handleGetVotingRecords

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

  Handles the get_voting_records MCP tool request.

  Retrieves voting records from European Parliament plenary sessions, supporting filtering by session, topic, and date range. Returns aggregate vote tallies (for/against/abstain) and final results. The EP API only provides aggregate vote counts, not individual MEP positions.

  #### Parameters

  - args: unknown

    Raw tool arguments, validated against GetVotingRecordsSchema

  #### Returns Promise<ToolResult>

  MCP tool result containing a paginated list of voting records with vote counts and results

  #### 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 handleGetVotingRecords({
        sessionId: 'PLENARY-2024-01',
        topic: 'Climate Change',
        limit: 20
      });
      // Returns voting records for the January 2024 plenary session on climate topics

  #### 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

  - getVotingRecordsToolMetadata for MCP schema registration
  - handleGetMeetingDecisions for retrieving decisions linked to a specific sitting
  - Defined in tools/getVotingRecords.ts:74