Skip to main content
Glama

canada-parliament-mcp-server

Canparl Search Votes

canparl_search_votes
Read-onlyIdempotent

Find recorded House divisions in one session by bill, result, document type, date, or subject. Return newest first and pass session plus number to canparl_get_vote. Omitted session resolves from the current official bill feed. 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_votes"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum 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.
dateToNoInclusive Ottawa civil date YYYY-MM-DD; independently optional.
offsetNoZero-based offset in the selected ordering.
resultNoOfficial result from vote_results; Passed and Failed are accepted aliases.
sessionNoParliamentary session; omitted means current.
billCodeNoExact bill code, including a split-bill suffix letter such as C-15A; accepts bill s321, S321, S 321, or S-321.
dateFromNoInclusive Ottawa civil date YYYY-MM-DD; independently optional.
documentTypeNoOfficial category from canparl_list_reference topic vote_document_types.
subjectContainsNoLiteral subject substring; matching ignores case, accents, dash and quote styles, and repeated whitespace.

Output Schema

NameRequiredDescriptionDefault
capNoEffective page limit after the per-call cap.
errorNoPresent when the call failed. Absent on success.
shownNoReturned division count.
totalNoExact matching count before pagination.
noticeNoLimit clamp, empty-result, past-end, or response-budget guidance.
sessionNoResolved official session.
divisionsNoMatching divisions, date-time descending then number descending.
truncatedNoWhether more matches remain.
paginationNoContinuation within the filtered ordering.
provenanceNoSource retrieval metadata.
totalCountNoExact matching count.
appliedFiltersNoNormalized AND filters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 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*)?$"
    • addedInput schema / properties / dateFrom / pattern
      Added value: +"^\\s*(?:[0-9]{4}-[0-9]{2}-[0-9]{2}\\s*)?$"
    • addedInput schema / properties / dateTo / pattern
      Added value: +"^\\s*(?:[0-9]{4}-[0-9]{2}-[0-9]{2}\\s*)?$"
    • 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 / subjectContains / description
      Previous value: -"Literal Unicode-normalized case-insensitive subject substring."New value: +"Literal subject substring; matching ignores case, accents, dash and quote styles, and repeated whitespace."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `unsupported_vote_session`: Session malformed or absent from the official division picker. `invalid_vote_filter`: Bill code, result, or document category is unrecognized. `invalid_date_range`: A date is invalid or the bounds are reversed. `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: `unsupported_vote_session`: Session with a zero or out-of-range number, or absent from the official division picker. `invalid_vote_filter`: Result or document category is unrecognized. `invalid_date_range`: A date names no calendar day, or the bounds are reversed. `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.3/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, openWorld). The description adds genuinely non-structured behavior: newest-first ordering, that an omitted session resolves from the official bill feed, and that pagination must replay identical filters. It omits the response-size/early-page-termination behavior, though the schema's limit description covers that.

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 sentences, each earning its place: scope first, routing second, pagination last. No filler and no repetition of schema detail.

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?

Output schema exists, so return shape need not be described. Ordering, defaulting, and pagination continuation are all covered, which is everything an agent needs to call this search tool correctly and chain into canparl_get_vote.

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 filter syntax, formats, and aliases are already documented. The description only restates that session is optional and defaults to current, adding marginal meaning beyond the schema. Baseline 3 is appropriate when the schema carries the load.

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 and resource ('Find recorded House divisions') plus the exact filter dimensions (bill, result, document type, date, subject), which separates it cleanly from canparl_get_vote (single lookup) and canparl_search_speeches.

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?

Gives explicit next-step routing: 'pass session plus number to canparl_get_vote' and 'Follow nextOffset with identical filters.' The session-default rule is also stated. It stops short of naming when-not-to-use conditions, but the search-then-fetch path is unambiguous.

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.