# Function handleDetectVotingAnomalies

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

  Handles the `detect_voting_anomalies` MCP tool request.

  See file-level JSDoc for methodology details. Each anomaly carries `evidenceVoteIds` referencing the contributing DOCEO RCV records.

  #### Parameters

  - args: unknown

    Raw tool arguments, validated against DetectVotingAnomaliesSchema

  #### Returns Promise<ToolResult>

  MCP tool result containing detected anomalies with evidence vote IDs

  #### Throws

  If `args` fails schema validation or the EP API is unreachable.

  #### Security

  Input validated with Zod. Audit logs record only `mepId` and sanitised counts (no MEP names or vote contents).

  #### Since

  0.8.0

  - Defined in tools/detectVotingAnomalies.ts:596