Skip to main content
Glama

Candidate portrait URL

get_candidate_photo

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

TableJSON Schema
NameRequiredDescriptionDefault
candidate_idYesCandidate id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden, and it does so thoroughly. It discloses that the tool returns null when no accepted portrait exists, that only official/licensed sources are used, and that attribution must be shown when the license requires it. This is far more behavioral context than is typical.

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?

The description is front-loaded with the core purpose and includes high-value guidance about null frequency, licensing, and fallback design. It is slightly dense and the parenthetical about the underlying GET endpoint could be seen as marginally redundant, but every sentence contributes useful information.

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 one-parameter tool with no output schema, the description covers the key return behavior (URL or null) and critical edge cases. It could be more explicit about the exact response shape, especially how the license and attribution strings are returned, but the provided information is sufficient for an agent to invoke it 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?

The schema already documents candidate_id with 100% coverage, so the baseline is 3. The description adds that the tool should be invoked when only an id is available, which reinforces the parameter's purpose, but it doesn't add new format, constraint, or relationship details 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 clearly states that the tool returns the URL of a candidate's official portrait, which is a specific resource with an explicit endpoint reference. It also distinguishes itself from sibling tools by noting that list_candidates and get_midterms already include photo_url, so this tool is only for when you have just an id.

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?

The description gives explicit when-to-use guidance: call this only when you have just an id, because candidate rows from list_candidates and get_midterms already include photo_url. It also warns that null is common and instructs the agent to design for an initials-avatar default, which is clear operational context.

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