Skip to main content
Glama

Candidate portrait URL

get_candidate_photo
Read-only

The URL of a candidate's official portrait (GET /v1/photos/{candidate_id} returns the image bytes). Sources are official state-legislature and congressional portraits, public-domain and licensed images only — never a third party's photo library — and each carries a license and attribution string that MUST be shown when the license requires it (Wikimedia CC BY). Returns null when the candidate has no accepted portrait — which is the COMMON case: only about a tenth of the 2026 field has one (11%), so design for an initials-avatar default. Candidate rows from list_candidates and get_midterms already include photo_url, so call this only when you have just an id.

Input Schema

NameRequiredDescriptionDefault
candidate_idYesCandidate id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the read-only and non-destructive annotations, the description discloses important behavioral context: the data sources are official portraits only, each image carries a license and attribution string that MUST be shown when required, and the tool returns null in the common case because only about 11% of the 2026 field has an accepted portrait. These are meaningful operational and compliance details not present in structured fields.

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 front-loaded with the core purpose, then adds only high-value caveats: license attribution, the common null return, and the preferred alternative path through list_candidates/get_midterms. Every sentence contributes to correct selection or invocation.

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?

Although there is no output schema, the description fully explains the return value as a URL or null, notes the endpoint's image-byte behavior, warns that null is common, and covers license/attribution obligations. For a one-parameter read-only lookup, this is complete enough for an agent to call and handle the result correctly.

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% and there is only one parameter, candidate_id, so the schema already carries the main parameter documentation burden. The description adds contextual guidance about when a bare id is available, but it does not add format or syntax details beyond the schema's anyOf integer/string definition.

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 specific resource and return value: the URL of a candidate's official portrait, with the underlying GET endpoint noted as returning image bytes. It distinguishes this from candidate-row tools by explaining that list_candidates and get_midterms already include photo_url, so an agent can tell when this standalone photo lookup is appropriate.

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

Usage Guidelines5/5

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

It gives an explicit routing rule: call this only when you have just a candidate id, because candidate rows from list_candidates and get_midterms already include photo_url. It also sets expectations for the common null case and recommends an initials-avatar default, which is directly actionable usage guidance.

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