Skip to main content
Glama

Get Legislators by Location

openstates_get_legislators_by_location
Read-onlyIdempotent

Find every legislator representing a geographic coordinate — both tiers. Pass latitude and longitude to get the state senators and representatives for that location (and potentially governor/executive officials), plus the coordinate's two US Senators and its US Representative. jurisdiction.classification separates the tiers: "state" is a state legislature, "country" is the US Congress. current_role.org_classification does not — it is "upper"/"lower" for a US Senator exactly as for a state senator. Useful for constituent-to-representative matching, address-based policy research, and electoral boundary analysis. This server does not geocode addresses — the caller must provide decimal-degree coordinates. Use include=offices to get contact information alongside the legislator list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeNoRelated data to inline. "offices" includes phone, fax, and address. "links" includes website and social links. "other_names" includes alternate/former names, "other_identifiers" cross-system IDs, and "sources" the provenance URLs behind the record.
latitudeYesLatitude in decimal degrees (e.g., 47.6062 for Seattle, WA).
longitudeYesLongitude in decimal degrees (e.g., -122.3321 for Seattle, WA).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoNumber of legislators returned for this coordinate.
errorNoPresent when the call failed. Absent on success.
noticeNoPresent when no legislators were found — explains why (e.g., location outside US boundaries or unsupported territory).
stateCountNoResults serving a state legislature (jurisdiction.classification = "state").
legislatorsNoLegislators representing the given coordinate.
federalCountNoResults serving the US Congress (jurisdiction.classification = "country") — the coordinate's two US Senators and its US Representative.

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint: true, openWorldHint: true, and idempotentHint: true, so the safety profile is covered. The description adds genuinely useful behavior context: the jurisdictional classification nuance ('jurisdiction.classification separates the tiers... current_role.org_classification does not') and the include=offices tip. No contradiction with annotations, and the added context goes beyond what annotations provide, though it doesn't detail pagination or error cases, which are minor.

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?

Five sentences, each packing a distinct piece of information: purpose, tier breakdown, classification nuance, geocoding limitation, and include advice. No repetition of schema text, and the structure front-loads the core action. It is slightly long but does not waste words; every sentence earns its place.

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?

With an output schema present, the description need not explain return values. It covers all essential operational context: both tiers, classification caveat, no geocoding, and the include trick. For a read-only, idempotent lookup tool, nothing an agent needs to invoke it correctly is missing.

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 100%, so baseline is 3, but the description adds substantial meaning: it gives concrete coordinate examples ('47.6062 for Seattle, WA'), explains the include enum values in detail (offices, links, other_names, etc.), and explicitly calls out that include=offices returns contact information. This is far beyond the schema and helps an agent construct proper calls without guesswork.

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 opens with 'Find every legislator representing a geographic coordinate — both tiers,' which is a specific verb, resource, and scope. It immediately distinguishes this from siblings like 'search_people' by focusing on location-based lookup and explicitly mentions both state and federal tiers, making its unique purpose unmistakable.

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?

It clearly states use cases ('constituent-to-representative matching, address-based policy research, and electoral boundary analysis') and provides an important limitation ('This server does not geocode addresses — the caller must provide decimal-degree coordinates'). However, it does not explicitly contrast with alternative tools (e.g., when to prefer search_people), so it lacks an exclusion clause. Still, the context is strong enough to guide an agent.

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.

TDQS

A4.6/5.0
Disambiguation5/5

Each tool serves a distinct purpose: get_* fetches a single entity by ID, search_* finds multiple entities via criteria, and list_jurisdictions enumerates all jurisdictions. The location-based people lookup is unique and clearly differentiated from name-based search_people. No two tools have overlapping functionality.

Naming Consistency5/5

All tools follow a consistent pattern: openstates_<action>_<entity>, where actions are either get (singular fetch), search (query-based), or list (enumerate all). The entity names are consistent (bill, committee, event, jurisdiction, people) and the special 'legislators_by_location' still fits the verb_noun structure. No mixed conventions or vague verbs.

Tool Count5/5

10 tools is well within the optimal 3-15 range. The server covers the primary legislative data entities—bills, committees, events, jurisdictions, and people—without redundancy. Each tool earns its place for a comprehensive public policy data API.

Completeness5/5

The surface provides full read capability for the domain: search and detail retrieval for all core entities, jurisdiction metadata listing, and a special location-based people lookup. Given the read-only nature of the data source, there are no obvious gaps—every plausible query scenario is addressed.