Skip to main content
Glama
psalzman
by psalzman

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

TableJSON Schema
NameRequiredDescriptionDefault
committee_idNoOptional: FEC committee ID
audit_idNoOptional: Specific audit case ID
audit_yearNoOptional: Year of audit
finding_typesNoOptional: Types of findings to filter by

Implementation Reference

  • 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), }, ], }; }
  • 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);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/psalzman/mcp-openfec'

If you have feedback or need assistance with the MCP directory API, please join our Discord server