Skip to main content
Glama

Search Bills

search_bills
Read-onlyIdempotent

ANSWERS "what bills about X has Congress introduced" / "recent congressional bills on X" / "federal legislation about X" / "find the Act" — searches US FEDERAL congressional bills (US House & Senate, national laws) BY BILL NAME, SUBJECT OR KEYWORD, including recently introduced ones. Full-text search is via GovInfo (the GPO's index of the same bill documents congress.gov itself searches — congress.gov's own /bill endpoint has no keyword query at all), then RE-RANKED locally by how well each bill's title matches the query — exact title first, then a title containing the phrase, then all query words, then partial overlap — so the first result is the best title match and each bill carries its match tier. Pass congress to restrict to one Congress (filtered locally against the search results — may miss a match if it falls outside GovInfo's own top results for that query). Prefer this over a date-sorted recent-bills listing whenever the question names a topic or a bill. Returns bill type, number, title, status, sponsor, and introduction date (via congress.gov). Use get_bill with congress + bill_type + number for full details. Requires an API key (see get_bill). NOTE: this is the US Congress (federal) ONLY — for STATE legislature bills (e.g. California, Texas, New York, or any US state legislation) use legiscan or openstates instead, not this tool.

Input Schema

NameRequiredDescriptionDefault
limitNoNumber of results to return (default: 10, max: 100)
queryYesBill name, keywords or subject to match against bill titles, e.g. "Lower Energy Costs Act" or "crypto"
congressNoOptional Congress number (e.g. 111) to restrict results to, filtered locally against the search results.

Output Schema

