get_audit_cases
Retrieve Federal Election Commission audit cases and findings to monitor campaign finance compliance, filterable by committee, year, or finding type.
Instructions
Get FEC audit cases and findings
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| committee_id | No | Optional: FEC committee ID | |
| audit_id | No | Optional: Specific audit case ID | |
| audit_year | No | Optional: Year of audit | |
| finding_types | No | Optional: Types of findings to filter by |
Implementation Reference
- src/server.ts:796-823 (handler)The handler function that implements the 'get_audit_cases' tool. It validates input parameters using Zod, applies rate limiting, queries the OpenFEC API endpoint '/audit-cases', and returns the response as formatted JSON text.
private async handleGetAuditCases(args: any) { const schema = z.object({ committee_id: z.string().optional(), audit_id: z.string().optional(), audit_year: z.number().optional(), finding_types: z.array(z.string()).optional() }); const params = schema.parse(args); this.rateLimiter.consumeToken(); const response = await this.axiosInstance.get('/audit-cases', { params: { ...params, sort_hide_null: true, per_page: 20 } }); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], }; } - src/server.ts:392-413 (schema)The input schema definition for the 'get_audit_cases' tool, defining optional parameters for filtering audit cases by committee, audit ID, year, and finding types.
inputSchema: { type: 'object', properties: { committee_id: { type: 'string', description: 'Optional: FEC committee ID' }, audit_id: { type: 'string', description: 'Optional: Specific audit case ID' }, audit_year: { type: 'number', description: 'Optional: Year of audit' }, finding_types: { type: 'array', items: { type: 'string' }, description: 'Optional: Types of findings to filter by' } } } - src/server.ts:389-414 (registration)Registration of the 'get_audit_cases' tool in the ListTools response, including its name, description, and input schema.
{ name: 'get_audit_cases', description: 'Get FEC audit cases and findings', inputSchema: { type: 'object', properties: { committee_id: { type: 'string', description: 'Optional: FEC committee ID' }, audit_id: { type: 'string', description: 'Optional: Specific audit case ID' }, audit_year: { type: 'number', description: 'Optional: Year of audit' }, finding_types: { type: 'array', items: { type: 'string' }, description: 'Optional: Types of findings to filter by' } } } }, - src/server.ts:467-468 (registration)The switch case in the CallToolRequest handler that routes calls to 'get_audit_cases' to the handleGetAuditCases method.
case 'get_audit_cases': return await this.handleGetAuditCases(request.params.arguments);