Skip to main content
Glama
psalzman

MCP OpenFEC Server

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);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states it 'gets' data (implying read-only), but doesn't mention any behavioral traits like pagination, rate limits, authentication requirements, or what happens when multiple optional parameters are combined. For a data retrieval tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at just 6 words ('Get FEC audit cases and findings'). It's front-loaded with the core purpose and contains no unnecessary verbiage. Every word earns its place in communicating the essential function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 4 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain what 'audit cases and findings' actually means in practice, what data format is returned, or how the optional parameters interact. For a data retrieval tool with multiple filtering options, more context would be helpful for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all parameters are documented in the schema itself. The description doesn't add any parameter-specific information beyond what's already in the schema descriptions. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get FEC audit cases and findings' clearly states the verb ('Get') and resource ('FEC audit cases and findings'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'get_filings' or 'search_candidates', but the specificity of 'audit cases and findings' provides inherent domain distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'get_filings' that might overlap in data retrieval contexts, there's no mention of when this tool is appropriate or when other tools should be preferred. The description is purely functional without contextual usage information.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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