Skip to main content
Glama

canada-parliament-mcp-server

Canparl Search Speeches

canparl_search_speeches
Read-onlyIdempotent

Find indexed House Hansard speeches by speaker, bill debated or mentioned, or date. contains scans at most 100 candidate speeches per call; follow nextOffset without changing filters until exhausted before drawing a negative conclusion.

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_speeches"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum returned matches, 1–10 per call; larger values up to 10000 clamp to 10 with a notice. A page ends early at the 24000-byte response budget, returning at least one match whole. Candidate pages contain 20 rows.
dateToNoInclusive Ottawa civil date upper bound, YYYY-MM-DD; independently optional.
offsetNoRaw candidate offset; keep every filter identical when continuing.
containsNoLocal literal substring of the selected language's plain text; matching ignores case, accents, dash and quote styles, and repeated whitespace. A speech without text in that language never matches. Cannot be the only scope.
dateFromNoInclusive Ottawa civil date lower bound, YYYY-MM-DD; independently optional.
languageNoHansard language of speaker, h1, h2, and content, and of the text contains scans: en (default) or fr. A field without text in that language is null, never filled from the other; older records carry no French. party and riding stay English. Keep identical when continuing.en
politicianNoSpeaker OpenParliament slug or exact politician path/HTTPS URL (member.slug from canparl_get_member, or an includeFormer canparl_search_members row), or a current MP's official personId. A digit-only value equal to a current personId, or its /politicians/<digits>/ path or profile URL, is read as that personId.
billDebatedNoBill debated; combined with all other scopes using AND.
mentionedBillNoBill mentioned; combined with all other scopes using AND.
substantiveOnlyNoExclude procedural remarks when true; false includes substantive and procedural remarks.

Output Schema

