Skip to main content
Glama

canada-parliament-mcp-server

Canparl Search Bills

canparl_search_bills
Read-onlyIdempotent

Find House and Senate bills in one session by title, number, type, chamber, status, or indexed MP sponsor. Sponsor results are the OpenParliament-indexed subset; fetch a bill for its sponsor, stages, divisions, and statute citation. Omitted session means the verified current official session. Follow nextOffset with identical filters.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "canparl_search_bills"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum rows, default 10, effective cap 100; values through 10000 are accepted and clamp with a notice. Whole records may end the page early at the 24000-byte response budget; follow nextOffset.
offsetNoZero-based offset in the selected ordering.
statusNoOfficial bill status from canparl_list_reference topic bill_statuses.
sessionNoParliamentary session; omitted means current.
sponsorNoMP OpenParliament slug or politician path/HTTPS URL (member.slug from canparl_get_member, or an includeFormer canparl_search_members row), or a current MP's official personId; Senators are not indexed. A digit-only value equal to a current personId, or its /politicians/<digits>/ path or profile URL, is read as that personId.
billCodeNoExact bill code, including a split-bill suffix letter such as C-15A; accepts bill s321, S321, S 321, or S-321.
billTypeNoOfficial bill type from canparl_list_reference topic bill_types.
titleContainsNoLiteral substring of any English or French long or short title; matching ignores case, accents, dash and quote styles, and repeated whitespace.
originatingChamberNoHouse, House of Commons, or Senate; case-insensitive.

Output Schema

NameRequiredDescriptionDefault
capNoEffective page limit after the per-call cap.
billsNoMatching official bills ordered by chamber prefix, number, then split-bill suffix letter.
errorNoPresent when the call failed. Absent on success.
shownNoNumber of bills in this page.
totalNoExact matching count after all filters and before pagination.
noticeNoLimit clamp, coverage, empty-result, past-end, or response-budget guidance.
sessionNoVerified official parliament-session token.
truncatedNoWhether more matching bills remain after this page.
paginationNoLocal continuation in the filtered ordering, including a response-budget stop.
provenanceNoOriginal retrieval metadata from all source requests.
totalCountNoExact matching count before slicing.
appliedFiltersNoNormalized filters applied together with AND.
sponsorCoverageNoWhether the result is restricted to the third-party sponsor index.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / properties / billCode / pattern
      Added value: +"^\\s*(?:(?:[Bb][Ii][Ll][Ll]\\s+)?[CcSs][-\\u0020\\u00A0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000\\u2010-\\u2015\\u2212]?[1-9][0-9]*[A-Za-z]?\\s*)?$"
    • changedInput schema / properties / limit / default
      Previous value: -25New value: +10
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum rows, default 25, effective cap 100; values through 10000 are accepted and clamp with a notice. Whole records may end the page early at the 24000-byte response budget; follow nextOffset."New value: +"Maximum rows, default 10, effective cap 100; values through 10000 are accepted and clamp with a notice. Whole records may end the page early at the 24000-byte response budget; follow nextOffset."
    • changedInput schema / properties / session / anyOf
      Previous value: -[
      -  {
      -    "description": "Parliament-session token, such as 45-1.",
      -    "pattern": "^\\d+-\\d+$",
      -    "type": "string"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "description": "Parliament and session numbers.",
      -    "properties": {
      -      "parliament": {
      -        "description": "Positive parliament number.",
      -        "exclusiveMinimum": 0,
      -        "maximum": 9007199254740991,
      -        "type": "integer"
      -      },
      -      "session": {
      -        "description": "Positive session number.",
      -        "exclusiveMinimum": 0,
      -        "maximum": 9007199254740991,
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "parliament",
      -      "session"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "description": "Parliament-session token, such as 45-1.",
      +    "pattern": "^\\s*(?:[0-9]+-[0-9]+\\s*)?$",
      +    "type": "string"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "description": "Parliament and session numbers.",
      +    "properties": {
      +      "parliament": {
      +        "description": "Positive parliament number.",
      +        "exclusiveMinimum": 0,
      +        "maximum": 9007199254740991,
      +        "type": "integer"
      +      },
      +      "session": {
      +        "description": "Positive session number.",
      +        "exclusiveMinimum": 0,
      +        "maximum": 9007199254740991,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "parliament",
      +      "session"
      +    ],
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / titleContains / description
      Previous value: -"Literal case-insensitive substring of any English or French long or short title."New value: +"Literal substring of any English or French long or short title; matching ignores case, accents, dash and quote styles, and repeated whitespace."
    • changedOutput schema / properties / bills / items / properties / royalAssentDate / description
      Previous value: -"Royal assent as a UTC instant ending in Z (YYYY-MM-DDTHH:MM:SS[.fraction]Z), or null; a value in another shape is relayed as published."New value: +"Royal assent as a UTC instant ending in Z (YYYY-MM-DDTHH:MM:SS[.fraction]Z), converted from LEGISinfo's Ottawa-time clock, or null; the time of day is LEGISinfo's recorded time, which can differ from when assent was signified. A value in another shape is relayed as published."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `unknown_session`: Session malformed or absent from the official bill session index. `invalid_bill_filter`: Malformed bill code, chamber, or sponsor slug, or unrecognized type or status. `sponsor_not_found`: Sponsor slug has no profile of its own, or a current personId has no unique verified OpenParliament profile. `sponsor_scan_incomplete`: The bounded ten-page sponsor scan still has a continuation. `upstream_blocked`: An official parliamentary source refuses the request with HTTP 403. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `unknown_session`: Session with a zero or out-of-range number, or absent from the official bill session index. `invalid_bill_filter`: Unrecognized chamber, type, or status, or a malformed sponsor slug. `sponsor_not_found`: Sponsor slug has no profile of its own, or a current personId has no unique verified OpenParliament profile. `sponsor_scan_incomplete`: The bounded ten-page sponsor scan still has a continuation. `upstream_blocked`: An official parliamentary source refuses the request with HTTP 403. Other values are possible when a failure originates below the handler."
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent and open-world behavior, so the description need not restate safety. It adds genuinely non-obvious traits: sponsor filtering only covers the OpenParliament-indexed subset, an omitted session resolves to the current official session, and pagination must continue with identical filters. It stops short of describing ordering or the response-budget truncation (that detail lives only in the limit schema).

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?

Three dense sentences, front-loaded with purpose, then caveats, then pagination guidance. Every clause carries a distinct instruction and none repeats structured data verbatim.

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 nine parameters and an output schema, the description covers what matters: scope, filter surface, indexing limitation, session default, pagination continuation rule, and the handoff to the single-bill tool. Nothing an agent needs to invoke it correctly is missing.

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 the schema already documents every parameter's format, patterns and defaults. The description adds only marginal semantics beyond that (session defaulting to current, which fields are filterable), leaving the token/path formats, split-bill suffix handling and status/type reference topics to the schema. 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 (search) and resource (House and Senate bills in one session), then enumerates exactly which attributes can be searched (title, number, type, chamber, status, sponsor). It also draws the boundary against canparl_get_bill by naming what that tool returns instead (sponsor, stages, divisions, statute citation).

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?

Explicitly routes the agent: use this tool for filtered lookup, switch to fetching a single bill when the sponsor, stages, divisions or statute citation is needed. It also flags the sponsor-index limitation and the default session behavior, so the agent knows what assumptions are safe.

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.