Skip to main content
Glama
psalzman
by psalzman

get_committee

Retrieve detailed Federal Election Commission committee information, including campaign finance data, by providing a specific FEC committee ID.

Instructions

Get detailed information about a committee

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
committee_idYesFEC committee ID

Implementation Reference

  • The handler function for the 'get_committee' tool. It validates the input committee_id using Zod, consumes a rate limit token, fetches committee details from the OpenFEC API endpoint `/committee/${committee_id}`, and returns the response data as formatted JSON text.
    private async handleGetCommittee(args: any) { const schema = z.object({ committee_id: z.string(), }); const { committee_id } = schema.parse(args); this.rateLimiter.consumeToken(); const response = await this.axiosInstance.get(`/committee/${committee_id}`); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], }; }
  • src/server.ts:156-169 (registration)
    Registration of the 'get_committee' tool in the ListTools response, including name, description, and input schema definition.
    { name: 'get_committee', description: 'Get detailed information about a committee', inputSchema: { type: 'object', properties: { committee_id: { type: 'string', description: 'FEC committee ID', }, }, required: ['committee_id'], }, },
  • src/server.ts:451-452 (registration)
    Dispatcher switch case in CallToolRequestSchema handler that routes 'get_committee' calls to the handleGetCommittee method.
    case 'get_committee': return await this.handleGetCommittee(request.params.arguments);
  • Runtime input validation schema using Zod that matches the tool's inputSchema, requiring a committee_id string.
    const schema = z.object({ committee_id: z.string(), });

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