NameRequiredDescriptionDefault
capNoEffective maximum returned matches after the per-call cap.
errorNoPresent when the call failed. Absent on success.
shownNoNumber of returned matching speeches.
noticeNoLimit clamp, coverage, continuation, procedural-filter, candidates without selected-language text, unavailable affiliation, and response-budget guidance.
scannedNoRaw candidates visited, including excluded committee records; at most 100. A response-budget stop ends it before the first match not returned.
speechesNoMatching House speeches in source order with complete prose in the selected language.
exhaustedNoTrue only after visiting every row of a source-terminal page.
truncatedNoWhether raw candidates remain to be scanned; not an exact count of further matches.
nextOffsetNoFirst unvisited raw candidate offset, or null when exhausted; after a response-budget stop, the first match not returned.
provenanceNoOriginal retrieval metadata for scope validation, candidate pages fetched before the page ended, and memberships of returned speeches.
appliedFiltersNoAll normalized filters applied with AND; bill relationships rely on the source endpoint.
excludedCommitteesNoVisited candidates excluded because they were not House debate documents.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed20 schema fields changed
    • addedInput schema / properties / billDebated / properties / code / 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 / billDebated / 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"
      +  }
      +]
    • addedInput schema / properties / billDebated / required
      Added value: +[
      +  "session",
      +  "code"
      +]
    • changedInput schema / properties / contains / description
      Previous value: -"Local case-insensitive Unicode-normalized literal English text substring; cannot be the only scope."New value: +"Local literal substring of the selected language's plain text; matching ignores case, accents, dash and quote styles, and repeated whitespace. A speech without text in that language never matches. Cannot be the only scope."
    • 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*)?$"
    • addedInput schema / properties / language
      Added value: +{
      +  "default": "en",
      +  "description": "Hansard language of speaker, h1, h2, and content, and of the text contains scans: en (default) or fr. A field without text in that language is null, never filled from the other; older records carry no French. party and riding stay English. Keep identical when continuing.",
      +  "enum": [
      +    "en",
      +    "fr"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / mentionedBill / properties / code / 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 / mentionedBill / 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"
      +  }
      +]
    • addedInput schema / properties / mentionedBill / required
      Added value: +[
      +  "session",
      +  "code"
      +]
    • changedOutput schema / properties / appliedFilters / properties / contains / description
      Previous value: -"Trimmed local literal English text filter, or null."New value: +"Trimmed local literal text filter applied to the selected language, or null."
    • addedOutput schema / properties / appliedFilters / properties / language
      Added value: +{
      +  "description": "Selected Hansard language of the returned text and of the contains scan.",
      +  "enum": [
      +    "en",
      +    "fr"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / appliedFilters / required
      Previous value: -[
      -  "politician",
      -  "politicianName",
      -  "billDebated",
      -  "mentionedBill",
      -  "dateFrom",
      -  "dateTo",
      -  "substantiveOnly",
      -  "contains",
      -  "offset"
      -]New value: +[
      +  "politician",
      +  "politicianName",
      +  "billDebated",
      +  "mentionedBill",
      +  "dateFrom",
      +  "dateTo",
      +  "substantiveOnly",
      +  "contains",
      +  "language",
      +  "offset"
      +]
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `speech_scope_required`: No speaker, bill, or date bound is supplied. `invalid_speech_filter`: A slug, bill, or date is malformed, incomplete, or has reversed bounds. `speech_entity_not_found`: A supplied speaker or bill is absent from OpenParliament, or a current personId has no unique verified profile. `upstream_filter_not_honored`: A returned candidate violates an applied speaker, time, or procedural filter. `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: `speech_scope_required`: No speaker, bill, or date bound is supplied. `invalid_speech_filter`: A malformed slug, a bill session with a zero or out-of-range number, a date naming no calendar day, reversed date bounds, or dateTo 9999-12-31. `speech_entity_not_found`: A supplied speaker or bill is absent from OpenParliament, or a current personId has no unique verified profile. `upstream_filter_not_honored`: A returned candidate violates an applied speaker, time, or procedural filter. `upstream_blocked`: An official parliamentary source refuses the request with HTTP 403. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / notice / description
      Previous value: -"Limit clamp, coverage, continuation, procedural-filter, unavailable affiliation, and response-budget guidance."New value: +"Limit clamp, coverage, continuation, procedural-filter, candidates without selected-language text, unavailable affiliation, and response-budget guidance."
    • changedOutput schema / properties / speeches / description
      Previous value: -"Matching House speeches in source order with complete English prose."New value: +"Matching House speeches in source order with complete prose in the selected language."
    • changedOutput schema / properties / speeches / items / properties / content / description
      Previous value: -"Complete English plain text, or null when unavailable."New value: +"Complete plain text in the selected language, or null when that language has none; never filled from the other language."
    • changedOutput schema / properties / speeches / items / properties / h1 / description
      Previous value: -"English primary heading, or null."New value: +"Primary heading in the selected language, or null when absent or blank."
    • changedOutput schema / properties / speeches / items / properties / h2 / description
      Previous value: -"English secondary heading, or null."New value: +"Secondary heading in the selected language, or null when absent or blank."
    • changedOutput schema / properties / speeches / items / properties / speaker / description
      Previous value: -"English source attribution, or null."New value: +"Source attribution in the selected language, or null when absent or blank."
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, openWorld), and the description adds genuine non-annotated behavior: bounded candidate scanning per call and a warning against premature negative conclusions. It loses a point for a numeric inconsistency — "at most 100 candidate speeches per call" conflicts with the schema's "1–10 per call" and "candidate pages contain 20 rows" — which could mislead an agent about how much of the corpus a single call covers.

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?

Two front-loaded sentences with no filler; the scope statement comes first and the pagination caveat second. Minor deduction because the second sentence opens with a lowercase "contains", which reads like a parameter name and blurs whether it is a filter, a server behavior, or a limit.

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?

An output schema exists and annotations cover the safety profile, so the description needn't explain return values. For a 10-parameter search tool it supplies the two things structured data can't: that filters AND together implicitly via scope selection, and the pagination protocol required for a trustworthy negative answer.

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% and the parameter docs are unusually rich (limit clamping, offset continuation, language nulls, bill code patterns), so the schema carries the burden. The description only maps the scope axes loosely and never mentions contains, language, or substantiveOnly, adding little beyond structured data — baseline 3.

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 indexed House Hansard speeches") and enumerates the three scope axes (speaker, bill debated/mentioned, date). The resource is unambiguously distinct from siblings like canparl_search_bills, canparl_search_members and canparl_search_votes, so an agent can route correctly without opening the schema.

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 operational guidance: paginate with nextOffset and do not change filters mid-pagination, and don't conclude "no results" until exhausted. It stops short of naming when to prefer a sibling (e.g. searching bills directly vs. speeches that mention a bill), so it is clear context without explicit alternatives.

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.