Skip to main content
Glama

Get a candidate with endorsements

get_candidate
Read-onlyIdempotent

One candidate with every contest they are on, how each turned out once it has a result, and every endorsement they received in each (who, the rank in ranked choice, what they said and where), where they stand on common issues, with sources, their name in parts, FEC and Congress ids, website and social accounts (with where each came from), FEC campaign finance totals for federal candidates (receipts, money from individuals, PACs and parties, the candidate’s own money and loans, cash and debts; finance[].individual_donors breaks down what individuals gave, as totals only: itemized and unitemized, in-state and out-of-state, by donor size, state, occupation group and month, with no donor names), their FEC committees (principal campaign committee, other authorized and joint fundraising committees, and leadership PACs they sponsor), contributions_from_committees (what PACs, parties and other committees gave them each cycle, by type, with the ten largest givers and the endorser behind each), spending (what their principal campaign committee spent money on each cycle, from its FEC operating expenditures: totals by category such as advertising, fundraising, consulting, staff, mail, polling and fees, and the ten businesses it paid most), outside_spending (FEC independent expenditures and union or corporate communication costs for or against them, by cycle (2024 and 2026; outside_spending_cycles narrows them) and spender, with dates, naming the spender when it is one of our endorsers; spending is not an endorsement), their background (prior elected office and which, gender, military service), each with its source, and published ideology scores (DIME CFscore). person ties the record to one person across elections, with other names (such as a name before marriage) and party_changes (every switch dated: the day when announced, otherwise the window between their last election under the old party and their first under the new one); other_candidacies lists races they were in without being printed; rescinded_endorsements lists endorsements of them that were taken back. Records in the answer: result, candidate, issue-position, committee-contribution, endorsement, candidate-background, ideology-score, outside-spending, fec-committees, campaign-spending (describe_record explains each field, describe_values each coded value).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

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

Input Schema

NameRequiredDescriptionDefault
idYesCandidate id (from GET /v1/candidates, or a choice’s candidate.id).
langNoes for Spanish ballot text (titles, choices, measure text, statements) where the state publishes it; English otherwise. Names are never translated. Values: en: English (the default). es: Spanish ballot text (titles, choices, measure text, statements) where the state publishes it; English where it doesn’t. Names are never translated.
fieldsNoOptional: return only these fields of each record, to keep the answer short. Leave it out to get every field (the default, and the right choice when you are not sure what you need). Comma-separated field names. A dot reaches into a nested object or into every item of a list (choices.label); parentheses group several fields under one (choices(label,party) means choices.label,choices.party). A field named alone comes back whole. Example: "full_name,website_url,contests(contest.title,endorsement_count),issue_positions(issue,stance)". Top-level fields here: id, full_name, name, website_url, photo_url, incumbent, ids, contact, finance, outside_spending, fec_committees, contributions_from_committees, spending, background, ideology, contests, issue_positions, person, other_candidacies. next_cursor always comes back, so paging works the same. A field that is null stays null. An unknown name gives an error listing the names that exist there; fix it and call again. describe_record explains every field.
outside_spending_cyclesNoFEC cycles (by their last year, such as 2024 or 2026) that outside_spending shows; leave it out for every cycle we hold. Comma-separated (up to 200 values); any of them matches.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / fields
      Added value: +{
      +  "description": "Optional: return only these fields of each record, to keep the answer short. Leave it out to get every field (the default, and the right choice when you are not sure what you need). Comma-separated field names. A dot reaches into a nested object or into every item of a list (choices.label); parentheses group several fields under one (choices(label,party) means choices.label,choices.party). A field named alone comes back whole. Example: \"full_name,website_url,contests(contest.title,endorsement_count),issue_positions(issue,stance)\". Top-level fields here: id, full_name, name, website_url, photo_url, incumbent, ids, contact, finance, outside_spending, fec_committees, contributions_from_committees, spending, background, ideology, contests, issue_positions, person, other_candidacies. next_cursor always comes back, so paging works the same. A field that is null stays null. An unknown name gives an error listing the names that exist there; fix it and call again. describe_record explains every field.",
      +  "maxLength": 2000,
      +  "type": "string"
      +}
    • addedInput schema / properties / outside_spending_cycles
      Added value: +{
      +  "description": "FEC cycles (by their last year, such as 2024 or 2026) that outside_spending shows; leave it out for every cycle we hold. Comma-separated (up to 200 values); any of them matches.",
      +  "items": {
      +    "maximum": 9007199254740991,
      +    "minimum": -9007199254740991,
      +    "type": "integer"
      +  },
      +  "maxItems": 200,
      +  "type": "array"
      +}
  2. First observed

TDQS

B3.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the bar is lower, yet the description still adds real context: individual_donors is totals only with no donor names, outside spending is not an endorsement, and describe_record/describe_values explain fields and coded values. It also names the record types returned. It omits pagination behavior and the next_cursor contract, which the schema mentions.

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

Conciseness2/5

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

The description is a single run-on sentence of several hundred words that dumps the entire return shape. It is not front-loaded for scanning, and the key facts (single candidate by id, use describe_record for fields) are buried. Much of the enumeration duplicates what the schema and describe_record already provide.

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 complex, high-fan-out record fetch with no output schema, the description is thorough about what comes back, including caveats on donor anonymity and outside spending. It is missing usage routing and paging details, but the return-value coverage is strong.

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 the schema already documents id, lang, fields and outside_spending_cycles in detail. The description adds only that outside_spending_cycles narrows the cycles shown, which is marginal. Baseline 3 is appropriate when the schema does the heavy lifting.

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

Purpose4/5

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

The opening clause states a specific verb and resource: one candidate plus every contest, result, endorsement, issue position, finance record and background item. It is clearly a single-record fetch by id. It never distinguishes itself from siblings such as search_candidates or get_endorser, and the purpose is buried under a long field inventory.

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

Usage Guidelines2/5

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

The description gives no when-to-use guidance, no alternatives, and no prerequisites. It never says to resolve an id via search_candidates first, and it never says when to prefer this over list_endorsements or get_contest. The only hint about the id source lives in the schema, not the description.

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.

Resources