Skip to main content
Glama

Search Legislators

search_legislators
Read-onlyIdempotent

Find state legislators. Filter by jurisdiction, name, chamber (upper/lower), party, or district. Returns name, current/prior roles, party, contact details, OpenStates IDs.

Input Schema

NameRequiredDescriptionDefault
nameNoName fragment
pageNo1-based page
partyNoParty name (e.g., "Democratic", "Republican")
districtNoDistrict identifier
per_pageNo1-20 (default 20) — OpenStates rejects anything above 20 with a 400; a higher value is clamped to 20 and the response says so. Use `page` for more results.
jurisdictionNo2-letter state code or name
org_classificationNoupper | lower | legislature

Output Schema

NameRequiredDescriptionDefault
pageYesCurrent page number
totalYesTotal matching legislators
returnedYesNumber of legislators in response
legislatorsYes
total_pagesYesTotal number of pages

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / per_page / description
      Previous value: -"1-50 (default 20)"New value: +"1-20 (default 20) — OpenStates rejects anything above 20 with a 400; a higher value is clamped to 20 and the response says so. Use `page` for more results."
  2. Changed2 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "jurisdiction": "CA"
      +  },
      +  {
      +    "jurisdiction": "NY",
      +    "name": "Johnson",
      +    "org_classification": "lower",
      +    "party": "Democratic"
      +  }
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "legislators": {
      +      "items": {
      +        "properties": {
      +          "chamber": {
      +            "description": "Chamber (upper/lower)",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "district": {
      +            "description": "District identifier",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "email": {
      +            "description": "Email address",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "image": {
      +            "description": "Image URL",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "jurisdiction": {
      +            "description": "State or jurisdiction",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "name": {
      +            "description": "Full name",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "openstates_url": {
      +            "description": "Link to OpenStates profile",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "party": {
      +            "description": "Political party",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "person_id": {
      +            "description": "OpenStates person ID",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "title": {
      +            "description": "Current title/role",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "page": {
      +      "description": "Current page number",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "returned": {
      +      "description": "Number of legislators in response",
      +      "type": "number"
      +    },
      +    "total": {
      +      "description": "Total matching legislators",
      +      "type": "number"
      +    },
      +    "total_pages": {
      +      "description": "Total number of pages",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "total",
      +    "page",
      +    "total_pages",
      +    "returned",
      +    "legislators"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint, and destructiveHint=false, so the safety profile is fully covered. The description adds little new behavior context; its 'Returns ...' line largely duplicates the existing output schema and it omits any mention of pagination behavior covered only in the schema.

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?

Three short sentences, front-loaded with the action and resource, then filters, then return shape. No wasted words.

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 annotations covering safety, a full schema, and an output schema, the description need not explain return values, and it is largely complete. A minor gap is that it doesn't route the agent between search_legislators and get_legislator for a single known entity.

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%, so all 7 parameters are already documented in the schema. The description's list of filters adds only a light mapping (chamber -> org_classification) beyond what the schema provides, making the baseline 3 appropriate.

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?

States a specific verb (Find) and resource (state legislators), and the scope is distinct from siblings like get_legislator (singular fetch) and search_bills (different resource). An agent can tell it apart without opening either schema.

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

Usage Guidelines3/5

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

The description enumerates available filters, which implies the search use case, but it gives no explicit when-to-use/when-not guidance and never names the alternative to get_legislator for a single known legislator. Usage is inferred rather than stated.

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.