Skip to main content
Glama

Openfec Search Expenditures

openfec_search_expenditures
Read-onlyIdempotent

Search independent expenditures (Schedule E) — outside spending supporting or opposing federal candidates. Covers Super PACs, party committees, and other groups. Use itemized mode for individual expenditure records, or by_candidate for aggregated totals per candidate; by_candidate needs either a candidate_id or a full race scope (candidate_office alone for President, plus candidate_office_state for Senate, plus candidate_office_district as well for House).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "openfec_search_expenditures"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoQuery mode. "itemized" returns individual expenditure records (keyset pagination). "by_candidate" returns aggregated totals per candidate by committee (page-based), largest total first.itemized
pageNoPage number (1-indexed) for by_candidate mode. Explicit page is rejected in itemized mode, which paginates with cursor. Defaults to 1 for by_candidate.
sortNoSort field. A "-" prefix sorts descending: use "-expenditure_amount" for the largest outside spending first, since the ascending form leads with the most negative rows (corrections and voided entries). Itemized only; OpenFEC sorts by "-expenditure_date" when omitted.
cycleNoTwo-year election cycle (e.g., 2024). Even years only. Itemized mode defaults to the current cycle when omitted — Schedule E spans all history and an unscoped scan times out upstream. Pass an explicit cycle to search an earlier period. In by_candidate mode the cycle names the election, and election_full decides whether the totals cover the full election period ending in it (4yr president, 6yr senate, 2yr house) or only this two-year cycle.
cursorNoOpaque pagination cursor from a previous response of this tool. Itemized mode only (keyset pagination). Valid only for an otherwise-identical call — changing any other argument, including sort, rejects the cursor; omit it to start over.
max_dateNoLatest expenditure date (YYYY-MM-DD). Itemized only.
min_dateNoEarliest expenditure date (YYYY-MM-DD). Itemized only.
per_pageNoResults per page.
is_noticeNoWhich Schedule E filings to read. Omitted returns both 24/48-hour notices and periodic-report rows, which overlap: most spending filed on a notice is reported again on the next periodic report of the same spender, so never add the two kinds together. false returns periodic-report rows only, which sum once memo entries (memo_code "X") are left out. true returns 24/48-hour notices only — the newest spending, filed before it reaches a periodic report. Itemized only.
max_amountNoMaximum expenditure amount in dollars. Itemized only.
min_amountNoMinimum expenditure amount in dollars. Itemized only.
payee_nameNoFull-text payee name search. Itemized only.
most_recentNoOnly the most recent version of amended filings. Itemized only — by_candidate rejects it. Defaults to true in itemized mode when omitted; pass false to see superseded versions of amended filings.
candidate_idNoTargeted candidate ID (e.g., P00003392). Get IDs from openfec_search_candidates results.
committee_idNoSpending committee ID (e.g., C00703975). Get IDs from openfec_search_committees results.
election_fullNoby_candidate only: expand cycle to the full election period (4yr president, 6yr senate, 2yr house) instead of the two-year cycle alone. Defaults to true when omitted; itemized mode rejects it, since that endpoint has no such parameter. Carries no schema default, so an explicit value is distinguishable from an omission.
support_opposeNoS = support, O = oppose. Filter by whether the expenditure supports or opposes the candidate.
candidate_partyNoParty code as OpenFEC files it, up to three characters (e.g., DEM, REP, LIB, W). Filters on the party of the targeted candidate. Itemized only — by_candidate rejects it, since the aggregate endpoint has no party filter.
candidate_officeNoOffice of the targeted candidate: H=House, S=Senate, P=President. In by_candidate mode this scopes a whole race: P stands alone, S also needs candidate_office_state, H also needs candidate_office_state and candidate_office_district.
candidate_office_stateNoTwo-letter state code of the targeted race. Required alongside candidate_office=H or candidate_office=S in by_candidate mode; leave it off for candidate_office=P, whose aggregate rows carry no state and match nothing when one is supplied.
candidate_office_districtNoTwo-digit House district of the targeted race (e.g., "09"). Required alongside candidate_office=H and candidate_office_state in by_candidate mode; Senate and presidential rows carry no district and match nothing when one is supplied.

