Skip to main content
Glama

Search Bills

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.

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-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
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "jurisdiction": "CA",
      -    "query": "healthcare"
      -  },
      -  {
      -    "classification": "bill",
      -    "jurisdiction": "NY",
      -    "per_page": 10,
      -    "query": "education funding",
      -    "session": "20232024",
      -    "sort": "updated_desc",
      -    "sponsor": "Smith"
      -  }
      -]New value: +[
      +  {
      +    "jurisdiction": "CA",
      +    "query": "healthcare"
      +  },
      +  {
      +    "jurisdiction": "OH",
      +    "query": "noncompete",
      +    "session": "136"
      +  },
      +  {
      +    "jurisdiction": "TX",
      +    "query": "property tax relief",
      +    "session": "2025"
      +  }
      +]
    • changedInput schema / properties / session / description
      Previous value: -"Session identifier (e.g., \"20232024\")"New value: +"Optional. 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."
  3. Changed2 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "jurisdiction": "CA",
      +    "query": "healthcare"
      +  },
      +  {
      +    "classification": "bill",
      +    "jurisdiction": "NY",
      +    "per_page": 10,
      +    "query": "education funding",
      +    "session": "20232024",
      +    "sort": "updated_desc",
      +    "sponsor": "Smith"
      +  }
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "bills": {
      +      "items": {
      +        "properties": {
      +          "chamber": {
      +            "description": "Chamber (upper/lower) or organization",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "classification": {
      +            "description": "Bill type classifications",
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "identifier": {
      +            "description": "Bill identifier (e.g., AB-123)",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "jurisdiction": {
      +            "description": "State or jurisdiction name",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "latest_action": {
      +            "description": "Description of latest action",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "latest_action_date": {
      +            "description": "Date of latest action",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "openstates_id": {
      +            "description": "OpenStates bill ID",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "openstates_url": {
      +            "description": "Link to OpenStates page",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "session": {
      +            "description": "Legislative session",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "subject": {
      +            "description": "Subject tags",
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "title": {
      +            "description": "Bill title",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "page": {
      +      "description": "Current page number",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "returned": {
      +      "description": "Number of bills in this response",
      +      "type": "number"
      +    },
      +    "total": {
      +      "description": "Total matching bills across all pages",
      +      "type": "number"
      +    },
      +    "total_pages": {
      +      "description": "Total number of pages",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "total",
      +    "page",
      +    "total_pages",
      +    "returned",
      +    "bills"
      +  ],
      +  "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=true, idempotentHint=true, and openWorldHint=true, so the safety profile is covered. The description adds the return-field inventory (identifiers, titles, classifications, last action, sponsors, OpenStates IDs), which is genuine extra context, but does not address the pagination clamping behavior that the schema documents.

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?

Three tight sentences, front-loaded with the core action and scope before the input-format note and return description. Little waste, though the return-field enumeration borders on redundant given a declared 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 a full output schema and 100% parameter coverage, the description's remaining job is scope and routing, which it mostly handles. The lack of explicit guidance about choosing search_bills over search_legislators or other search siblings is the main gap.

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 jurisdiction-format sentence ('2-letter state code or full name') restates what the schema already documents, adding no new syntax or constraint detail beyond it.

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+resource ('Search bills') and an unusually clear scope ('any US statehouse'), immediately telling the agent this is a cross-jurisdiction search rather than a detail lookup. It also names the downstream sibling get_bill, which distinguishes it from detail-fetching tools, though it does not differentiate itself from search_legislators.

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 reference to 'OpenStates IDs for use with get_bill' implies the find-then-fetch workflow, and the jurisdiction format note guides input. However, there is no explicit when-to-use vs when-not guidance and no named alternative among the many sibling search tools; usage must be inferred.

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.