search_spending
Search campaign spending records by description keyword or recipient name to find questionable expenditures and detect potential misuse of funds.
Instructions
Search campaign spending (Schedule B) across all committees by description or recipient. Use to find questionable expenditures like "steak dinner", "event tickets", "travel", "Disney", "golf", or payments to specific vendors. Essential for identifying spending patterns and potential misuse of campaign funds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | No | Search disbursement descriptions for keywords (e.g., "dinner", "travel", "event tickets", "Disney") | |
| recipient_name | No | Search for payments to a specific recipient/vendor | |
| recipient_state | No | Two-letter state code to filter by (e.g., "FL", "NV") | |
| min_amount | No | Minimum disbursement amount to include | |
| cycle | No | Two-year election cycle (e.g., 2024) | |
| limit | No | Maximum number of results to return (default: 20) |
Implementation Reference
- Zod-based input schema defining parameters: description (string), recipient_name (string), recipient_state (2-letter string), min_amount (number >= 0), cycle (int 2000-2030), limit (int 1-100). Includes a superRefine ensuring at least one of description or recipient_name is provided.
/** * search_spending Input Schema */ import { z } from 'zod'; export const searchSpendingInputSchema = { description: z .string() .optional() .describe('Search disbursement descriptions for keywords (e.g., "dinner", "travel", "event tickets", "Disney")'), recipient_name: z .string() .optional() .describe('Search for payments to a specific recipient/vendor'), recipient_state: z .string() .length(2) .optional() .describe('Two-letter state code to filter by (e.g., "FL", "NV")'), min_amount: z .number() .min(0) .optional() .describe('Minimum disbursement amount to include'), cycle: z .number() .int() .min(2000) .max(2030) .optional() .describe('Two-year election cycle (e.g., 2024)'), limit: z .number() .int() .min(1) .max(100) .optional() .describe('Maximum number of results to return (default: 20)'), }; export const searchSpendingParamsSchema = z .object(searchSpendingInputSchema) .superRefine((value, ctx) => { if (!value.description && !value.recipient_name) { ctx.addIssue({ code: z.ZodIssueCode.custom, message: 'Please provide at least one search criterion: description or recipient_name.', }); } }); export type SearchSpendingInput = z.infer<typeof searchSpendingParamsSchema>;