Raw tool arguments, validated against AnalyzeVotingPatternsSchema
MCP tool result containing a VotingPatternAnalysis object, or a
dataAvailable: false notice when voting statistics are unavailable from the EP API
args fails schema validation (e.g., missing required mepId, bad date format)const result = await handleAnalyzeVotingPatterns({
mepId: 'MEP-124810',
dateFrom: '2024-01-01',
dateTo: '2024-12-31',
compareWithGroup: true
});
// Returns voting statistics, group alignment, and confidence level for MEP-124810
Input is validated with Zod before any API call. Personal data (MEP name, voting records) is minimised per GDPR Article 5(1)(c). All requests are rate-limited and audit-logged per ISMS Policy AU-002. Internal errors are wrapped before propagation to avoid leaking API details.
Handles the analyze_voting_patterns MCP tool request.
Analyses an MEP's voting behaviour over an optional date range, computing group alignment rate, cross-party voting frequency, attendance rate, and a data-quality confidence level. When
compareWithGroupistrue, group alignment metrics are included in the result.