Skip to main content
Glama

Search Candidates

search_candidates
Read-onlyIdempotent

Search federal election candidates by name, state, or party. Returns candidate ID, name, party, office, state, district, and election years. Example: search_candidates("Biden", state="DE", party="DEM")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
partyNoParty code: "DEM", "REP", "LIB", "GRE", etc.
queryYesCandidate name to search (e.g., "Sanders")
stateNoTwo-letter state code (e.g., "CA", "NY")
_apiKeyYesOpenFEC API key

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
totalYesTotal count of candidates matching search criteria
returnedYesNumber of candidates returned in this response
candidatesYesArray of candidate records

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "_apiKey": "your-open-fec-api-key",
      -    "query": "Sanders"
      -  },
      -  {
      -    "_apiKey": "your-open-fec-api-key",
      -    "party": "DEM",
      -    "query": "Biden",
      -    "state": "DE"
      -  }
      -]New value: +[
      +  {
      +    "query": "Sanders"
      +  },
      +  {
      +    "party": "DEM",
      +    "query": "Biden",
      +    "state": "DE"
      +  }
      +]
  2. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already provide the safety profile (read-only, idempotent, non-destructive), so the description need not repeat that. It adds useful context about searchable fields and output shape, though it does not disclose potential limitations like data freshness, pagination, or API-key behavior.

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 compact: one sentence for purpose and output, another for a concrete example. It is front-loaded and every sentence earns its place.

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

Completeness4/5

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

For a simple read-only search tool, the description together with the 100%-covered schema and existing output schema is largely complete. It lacks explicit mention of pagination or data-source caveats, but these are not critical for basic invocation.

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?

The input schema already describes all four parameters, including examples, so description has no heavy burden. The description's mention of name, state, and party aligns with the schema, and the example adds minor value but no new semantic detail beyond the schema.

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 states a clear verb and resource ('Search federal election candidates'), the search dimensions (name, state, party), and the exact returned fields. The scope distinguishes it from sibling tools like search_committees and financial-lookup tools.

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?

The description clearly implies when to use this tool: when looking up candidates by name, state, or party. It does not explicitly name alternatives or give when-not-to-use guidance, but the resource scope is clear enough for an agent to select it appropriately.

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.