Output Schema

NameRequiredDescriptionDefault
modeNoQuery mode as the server resolved it. Row shapes differ by mode — itemized rows are individual expenditures, by_candidate rows are per-candidate totals — so read this rather than inferring the shape from the fields present.
countNoTotal matching independent expenditures (itemized mode). Check count_is_approximate before quoting it as a figure.
errorNoPresent when the call failed. Absent on success.
noticeNoGuidance when the response needs context: how to broaden a search that matched nothing, which requested position ran out when expenditures did match, that the total is an estimate, how many rows on an itemized page that mixes them with other rows are 24/48-hour notices or memo entries and not to be summed with the rest, or — by_candidate in the current cycle — that spending filed only on 24/48-hour notices is missing from the totals, with the itemized call that lists it. Several apply at once as sentences of one notice.
resultsNoExpenditure result set; itemized records or per-candidate aggregates depending on mode.
committeeNoThe committee every row in this response belongs to, carried once in full instead of repeated in each row. Present only when the query was scoped to a single committee_id. A row whose committee record differs from this one — the same committee's record for another cycle — keeps its own.
committeesNoSpending committees the itemized rows reference, keyed by each row's committee_id: every distinct spender once, in full, instead of a copy on each row. Present on itemized pages not scoped to one committee_id. A row whose record differs from its ID's entry (the same committee's record for another cycle) keeps its own. Absent when no row carries one.
paginationNoPage-based pagination info (by_candidate mode only).
totalCountNoTotal matching expenditures or per-candidate aggregates.
next_cursorNoPagination cursor for the next page of itemized results. Null when no more pages.
search_criteriaNoEcho of the search filters this call applied, as the server parsed them, minus paging arguments. Always present — compare it against what you sent to confirm every filter was honoured.
count_is_approximateNoTrue when OpenFEC reports count as an estimate rather than a tally, which it does on its highest-volume queries. Absent means the count is a tally.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changed
    • changedInput schema / properties / candidate_party / description
      Previous value: -"Three-letter party code of the targeted candidate (e.g., DEM, REP). Itemized only — by_candidate rejects it, since the aggregate endpoint has no party filter."New value: +"Party code as OpenFEC files it, up to three characters (e.g., DEM, REP, LIB, W). Filters on the party of the targeted candidate. Itemized only — by_candidate rejects it, since the aggregate endpoint has no party filter."
    • changedInput schema / properties / is_notice / description
      Previous value: -"Only 24/48-hour notice filings (near-election spending). Itemized only."New value: +"Which Schedule E filings to read. Omitted returns both 24/48-hour notices and periodic-report rows, which overlap: most spending filed on a notice is reported again on the next periodic report of the same spender, so never add the two kinds together. false returns periodic-report rows only, which sum once memo entries (memo_code \"X\") are left out. true returns 24/48-hour notices only — the newest spending, filed before it reaches a periodic report. Itemized only."
    • changedInput schema / properties / mode / description
      Previous value: -"Query mode. \"itemized\" returns individual expenditure records (keyset pagination). \"by_candidate\" returns aggregated totals per candidate by committee (page-based)."New value: +"Query mode. \"itemized\" returns individual expenditure records (keyset pagination). \"by_candidate\" returns aggregated totals per candidate by committee (page-based), largest total first."
    • changedInput schema / properties / per_page / description
      Previous value: -"Results per page. Itemized mode sends at most 60 upstream when scoped by committee_id and 30 otherwise, keeping the response under a 100,000-byte budget; a page bounded below your request reports truncated and cap, and next_cursor continues it."New value: +"Results per page."
    • removedOutput schema / properties / cap
      Removed value: -{
      -  "description": "The per_page this call applied in place of the one requested — the page-size ceiling for this tool and scope. Present only when truncated is true.",
      -  "type": "number"
      -}
    • changedOutput schema / properties / committee / description
      Previous value: -"The committee every row in this response belongs to, carried once instead of repeated in each row. Present only when the query was scoped to a single committee_id; otherwise each row keeps its own committee object."New value: +"The committee every row in this response belongs to, carried once in full instead of repeated in each row. Present only when the query was scoped to a single committee_id. A row whose committee record differs from this one — the same committee's record for another cycle — keeps its own."
    • addedOutput schema / properties / committees
      Added value: +{
      +  "additionalProperties": {
      +    "additionalProperties": {},
      +    "description": "The committee record as OpenFEC files it for the cycle: name, type, designation, party, address, treasurer, filing frequency, file dates, and the cycles it was active.",
      +    "properties": {},
      +    "type": "object"
      +  },
      +  "description": "Spending committees the itemized rows reference, keyed by each row's committee_id: every distinct spender once, in full, instead of a copy on each row. Present on itemized pages not scoped to one committee_id. A row whose record differs from its ID's entry (the same committee's record for another cycle) keeps its own. Absent when no row carries one.",
      +  "propertyNames": {
      +    "description": "The committee ID the rows carry.",
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • changedOutput schema / properties / notice / description
      Previous value: -"Guidance when the response needs context: how to broaden a search that matched nothing, which requested position ran out when expenditures did match, that the total is an estimate, or that the page was bounded below the per_page requested and how to continue."New value: +"Guidance when the response needs context: how to broaden a search that matched nothing, which requested position ran out when expenditures did match, that the total is an estimate, how many rows on an itemized page that mixes them with other rows are 24/48-hour notices or memo entries and not to be summed with the rest, or — by_candidate in the current cycle — that spending filed only on 24/48-hour notices is missing from the totals, with the itemized call that lists it. Several apply at once as sentences of one notice."
    • changedOutput schema / properties / results / items / description
      Previous value: -"Itemized independent expenditure record (mode=itemized) or per-candidate aggregate row (mode=by_candidate)."New value: +"Itemized independent expenditure record (mode=itemized) or per-candidate aggregate row (mode=by_candidate). Itemized rows carry is_notice — true for a 24/48-hour notice, false for a periodic-report row, and most notice spending reappears on the next periodic report — and memo_code, \"X\" (with memoed_subtotal true) on a memo entry, which itemizes or restates another row and sits outside report totals. Never add notice rows to report rows, or memo entries to any other row."
    • removedOutput schema / properties / shown
      Removed value: -{
      -  "description": "Rows in this page. Present only when truncated is true.",
      -  "type": "number"
      -}
    • removedOutput schema / properties / truncated
      Removed value: -{
      -  "description": "True when this page holds fewer rows than the per_page requested because a full page would exceed the 100,000-byte response budget, and more rows remain. Absent on a complete page, including a naturally short last page.",
      -  "type": "boolean"
      -}
  2. Changed8 schema fields changed
    • changedInput schema / properties / cycle / description
      Previous value: -"Two-year election cycle (e.g., 2024). Even years only. Itemized mode defaults to the current cycle when omitted — Schedule E spans all history and an unscoped scan times out upstream. Pass an explicit cycle to search an earlier period."New value: +"Two-year election cycle (e.g., 2024). Even years only. Itemized mode defaults to the current cycle when omitted — Schedule E spans all history and an unscoped scan times out upstream. Pass an explicit cycle to search an earlier period. In by_candidate mode the cycle names the election, and election_full decides whether the totals cover the full election period ending in it (4yr president, 6yr senate, 2yr house) or only this two-year cycle."
    • addedInput schema / properties / election_full
      Added value: +{
      +  "description": "by_candidate only: expand cycle to the full election period (4yr president, 6yr senate, 2yr house) instead of the two-year cycle alone. Defaults to true when omitted; itemized mode rejects it, since that endpoint has no such parameter. Carries no schema default, so an explicit value is distinguishable from an omission.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / per_page / description
      Previous value: -"Results per page."New value: +"Results per page. Itemized mode sends at most 60 upstream when scoped by committee_id and 30 otherwise, keeping the response under a 100,000-byte budget; a page bounded below your request reports truncated and cap, and next_cursor continues it."
    • addedOutput schema / properties / cap
      Added value: +{
      +  "description": "The per_page this call applied in place of the one requested — the page-size ceiling for this tool and scope. Present only when truncated is true.",
      +  "type": "number"
      +}
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `by_candidate_requires_scope`: by_candidate mode invoked without a candidate_id and without a full race scope. `itemized_only_filters_in_aggregate_mode`: An itemized-only filter (payee_name, candidate_party, a date or amount bound, is_notice, most_recent, sort, cursor) was supplied alongside mode by_candidate, which cannot apply it. `inputs_not_applicable_to_mode`: Itemized mode receives an explicit page number that its keyset endpoint cannot apply. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `by_candidate_requires_scope`: by_candidate mode invoked without a candidate_id and without a full race scope. `itemized_only_filters_in_aggregate_mode`: An itemized-only filter (payee_name, candidate_party, a date or amount bound, is_notice, most_recent, sort, cursor) was supplied alongside mode by_candidate, which cannot apply it. `inputs_not_applicable_to_mode`: Itemized mode receives an explicit page number or election_full, neither of which its keyset endpoint can apply. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / notice / description
      Previous value: -"Guidance when the response needs context: how to broaden a search that matched nothing, which requested position ran out when expenditures did match, or that the total is an estimate."New value: +"Guidance when the response needs context: how to broaden a search that matched nothing, which requested position ran out when expenditures did match, that the total is an estimate, or that the page was bounded below the per_page requested and how to continue."
    • addedOutput schema / properties / shown
      Added value: +{
      +  "description": "Rows in this page. Present only when truncated is true.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "description": "True when this page holds fewer rows than the per_page requested because a full page would exceed the 100,000-byte response budget, and more rows remain. Absent on a complete page, including a naturally short last page.",
      +  "type": "boolean"
      +}
  3. Changed4 schema fields changed
    • changedOutput schema / properties / count / description
      Previous value: -"Total result count (may be approximate for itemized)."New value: +"Total matching independent expenditures (itemized mode). Check count_is_approximate before quoting it as a figure."
    • addedOutput schema / properties / count_is_approximate
      Added value: +{
      +  "description": "True when OpenFEC reports count as an estimate rather than a tally, which it does on its highest-volume queries. Absent means the count is a tally.",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / notice / description
      Previous value: -"Guidance when no expenditures matched — echoes filters and suggests how to broaden."New value: +"Guidance when the response needs context: how to broaden a search that matched nothing, which requested position ran out when expenditures did match, or that the total is an estimate."
    • addedOutput schema / properties / pagination / properties / count_is_approximate
      Added value: +{
      +  "description": "True when OpenFEC reports this count as an estimate rather than a tally, which it does on its highest-volume datasets. Absent means the count is a tally. An estimated count — and the pages derived from it — can be off by a wide margin; treat it as an order of magnitude, not a figure to quote.",
      +  "type": "boolean"
      +}
  4. Changed3 schema fields changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `by_candidate_requires_scope`: by_candidate mode invoked without a candidate_id and without a full race scope `itemized_only_filters_in_aggregate_mode`: An itemized-only filter (payee_name, candidate_party, a date or amount bound, is_notice, most_recent, sort, cursor) was supplied alongside mode by_candidate, which cannot apply it `inputs_not_applicable_to_mode`: Itemized mode receives an explicit page number that its keyset endpoint cannot apply Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `by_candidate_requires_scope`: by_candidate mode invoked without a candidate_id and without a full race scope. `itemized_only_filters_in_aggregate_mode`: An itemized-only filter (payee_name, candidate_party, a date or amount bound, is_notice, most_recent, sort, cursor) was supplied alongside mode by_candidate, which cannot apply it. `inputs_not_applicable_to_mode`: Itemized mode receives an explicit page number that its keyset endpoint cannot apply. Other values are possible when a failure originates below the handler."
    • removedOutput schema / properties / next_cursor / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / next_cursor / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  5. Changed4 schema fields changed
    • removedInput schema / properties / page / default
      Removed value: -1
    • changedInput schema / properties / page / description
      Previous value: -"Page number (1-indexed) for by_candidate mode. Ignored in itemized mode, which paginates with cursor. Read pagination.pages in the response to see how many pages exist."New value: +"Page number (1-indexed) for by_candidate mode. Explicit page is rejected in itemized mode, which paginates with cursor. Defaults to 1 for by_candidate."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `by_candidate_requires_scope`: by_candidate mode invoked without a candidate_id and without a full race scope `itemized_only_filters_in_aggregate_mode`: An itemized-only filter (payee_name, candidate_party, a date or amount bound, is_notice, most_recent, sort, cursor) was supplied alongside mode by_candidate, which cannot apply it Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `by_candidate_requires_scope`: by_candidate mode invoked without a candidate_id and without a full race scope `itemized_only_filters_in_aggregate_mode`: An itemized-only filter (payee_name, candidate_party, a date or amount bound, is_notice, most_recent, sort, cursor) was supplied alongside mode by_candidate, which cannot apply it `inputs_not_applicable_to_mode`: Itemized mode receives an explicit page number that its keyset endpoint cannot apply Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "by_candidate_requires_scope",
      -  "itemized_only_filters_in_aggregate_mode"
      -]New value: +[
      +  "by_candidate_requires_scope",
      +  "itemized_only_filters_in_aggregate_mode",
      +  "inputs_not_applicable_to_mode"
      +]
  6. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "results",
      +      "mode",
      +      "search_criteria",
      +      "totalCount"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `by_candidate_requires_scope`: by_candidate mode invoked without a candidate_id and without a full race scope `itemized_only_filters_in_aggregate_mode`: An itemized-only filter (payee_name, candidate_party, a date or amount bound, is_notice, most_recent, sort, cursor) was supplied alongside mode by_candidate, which cannot apply it Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "by_candidate_requires_scope",
      +            "itemized_only_filters_in_aggregate_mode"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "results",
      -  "mode",
      -  "search_criteria",
      -  "totalCount"
      -]
  7. Changed6 schema fields changed
    • removedInput schema / properties / most_recent / default
      Removed value: -true
    • changedInput schema / properties / most_recent / description
      Previous value: -"Only the most recent version of amended filings. Itemized only."New value: +"Only the most recent version of amended filings. Itemized only — by_candidate rejects it. Defaults to true in itemized mode when omitted; pass false to see superseded versions of amended filings."
    • addedOutput schema / properties / committee
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "The committee every row in this response belongs to, carried once instead of repeated in each row. Present only when the query was scoped to a single committee_id; otherwise each row keeps its own committee object.",
      +  "properties": {},
      +  "type": "object"
      +}
    • addedOutput schema / properties / mode
      Added value: +{
      +  "description": "Query mode as the server resolved it. Row shapes differ by mode — itemized rows are individual expenditures, by_candidate rows are per-candidate totals — so read this rather than inferring the shape from the fields present.",
      +  "enum": [
      +    "itemized",
      +    "by_candidate"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / search_criteria / description
      Previous value: -"Echo of the search filters that produced this result set. Populated when results are empty to help diagnose why nothing matched."New value: +"Echo of the search filters this call applied, as the server parsed them, minus paging arguments. Always present — compare it against what you sent to confirm every filter was honoured."
    • changedOutput schema / required
      Previous value: -[
      -  "results",
      -  "totalCount"
      -]New value: +[
      +  "results",
      +  "mode",
      +  "search_criteria",
      +  "totalCount"
      +]
  8. Changed5 schema fields changed
    • changedInput schema / properties / candidate_office / description
      Previous value: -"Office of the targeted candidate: H=House, S=Senate, P=President."New value: +"Office of the targeted candidate: H=House, S=Senate, P=President. In by_candidate mode this scopes a whole race: P stands alone, S also needs candidate_office_state, H also needs candidate_office_state and candidate_office_district."
    • addedInput schema / properties / candidate_office_district
      Added value: +{
      +  "description": "Two-digit House district of the targeted race (e.g., \"09\"). Required alongside candidate_office=H and candidate_office_state in by_candidate mode; Senate and presidential rows carry no district and match nothing when one is supplied.",
      +  "type": "string"
      +}
    • changedInput schema / properties / candidate_office_state / description
      Previous value: -"Two-letter state code of the targeted race."New value: +"Two-letter state code of the targeted race. Required alongside candidate_office=H or candidate_office=S in by_candidate mode; leave it off for candidate_office=P, whose aggregate rows carry no state and match nothing when one is supplied."
    • changedInput schema / properties / candidate_party / description
      Previous value: -"Three-letter party code of the targeted candidate (e.g., DEM, REP)."New value: +"Three-letter party code of the targeted candidate (e.g., DEM, REP). Itemized only — by_candidate rejects it, since the aggregate endpoint has no party filter."
    • changedInput schema / properties / cycle / description
      Previous value: -"Two-year election cycle (e.g., 2024). Even years only."New value: +"Two-year election cycle (e.g., 2024). Even years only. Itemized mode defaults to the current cycle when omitted — Schedule E spans all history and an unscoped scan times out upstream. Pass an explicit cycle to search an earlier period."
  9. Changed1 schema field changed
    • addedInput schema / properties / page
      Added value: +{
      +  "default": 1,
      +  "description": "Page number (1-indexed) for by_candidate mode. Ignored in itemized mode, which paginates with cursor. Read pagination.pages in the response to see how many pages exist.",
      +  "maximum": 9007199254740991,
      +  "minimum": 1,
      +  "type": "integer"
      +}
  10. Changed3 schema fields changed
    • changedInput schema / properties / cursor / description
      Previous value: -"Opaque pagination cursor from a previous response. Itemized mode only (keyset pagination)."New value: +"Opaque pagination cursor from a previous response of this tool. Itemized mode only (keyset pagination). Valid only for an otherwise-identical call — changing any other argument, including sort, rejects the cursor; omit it to start over."
    • changedInput schema / properties / sort / description
      Previous value: -"Sort field. Itemized only."New value: +"Sort field. A \"-\" prefix sorts descending: use \"-expenditure_amount\" for the largest outside spending first, since the ascending form leads with the most negative rows (corrections and voided entries). Itemized only; OpenFEC sorts by \"-expenditure_date\" when omitted."
    • changedInput schema / properties / sort / enum
      Previous value: -[
      -  "expenditure_date",
      -  "expenditure_amount",
      -  "office_total_ytd"
      -]New value: +[
      +  "expenditure_date",
      +  "-expenditure_date",
      +  "expenditure_amount",
      +  "-expenditure_amount",
      +  "office_total_ytd",
      +  "-office_total_ytd"
      +]
  11. Changed2 schema fields changed
    • removedInput schema / properties / candidate_id / pattern
      Removed value: -"^[HSP][0-9A-Z]+$"
    • removedInput schema / properties / committee_id / pattern
      Removed value: -"^C\\d+$"
  12. Changed3 schema fields changed
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Guidance when no expenditures matched — echoes filters and suggests how to broaden.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / totalCount
      Added value: +{
      +  "description": "Total matching expenditures or per-candidate aggregates.",
      +  "type": "number"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "results"
      -]New value: +[
      +  "results",
      +  "totalCount"
      +]
  13. Changed4 schema fields changed
    • changedInput schema / properties / candidate_id / description
      Previous value: -"Targeted candidate ID (e.g., P00003392)."New value: +"Targeted candidate ID (e.g., P00003392). Get IDs from openfec_search_candidates results."
    • addedInput schema / properties / candidate_id / pattern
      Added value: +"^[HSP][0-9A-Z]+$"
    • changedInput schema / properties / committee_id / description
      Previous value: -"Spending committee ID (e.g., C00703975)."New value: +"Spending committee ID (e.g., C00703975). Get IDs from openfec_search_committees results."
    • addedInput schema / properties / committee_id / pattern
      Added value: +"^C\\d+$"
  14. Changed9 schema fields changed
    • changedInput schema / properties / per_page / description
      Previous value: -"Results per page (max 100)."New value: +"Results per page."
    • addedInput schema / properties / per_page / maximum
      Added value: +100
    • addedInput schema / properties / per_page / minimum
      Added value: +1
    • changedInput schema / properties / per_page / type
      Previous value: -"number"New value: +"integer"
    • changedOutput schema / properties / pagination / properties / count / description
      Previous value: -"Total results."New value: +"Total result count."
    • changedOutput schema / properties / pagination / properties / page / description
      Previous value: -"Current page number."New value: +"Current page number (1-indexed)."
    • changedOutput schema / properties / pagination / properties / pages / description
      Previous value: -"Total pages."New value: +"Total number of pages."
    • changedOutput schema / properties / results / description
      Previous value: -"Expenditure records (itemized) or per-candidate aggregate rows."New value: +"Expenditure result set; itemized records or per-candidate aggregates depending on mode."
    • changedOutput schema / properties / results / items / description
      Previous value: -"An expenditure record (itemized entry) or a per-candidate aggregate row."New value: +"Itemized independent expenditure record (mode=itemized) or per-candidate aggregate row (mode=by_candidate)."
  15. Changed1 schema field changed
    • addedOutput schema / properties / results / items / description
      Added value: +"An expenditure record (itemized entry) or a per-candidate aggregate row."
  16. Changed4 schema fields changed
    • addedOutput schema / properties / results / items / properties
      Added value: +{}
    • removedOutput schema / properties / results / items / propertyNames
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / search_criteria / properties
      Added value: +{}
    • removedOutput schema / properties / search_criteria / propertyNames
      Removed value: -{
      -  "type": "string"
      -}
  17. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint and idempotentHint, so the safety profile is covered. The description adds the mode split and the race-scope requirements, but the more valuable behavioral warnings — notice/periodic-report overlap ('never add the two kinds together'), the current-cycle default because unscoped scans time out, and cursor invalidation on any argument change — live in the schema rather than the description.

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

Conciseness4/5

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

Everything sits in one front-loaded paragraph that leads with what the tool searches before moving to mode selection and scope rules. It is dense but no sentence is filler, though the single long sentence carrying the office/state/district rule chain is harder to parse than a short bulleted breakdown would be.

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

Completeness5/5

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

With 21 optional parameters, four enums and an output schema, the description only needs to explain the mode decision and required scope combinations — both are covered. The remaining parameter detail is fully carried by the 100%-covered schema, so an agent can call this correctly from the definition plus schema.

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 every one of the 21 parameters is already documented, including the by_candidate scope rules and the election_full semantics. The description restates the by_candidate race-scope requirement but adds no format, example, or default information the schema does not already supply; baseline 3 applies.

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

Purpose5/5

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

The description names a specific verb and resource — 'Search independent expenditures (Schedule E)' — and immediately scopes it to 'outside spending supporting or opposing federal candidates' across Super PACs and party committees. That distinguishes it from sibling tools such as openfec_search_coordinated_expenditures and openfec_search_contributions without needing to open any schema.

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

Usage Guidelines4/5

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

It explicitly routes between the two modes ('Use itemized mode for individual expenditure records, or by_candidate for aggregated totals per candidate') and gives a concrete prerequisite for the aggregate mode (candidate_id or a full race scope, with the per-office state/district rules). It does not, however, tell the agent when to prefer this tool over the coordinated-expenditures or contributions siblings, so the routing is clear only within the tool's own modes.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.