Skip to main content
Glama

Openstates Search Bills

openstates_search_bills
Read-onlyIdempotent

Search bills in any US statehouse. Pass jurisdiction as a 2-letter state code (e.g., "CA", "NY", "TX") or full name. Returns bill identifiers, titles, classifications, last action, sponsors, and OpenStates IDs for use with get_bill.

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": {
      "query": "healthcare",
      "jurisdiction": "CA"
    },
    "name": "openstates_search_bills"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNo1-based page (default 1)
sortNoupdated_desc | updated_asc | first_action_desc | first_action_asc | latest_action_desc | latest_action_asc
queryNoFree-text search across title/summary
sessionNoOptional. Session identifiers are PER STATE (Ohio "136", California "20252026", Texas "89"). Omit to search every session. A year or year range ("2025", "2025-2026") is resolved to the state's own session by date; an unknown session is refused with the valid list.
sponsorNoLegislator name filter
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.
jurisdictionYes2-letter state code or jurisdiction name
classificationNobill | resolution | constitutional amendment | etc.

Output Schema

NameRequiredDescriptionDefault
pageYesCurrent page number
billsYes
totalYesTotal matching bills across all pages
returnedYesNumber of bills in this response
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. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, open-world behavior, so the safety profile is covered. The description adds useful behavioral context by naming the fields returned and framing the result as an ID handoff to get_bill. It says nothing about the 20-per-page cap or error handling, but those live in the schema, so the remaining gap is minor.

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?

Two sentences, front-loaded with the core action and scope, followed by the return contract and handoff. No filler or redundancy.

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 four annotations and a fully described 8-parameter schema plus an output schema, the description covers everything an agent needs to select and call the tool. It omits the session-resolution and pagination nuances, but those are fully handled in the schema, so the omission is acceptable rather than harmful.

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%, including per-parameter prose on session resolution, per_page clamping, sort order, and jurisdiction format. The description only restates the jurisdiction format already documented in the schema and adds no syntax or behavior detail beyond it, so the baseline 3 applies.

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 and resource ("Search bills") with a scope ("any US statehouse") and enumerates what comes back (identifiers, titles, classifications, last action, sponsors, IDs). It also explicitly links the returned OpenStates IDs to the sibling tool get_bill, so an agent can distinguish this search tool from the detail tool 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 Guidelines4/5

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

Gives concrete usage context by explaining the jurisdiction argument format with examples ("CA", "NY", "TX") and routes follow-up work to get_bill. It does not explicitly state when a session filter should be used versus omitted or when to prefer a different search tool, so it stops short of full when/when-not coverage.

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.