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.

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": {
      "candidate_id": "<candidate_id>"
    },
    "name": "get_candidate_photo"
  }
}

Input Schema

NameRequiredDescriptionDefault
candidate_idYesCandidate id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Goes well beyond the annotations, which only declare readOnly/openWorld. It discloses the source policy (official portraits, public domain/licensed only), the attribution obligation that MUST be honored for Wikimedia CC BY, and the frequent null return (~11% coverage) with guidance to design an initials-avatar fallback. The one gap is that it does not state what the returned object looks like (URL plus license/attribution fields are implied but not spelled out, and there is no output schema).

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?

Efficiently front-loaded: what it is, then licensing, then the null-rate caveat, then the alternative. It is dense but every clause carries decision-relevant information; the endpoint parenthetical is mildly extraneous but clarifies a real confusion risk.

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?

For a single-parameter read tool with no output schema, the description covers the missing pieces an agent needs: the common null case, the fallback design pattern, the licensing/attribution obligation, and when the tool is redundant. Nothing material is left out.

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 coverage is 100% and there is only one parameter, so the schema's 'Candidate id.' plus the anyOf integer/string typing already carries the detail. The description adds only the contextual cue that an id alone is the reason to call it; it does not clarify id format or accepted string forms.

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 first sentence names the exact resource (a candidate's official portrait URL) and explicitly disambiguates it from the underlying endpoint that 'returns the image bytes'. It is immediately distinguishable from siblings like get_candidate, which returns the candidate record rather than a portrait asset.

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?

States an explicit when-not: 'Candidate rows from list_candidates and get_midterms already include photo_url, so call this only when you have just an id.' It names the two sibling tools that make this call redundant and the condition (bare id) that justifies it.

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