Skip to main content
Glama

Search Parliamentary Bills

bills_search_bills
Read-onlyIdempotent

USE THIS TOOL WHEN searching UK parliamentary bills by keyword, session, house, or legislative stage.

Returns a paginated page of bill summaries (title, originating and current house, current stage, whether it became an Act). AFTER calling, pass a bill_id into bills_get_bill for full detail (sponsors, long title, Royal Assent date).

Authoritative source for UK parliamentary bill status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
houseNoFilter by originating house: the House the bill was introduced in, wherever it sits now. Omit (or 'All') for all houses.
limitNoMaximum bills to return in this call. Default 20 keeps responses focused; raise up to 100 for bulk exports.
queryYesSearch term for bill titles and descriptions, e.g. 'online safety' or 'financial services'.
stageNoFilter by current legislative stage.
offsetNoNumber of results to skip before this page. Default 0 for the first page. Re-call with offset=offset+returned while has_more is true to paginate.
sessionNoNumeric parliamentary session ID (e.g. 40 = 2024-25, 39 = 2023-24). NOT a year string like '2025'. If you only know the year, omit this and filter the results instead. Omit to search all sessions.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
billsNoMatching bills. Use the integer `id` field from any bill to call bills_get_bill for full detail.
limitYesMaximum results requested in this call
queryYesThe search term that was used
totalNoTotal results matching the query across all pages, if the upstream API reported it. None if unknown.
offsetYesNumber of results skipped before this page
has_moreYesTrue if more results exist beyond this page. Re-call with offset=offset+returned to fetch the next page.
returnedYesNumber of results actually on this page

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / house / description
      Previous value: -"Filter by originating house. Omit for all houses."New value: +"Filter by originating house: the House the bill was introduced in, wherever it sits now. Omit (or 'All') for all houses."
    • changedInput schema / properties / offset / maximum
      Previous value: -2000New value: +2147483647
    • addedOutput schema / properties / bills / items / properties / originating_house
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "House where the bill was introduced (what the search `house` filter matches)"
      +}
  2. Changed8 schema fields changed
    • addedInput schema / properties / house
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "Commons",
      +        "Lords",
      +        "All"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Filter by originating house. Omit for all houses."
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 20,
      +  "description": "Maximum bills to return in this call. Default 20 keeps responses focused; raise up to 100 for bulk exports.",
      +  "maximum": 100,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "Number of results to skip before this page. Default 0 for the first page. Re-call with offset=offset+returned while has_more is true to paginate.",
      +  "maximum": 2000,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • removedInput schema / properties / params
      Removed value: -{
      -  "additionalProperties": false,
      -  "description": "BillSearchInput.",
      -  "properties": {
      -    "house": {
      -      "anyOf": [
      -        {
      -          "enum": [
      -            "Commons",
      -            "Lords",
      -            "All"
      -          ],
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null,
      -      "description": "Filter by originating house. Omit for all houses."
      -    },
      -    "limit": {
      -      "default": 20,
      -      "description": "Maximum bills to return in this call. Default 20 keeps responses focused; raise up to 100 for bulk exports.",
      -      "maximum": 100,
      -      "minimum": 1,
      -      "type": "integer"
      -    },
      -    "offset": {
      -      "default": 0,
      -      "description": "Number of results to skip before this page. Default 0 for the first page. Re-call with offset=offset+returned while has_more is true to paginate.",
      -      "maximum": 2000,
      -      "minimum": 0,
      -      "type": "integer"
      -    },
      -    "query": {
      -      "description": "Search term for bill titles and descriptions, e.g. 'online safety' or 'financial services'.",
      -      "maxLength": 500,
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "session": {
      -      "anyOf": [
      -        {
      -          "minimum": 1,
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null,
      -      "description": "Numeric parliamentary session ID (e.g. 40 = 2024-25, 39 = 2023-24). NOT a year string like '2025'. If you only know the year, omit this and filter the results instead. Omit to search all sessions."
      -    },
      -    "stage": {
      -      "anyOf": [
      -        {
      -          "enum": [
      -            "firstreading",
      -            "secondreading",
      -            "committee",
      -            "report",
      -            "thirdreading",
      -            "royalassent"
      -          ],
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null,
      -      "description": "Filter by current legislative stage."
      -    }
      -  },
      -  "required": [
      -    "query"
      -  ],
      -  "type": "object"
      -}
    • addedInput schema / properties / query
      Added value: +{
      +  "description": "Search term for bill titles and descriptions, e.g. 'online safety' or 'financial services'.",
      +  "maxLength": 500,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / session
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Numeric parliamentary session ID (e.g. 40 = 2024-25, 39 = 2023-24). NOT a year string like '2025'. If you only know the year, omit this and filter the results instead. Omit to search all sessions."
      +}
    • addedInput schema / properties / stage
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "firstreading",
      +        "secondreading",
      +        "committee",
      +        "report",
      +        "thirdreading",
      +        "royalassent"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Filter by current legislative stage."
      +}
    • changedInput schema / required
      Previous value: -[
      -  "params"
      -]New value: +[
      +  "query"
      +]
  3. Changed1 schema field changed
    • changedInput schema / properties / params / properties / session / description
      Previous value: -"Parliamentary session ID. Omit to search all sessions. Session numbers change each year (e.g. 40 = 2024-25, 39 = 2023-24)."New value: +"Numeric parliamentary session ID (e.g. 40 = 2024-25, 39 = 2023-24). NOT a year string like '2025'. If you only know the year, omit this and filter the results instead. Omit to search all sessions."
  4. Changed1 schema field changed
    • changedInput schema / properties / params / description
      Previous value: -"BillSearchInput with query, optional session/house/stage filters, pagination."New value: +"BillSearchInput."
  5. Changed1 schema field changed
    • addedInput schema / properties / params / description
      Added value: +"BillSearchInput with query, optional session/house/stage filters, pagination."
  6. Changed13 schema fields changed
    • addedInput schema / properties / params / properties / limit
      Added value: +{
      +  "default": 20,
      +  "description": "Maximum bills to return in this call. Default 20 keeps responses focused; raise up to 100 for bulk exports.",
      +  "maximum": 100,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / params / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "Number of results to skip before this page. Default 0 for the first page. Re-call with offset=offset+returned while has_more is true to paginate.",
      +  "maximum": 2000,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedOutput schema / description
      Previous value: -"Generic wrapper for non-object return types."New value: +"One page of bill search results.\n\nWraps matching BillSummary records with search metadata so the LLM\nclient sees a real nested object on the wire, and can page through\nlarge result sets."
    • addedOutput schema / properties / bills
      Added value: +{
      +  "description": "Matching bills. Use the integer `id` field from any bill to call bills_get_bill for full detail.",
      +  "items": {
      +    "properties": {
      +      "current_house": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "House where the bill currently sits"
      +      },
      +      "current_stage": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Current legislative stage"
      +      },
      +      "id": {
      +        "description": "Bill ID",
      +        "type": "integer"
      +      },
      +      "is_act": {
      +        "default": false,
      +        "description": "Whether the bill has received Royal Assent",
      +        "type": "boolean"
      +      },
      +      "long_title": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Full long title"
      +      },
      +      "short_title": {
      +        "description": "Short title of the bill",
      +        "type": "string"
      +      },
      +      "url": {
      +        "description": "Parliament URL for this bill",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "short_title",
      +      "url"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / has_more
      Added value: +{
      +  "description": "True if more results exist beyond this page. Re-call with offset=offset+returned to fetch the next page.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / limit
      Added value: +{
      +  "description": "Maximum results requested in this call",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / offset
      Added value: +{
      +  "description": "Number of results skipped before this page",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / query
      Added value: +{
      +  "description": "The search term that was used",
      +  "type": "string"
      +}
    • removedOutput schema / properties / result
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / returned
      Added value: +{
      +  "description": "Number of results actually on this page",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / total
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Total results matching the query across all pages, if the upstream API reported it. None if unknown."
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "result"
      -]New value: +[
      +  "query",
      +  "offset",
      +  "limit",
      +  "returned",
      +  "has_more"
      +]
    • removedOutput schema / x-fastmcp-wrap-result
      Removed value: -true
  7. First observed

TDQS

A4.5/5.0
Behavior4/5

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

The description adds value beyond the readOnlyHint annotation by detailing the return structure (paginated page of bill summaries with title, houses, stage, Act status) and mentioning pagination implicitly. It also notes the workflow to bills_get_bill. However, it does not disclose potential rate limits or error conditions, though these are minor for a read-only search. The description is consistent with annotations.

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 concise and well-structured: it leads with the usage trigger, then the return summary, then the follow-up workflow, and ends with a credibility statement. Every sentence serves a purpose with no fluff, and the most important usage guidance is front-loaded.

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?

The description covers the essential usage context: when to use, what it returns, and how to follow up. It mentions pagination and the fields returned, which aligns with the output schema. The guidance to use bills_get_bill for detail completes the workflow. For a search tool with a rich schema and output schema, this is comprehensive.

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%, so all parameters are already well-documented in the input schema. The description mentions search dimensions (keyword, session, house, stage) which map to parameters, but it does not add further semantic depth beyond what the schema provides. It appropriately relies on the schema's detailed parameter descriptions.

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 explicitly states the tool's function: searching UK parliamentary bills by keyword, session, house, or legislative stage. It clearly distinguishes itself from the sibling bills_get_bill, which provides full detail, by noting it returns summaries. The purpose is unambiguous and differentiated.

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?

The description begins with 'USE THIS TOOL WHEN searching...' which is an explicit usage instruction. It also directs the agent to bills_get_bill after calling for full detail, clearly defining when to use this tool versus its sibling. The statement 'Authoritative source for UK parliamentary bill status' further reinforces its intended role.

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.