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
| Name | Required | Description | Default |
|---|---|---|---|
| committee_id | Yes | FEC committee ID |
Implementation Reference
- src/server.ts:542-560 (handler)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);
- src/server.ts:543-545 (schema)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(), });