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.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

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

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-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."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. 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."
  3. 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"
      +}
  4. First observed

TDQS

A3.5/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 covered. The description adds a return-field summary, but that duplicates the existing output schema rather than disclosing new behavior such as rate limits or empty-result handling. The per_page clamping behavior lives only in the schema, not the description.

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?

Two front-loaded sentences with no filler; the filter enumeration is compact and scannable. Nothing is wasted, though the return-field sentence adds little given the output schema.

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 an output schema, full parameter documentation, and rich annotations, the description only needs to frame purpose and filters, which it does. The one gap is the search-vs-get_legislator routing decision, which an agent must resolve from the name alone.

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 the baseline is 3. The description's filter list adds light mapping but omits detail the schema carries, and it describes chamber as "upper/lower" while the actual org_classification parameter also accepts "legislature" — a small inconsistency. Pagination parameters are not mentioned at all.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Find state legislators") and enumerates the filter dimensions, so the agent knows exactly what kind of lookup this is. It does not explicitly contrast with the sibling get_legislator, so the search-vs-fetch boundary must be inferred.

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?

Usage is only implied: the filter list signals 'use this when you have partial criteria,' but there is no statement of when to prefer this over get_legislator or how to proceed when zero filters are supplied. No exclusions or prerequisites are mentioned.

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.