NameRequiredDescriptionDefault
billsYes
queryYesSearch query used
totalYesGovTrack loose keyword-match count for the query (any query word may match any bill title); see total_note
rankingYesHow the bills are ordered: local title-match re-rank (exact > phrase > all_words > partial, newer Congress first on ties); GovTrack order is not by relevance
returnedYesNumber of bills returned
total_noteYesExplains that total is a loose keyword-match count, not the number of bills about the subject
candidates_rankedYesNumber of distinct upstream candidate bills that were scored and ranked
congresses_searchedYesWhich Congresses were searched and how deeply: {in_depth, one_page, plus, hint} by default, or {exhaustive, coverage} when a congress argument was given

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / congress / description
      Previous value: -"Optional Congress number (e.g. 111) to search exhaustively. Without it the three most recent Congresses are searched in depth and every earlier one only shallowly, so name a Congress when the bill is older than about six years."New value: +"Optional Congress number (e.g. 111) to restrict results to, filtered locally against the search results."
  2. Changed12 schema fields changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "query": "climate change"
      -  },
      -  {
      -    "limit": 25,
      -    "query": "healthcare reform"
      -  }
      -]New value: +[
      +  {
      +    "limit": 10,
      +    "query": "Lower Energy Costs Act"
      +  },
      +  {
      +    "limit": 5,
      +    "query": "crypto"
      +  },
      +  {
      +    "congress": 111,
      +    "limit": 5,
      +    "query": "Patient Protection and Affordable Care Act"
      +  }
      +]
    • addedInput schema / properties / congress
      Added value: +{
      +  "description": "Optional Congress number (e.g. 111) to search exhaustively. Without it the three most recent Congresses are searched in depth and every earlier one only shallowly, so name a Congress when the bill is older than about six years.",
      +  "type": "number"
      +}
    • changedInput schema / properties / query / description
      Previous value: -"Keywords to search for in bill titles"New value: +"Bill name, keywords or subject to match against bill titles, e.g. \"Lower Energy Costs Act\" or \"crypto\""
    • addedOutput schema / properties / bills / items / properties / match
      Added value: +{
      +  "description": "How well the bill's titles match the query: exact title, title containing the phrase, all query words present, some words present, or no title-word overlap",
      +  "enum": [
      +    "exact",
      +    "phrase",
      +    "all_words",
      +    "partial",
      +    "none"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / bills / items / properties / matched_title
      Added value: +{
      +  "description": "The bill title (display, short or official) that produced the match tier, or null",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / bills / items / required
      Previous value: -[
      -  "id"
      -]New value: +[
      +  "id",
      +  "match",
      +  "matched_title"
      +]
    • addedOutput schema / properties / candidates_ranked
      Added value: +{
      +  "description": "Number of distinct upstream candidate bills that were scored and ranked",
      +  "type": "number"
      +}
    • addedOutput schema / properties / congresses_searched
      Added value: +{
      +  "description": "Which Congresses were searched and how deeply: {in_depth, one_page, plus, hint} by default, or {exhaustive, coverage} when a congress argument was given",
      +  "type": "object"
      +}
    • addedOutput schema / properties / ranking
      Added value: +{
      +  "description": "How the bills are ordered: local title-match re-rank (exact > phrase > all_words > partial, newer Congress first on ties); GovTrack order is not by relevance",
      +  "type": "string"
      +}
    • changedOutput schema / properties / total / description
      Previous value: -"Total matching bills available"New value: +"GovTrack loose keyword-match count for the query (any query word may match any bill title); see total_note"
    • addedOutput schema / properties / total_note
      Added value: +{
      +  "description": "Explains that total is a loose keyword-match count, not the number of bills about the subject",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "query",
      -  "total",
      -  "returned",
      -  "bills"
      -]New value: +[
      +  "query",
      +  "total",
      +  "returned",
      +  "bills",
      +  "total_note",
      +  "ranking",
      +  "candidates_ranked",
      +  "congresses_searched"
      +]
  3. Changed2 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "query": "climate change"
      +  },
      +  {
      +    "limit": 25,
      +    "query": "healthcare reform"
      +  }
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "bills": {
      +      "items": {
      +        "properties": {
      +          "bill_type": {
      +            "description": "Bill type code",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "bill_type_label": {
      +            "description": "Bill type label",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "congress": {
      +            "description": "Congress number",
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "id": {
      +            "description": "Bill ID",
      +            "type": "number"
      +          },
      +          "introduced_date": {
      +            "description": "Bill introduction date",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "link": {
      +            "description": "GovTrack bill URL",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "number": {
      +            "description": "Bill number",
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "sponsor_name": {
      +            "description": "Primary sponsor name",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "status": {
      +            "description": "Current status code",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "status_date": {
      +            "description": "Date of current status",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "status_label": {
      +            "description": "Current status label",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "title": {
      +            "description": "Full bill title",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "title_without_number": {
      +            "description": "Bill title without number prefix",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "id"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "query": {
      +      "description": "Search query used",
      +      "type": "string"
      +    },
      +    "returned": {
      +      "description": "Number of bills returned",
      +      "type": "number"
      +    },
      +    "total": {
      +      "description": "Total matching bills available",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "query",
      +    "total",
      +    "returned",
      +    "bills"
      +  ],
      +  "type": "object"
      +}
  4. Changed2 schema fields changed
    • removedInput schema / examples
      Removed value: -[
      -  {
      -    "_apiKey": "your-propublica-congress-api-key",
      -    "congress": 118,
      -    "query": "climate change"
      -  },
      -  {
      -    "_apiKey": "your-propublica-congress-api-key",
      -    "query": "infrastructure"
      -  }
      -]
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "bills": {
      -      "description": "List of bills (up to 20)",
      -      "items": {
      -        "properties": {
      -          "active": {
      -            "description": "Currently active",
      -            "type": [
      -              "boolean",
      -              "null"
      -            ]
      -          },
      -          "bill_id": {
      -            "description": "Bill ID",
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          },
      -          "bill_type": {
      -            "description": "Bill type (H.R., S., etc.)",
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          },
      -          "introduced_date": {
      -            "description": "Introduction date",
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          },
      -          "latest_action": {
      -            "description": "Latest major action",
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          },
      -          "latest_action_date": {
      -            "description": "Latest major action date",
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          },
      -          "number": {
      -            "description": "Bill number",
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          },
      -          "primary_subject": {
      -            "description": "Primary subject",
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          },
      -          "sponsor_name": {
      -            "description": "Sponsor name",
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          },
      -          "sponsor_party": {
      -            "description": "Sponsor party",
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          },
      -          "sponsor_state": {
      -            "description": "Sponsor state",
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          },
      -          "summary": {
      -            "description": "Bill summary",
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          },
      -          "title": {
      -            "description": "Bill title",
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          }
      -        },
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "congress": {
      -      "description": "Congress number",
      -      "type": "number"
      -    },
      -    "count": {
      -      "description": "Number of results found",
      -      "type": "number"
      -    },
      -    "query": {
      -      "description": "Search query",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "query",
      -    "congress",
      -    "count",
      -    "bills"
      -  ],
      -  "type": "object"
      -}New value: +null
  5. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "bills": {
      +      "description": "List of bills (up to 20)",
      +      "items": {
      +        "properties": {
      +          "active": {
      +            "description": "Currently active",
      +            "type": [
      +              "boolean",
      +              "null"
      +            ]
      +          },
      +          "bill_id": {
      +            "description": "Bill ID",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "bill_type": {
      +            "description": "Bill type (H.R., S., etc.)",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "introduced_date": {
      +            "description": "Introduction date",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "latest_action": {
      +            "description": "Latest major action",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "latest_action_date": {
      +            "description": "Latest major action date",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "number": {
      +            "description": "Bill number",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "primary_subject": {
      +            "description": "Primary subject",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "sponsor_name": {
      +            "description": "Sponsor name",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "sponsor_party": {
      +            "description": "Sponsor party",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "sponsor_state": {
      +            "description": "Sponsor state",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "summary": {
      +            "description": "Bill summary",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "title": {
      +            "description": "Bill title",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "congress": {
      +      "description": "Congress number",
      +      "type": "number"
      +    },
      +    "count": {
      +      "description": "Number of results found",
      +      "type": "number"
      +    },
      +    "query": {
      +      "description": "Search query",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "query",
      +    "congress",
      +    "count",
      +    "bills"
      +  ],
      +  "type": "object"
      +}
  6. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "_apiKey": "your-propublica-congress-api-key",
      +    "congress": 118,
      +    "query": "climate change"
      +  },
      +  {
      +    "_apiKey": "your-propublica-congress-api-key",
      +    "query": "infrastructure"
      +  }
      +]
  7. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Goes well beyond the read-only annotations by disclosing the retrieval mechanics (GovInfo full-text index, local re-ranking by title match tier) and a real caveat that the `congress` filter is applied locally and may miss matches outside GovInfo's top results. The API-key requirement is noted, though only by reference to get_bill rather than stated outright.

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?

Front-loaded with concrete answerable questions and the core scope statement, which is the right ordering. It is dense and long for a search tool, but nearly every clause carries a non-obvious constraint (re-ranking order, filter caveat, state-bill exclusion).

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?

With an output schema present, the description still usefully summarizes the payload (bill type, number, title, status, sponsor, introduction date) and covers auth, scope limits, and the follow-up path. An agent has everything needed to call this correctly and interpret results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds genuine meaning: `congress` is applied post-hoc against search results with a recall risk, and `query` matches titles/subjects/keywords rather than arbitrary body text. That nuance is not recoverable from the schema alone.

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+resource (search US federal congressional bills by name, subject, or keyword) and enumerates the exact user questions it answers. It also explicitly demarcates scope versus siblings — not state bills (legiscan/openstates), not date-sorted listings (get_recent_bills), not full detail (get_bill).

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

Usage Guidelines5/5

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

Gives explicit selection rules: 'Prefer this over a date-sorted recent-bills listing whenever the question names a topic or a bill,' plus hard exclusions for state legislation with named alternatives. It also routes the agent forward to get_bill once a bill is identified.

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.