Skip to main content
Glama

Electoral districts (and boundaries)

list_districts
Read-only

District metadata by state and type (GET /v1/districts): congressional, state senate, state house. Pass district_id with boundary:true to get the polygon as GeoJSON (GET /v1/districts/{id}/boundary) — it is large, so set simplify (degrees, e.g. 0.01) to shrink it. Match districts NUMERICALLY (district_number), never by label text.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input Schema

NameRequiredDescriptionDefault
typeNocongressional | sldu (state senate/upper) | sldl (state house/lower)
limitNo
stateNoPostal code.
offsetNo
boundaryNotrue = return the GeoJSON polygon for district_id.
simplifyNoSimplification tolerance in degrees.
district_idNoA district id from a previous list call (for boundary:true).

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?

Matches the readOnlyHint/destructiveHint=false annotations and then adds real value the annotations cannot: the polygon response is large, simplify reduces it, and district matching must be numeric. The degree unit and example value are behavioral detail. Pagination behavior and any response-size limits for non-boundary listing are not covered.

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?

Three tight sentences, front-loaded with the primary listing purpose before the boundary variant, with no filler. Density is high but nothing is wasted; the endpoint paths in parentheses are arguably redundant yet cheaply anchor the behavior.

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?

With no output schema and seven optional parameters, the description carries its share: it says what the boundary call returns (GeoJSON polygon) and hints at size. What the metadata fields actually contain, and how limit/offset paginate, are left to the caller's assumptions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 71%, and the description fills the most important gaps: it explains the interaction between district_id and boundary, gives simplify's unit and a concrete example (0.01 degrees), and describes what boundary:true actually returns. It clarifies semantics rather than restating enum values already in the schema. limit/offset remain conventional but unremarked.

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?

Names the resource (electoral district metadata) and the two underlying endpoints, and enumerates the district types (congressional, state senate, state house) so an agent can distinguish it from siblings like list_states or list_legislators. The secondary boundary-polygon capability is stated explicitly rather than left implicit.

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?

Gives a clear conditional trigger: pass district_id together with boundary:true to fetch the polygon, and use simplify when doing so. It also warns to match districts numerically rather than by label text. It stops short of naming a sibling alternative or stating when *not* to use this tool (e.g. versus list_states for state-level data).

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