Skip to main content
Glama

Search Bills

openstates_search_bills
Read-onlyIdempotent

Search state legislative bills across all covered US jurisdictions. Supports full-text search, jurisdiction/session filtering, subject tags, sponsor lookups, and sort order. Either jurisdiction or q (full-text) is required, and pairing them is the reliable form — a q-only search spans all 56 jurisdictions and exceeds the upstream timeout for a common term, though a distinctive one still returns quickly. include=sponsorships,actions returns sponsor and action history inline. sort=latest_action_desc surfaces bills currently moving. openstates_get_jurisdiction with include=legislative_sessions returns valid session identifiers for session filtering.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qNoFull-text search across bill titles, abstracts, and text. Required unless jurisdiction is provided. Pair it with jurisdiction whenever a state is known — a q-only search over every jurisdiction times out upstream for a common term.
pageNoPage number (1-indexed).
sortNoSort order. Use "latest_action_desc" for bills currently moving through the legislature.updated_desc
chamberNoFilter by originating chamber. "upper" = Senate, "lower" = House/Assembly.
includeNoRelated data to inline. "sponsorships" and "actions" cover most research needs without a separate openstates_get_bill call. "votes" adds full vote tallies and per-legislator positions.
sessionNoSession identifier (e.g., "2025", "2025-2026", "2025rs"). Use openstates_get_jurisdiction with include=legislative_sessions to discover valid values. Omit to search across all sessions.
sponsorNoFilter by sponsor name or OCD person ID.
subjectNoFilter to bills tagged with one or more subject categories.
per_pageNoResults per page. Maximum 20. Default 10.
action_sinceNoISO 8601 date — only return bills with an action after this date (e.g., "2025-01-01").
jurisdictionNoState name, two-letter abbreviation, or OCD-ID (e.g., "Washington", "wa", or "ocd-jurisdiction/country:us/state:wa/government"). Required unless q is provided.
created_sinceNoISO 8601 date — only return bills first entered in Open States after this date (e.g., "2025-01-01"). Use to find newly-introduced bills, as opposed to recently-updated or recently-acted-on.
updated_sinceNoISO 8601 date — only return bills updated after this date (e.g., "2025-01-01").
classificationNoBill classification: "bill", "resolution", "constitutional amendment", etc.
sponsor_classificationNoFilter sponsor type: "primary", "cosponsor".

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoCurrent page returned.
errorNoPresent when the call failed. Absent on success.
noticeNoRecovery hint when results are empty — names every filter that narrowed the query and suggests how to broaden. Absent when results are returned.
maxPageNoTotal pages available.
resultsNoBills matching the search criteria.
paginationNoPagination metadata.
totalCountNoTotal bills matching the query across all pages.
appliedFiltersNoFilters applied to this query as the server received them, for agent self-verification of zero or unexpected results.

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, and idempotentHint, so the description's job is to add behavioral nuance beyond that. It adds a critical caveat about the upstream timeout for q-only searches, explains the inline include behaviors, and clarifies session discovery via a sibling tool. This is more than just echoing annotations. It does not, however, mention pagination limits or rate limits, but those are less central for a read-only search tool.

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?

The description is dense but efficient, packing essential usage rules into six short sentences. The core purpose is front-loaded, followed by the most critical usage caveat (timeout on q-only searches), then concrete recommendations for include and sort, and finally a pointer to a sibling for session IDs. No filler or repetition; every sentence adds value.

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?

For a tool with 15 parameters and a rich filter set, the description covers all the crucial contextual information: the required and recommended parameter combinations, timeout behavior, inline data inclusion, sort semantics, and how to obtain valid session identifiers. The schema already documents individual parameter formats and constraints, and the output schema presumably describes return structure, so the description addresses the higher-level usage context. Nothing essential for correct invocation 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 each parameter has a description, but the tool description significantly amplifies parameter meaning. It explains that q and jurisdiction are conditionally required, how to pair them for reliability, the purpose of include (sponsorships/actions for most research needs), the meaning of sort=latest_action_desc, and where to get session identifiers. This is invaluable guidance that goes well beyond the schema's individual parameter descriptions, directly helping an agent select and combine parameters correctly.

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 a clear verb and resource: 'Search state legislative bills across all covered US jurisdictions.' It also immediately distinguishes itself from siblings like openstates_search_committees or openstates_get_bill by emphasizing the search scope and filter dimensions (full-text, jurisdiction, session, subjects, sponsors, sort). The purpose is unambiguous.

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?

The description gives actionable guidance: it explains that jurisdiction or q is required, strongly recommends pairing them to avoid timeouts, and gives a concrete example of a timeout (q-only common term). It also recommends include=sponsorships,actions for inline data, sort=latest_action_desc for moving bills, and points to openstates_get_jurisdiction for session identifiers. However, it does not explicitly state when to use this tool over a sibling like openstates_get_bill for a known bill ID, so it's not fully explicit about alternatives.

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.