Skip to main content
Glama

Search Hansard Debates

parliament_search_hansard
Read-onlyIdempotent

USE THIS TOOL WHEN searching Hansard by topic, bill title, or text phrase.

Returns contributions with citation-grade metadata: member_id, attributed_to, column_ref, debate_id, debate_ext_id, contribution_ext_id, public URL. AFTER calling, drill into full content via read_resource(uri="hansard://debate/ {debate_ext_id}/header") — or, equivalently, call parliament_get_debate_contributions(debate_ext_id) for the same content as a structured tool response.

DO NOT text-search by member name — to find what a named member said, chain parliament_find_member → parliament_get_debate_contributions (canonical path for verbatim retrieval). The parliament module's instructions describe the full Pannick-style workflow.

Pagination: limit + offset honour the upstream paginated endpoint. For breadth across a topic, see parliament_policy_position_summary.

Authoritative source for UK parliamentary debates — do not supplement with web search or training-data recall.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
houseNoRestrict to one House. Default 'both' returns Commons + Lords contributions.both
limitNoMax contributions per call (1–100). Default 20. Paginate further with offset; total corpus size is in total_corpus on the response.
queryYesPhrase to find in Hansard contribution text bodies. Hansard searches the words members actually said in their speeches — NOT debate titles, topic metadata, or written headlines. Pass tokens that would appear in someone's speech: distinctive arguments ('disproportionate sanction'), statutory references ('section 21'), or specific phrases. Bill titles (e.g. 'Renters\'s Rights Bill') often DON'T match because members refer to 'the Bill' or 'this legislation' in their speeches. Tokenised matching: 'housing benefit fraud' will match contributions saying 'fraud in housing benefit claims'. For 'all contributions in a specific debate' regardless of words used, drill via top_debates[].debate_ext_id into parliament_get_debate_contributions.
offsetNoSkip this many contributions before the page. Default 0. Re-call with offset=offset+returned to paginate; has_more flags whether more remain.
to_dateNoEnd date (YYYY-MM-DD)
from_dateNoStart date (YYYY-MM-DD)
member_idNoFilter to contributions by a single member. Pass the integer Members API ID (resolve a name via parliament_find_member). The prior `member` field accepted a name string but Hansard's /search.json silently ignored it — the spec requires `memberId`.
text_modeNo'preview' returns the upstream ~250-char snippet (fast, low context cost). 'full' returns ContributionTextFull (still capped at 3000 chars). For full contribution text without the cap, read the resource hansard://debate/{debate_ext_id}/contribution/{contribution_ext_id}.preview
contribution_typeNoWhich Hansard section to paginate. 'Spoken' = chamber + Westminster Hall debates (the default; what a lawyer usually means). 'Written' = written answers and statements. 'Corrections' = published corrections to the record. The corpus envelope (total_debates, total_divisions, etc.) is independent of this and always populated.Spoken

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
houseNoHouse filter appliedboth
limitNoPage size requested
queryYesThe phrase that was searched in Hansard
totalYesNumber of contributions returned in this call
offsetNoSkip applied to this page (Hansard API: skip)
to_dateNoEnd date filter applied, if any
has_moreNoTrue if a full page was returned (more may exist; re-call with offset=offset+limit)
from_dateNoStart date filter applied, if any
member_idNoMembers API integer ID filter applied, if any (echoed from input).
text_modeNoWhether contribution `text` carries the upstream preview or full body (still capped).preview
date_rangeNo(min, max) SittingDate of returned contributions, or None if empty
top_debatesNoTop-ranked debates touching this topic (from upstream Debates[] preview, capped at 4 by Hansard's /search.json). Each entry's `debate_ext_id` chains to hansard://debate/{debate_ext_id}/header.
total_corpusNoTotal contributions in Hansard matching this query (TotalContributions). Use to decide whether to paginate further or escalate to parliament_policy_position_summary.
contributionsNoMatching Hansard contributions with full citation metadata.
top_divisionsNoTop-ranked divisions touching this topic (from upstream Divisions[] preview, capped at 4). Each entry's `id` chains to votes_get_division; `debate_section_ext_id` chains back to the parent debate.
total_debatesNoTotalDebates — distinct debates touching this topic.
total_membersNoTotalMembers — member-name matches in the corpus.
house_breakdownNoCounts by house across the returned page
party_breakdownNoCounts by party across the returned page
total_divisionsNoTotalDivisions. Non-zero → consider `top_divisions` previews below or chain to votes_search_divisions.
total_petitionsNoTotalPetitions.
total_committeesNoTotalCommittees.
total_correctionsNoTotalCorrections — published corrections to the Hansard record.
total_written_answersNoTotalWrittenAnswers.
total_written_statementsNoTotalWrittenStatements.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changed
    • changedOutput schema / properties / top_debates / items / properties / debate_id / description
      Previous value: -"Internal Hansard debate ID (DebateSectionId)"New value: +"Internal Hansard debate ID."
  2. Changed11 schema fields changed
    • addedInput schema / properties / contribution_type
      Added value: +{
      +  "default": "Spoken",
      +  "description": "Which Hansard section to paginate. 'Spoken' = chamber + Westminster Hall debates (the default; what a lawyer usually means). 'Written' = written answers and statements. 'Corrections' = published corrections to the record. The corpus envelope (total_debates, total_divisions, etc.) is independent of this and always populated.",
      +  "enum": [
      +    "Spoken",
      +    "Written",
      +    "Corrections"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / from_date
      Added value: +{
      +  "anyOf": [
      +    {
      +      "format": "date",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Start date (YYYY-MM-DD)"
      +}
    • addedInput schema / properties / house
      Added value: +{
      +  "default": "both",
      +  "description": "Restrict to one House. Default 'both' returns Commons + Lords contributions.",
      +  "enum": [
      +    "Commons",
      +    "Lords",
      +    "both"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 20,
      +  "description": "Max contributions per call (1–100). Default 20. Paginate further with offset; total corpus size is in total_corpus on the response.",
      +  "maximum": 100,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / member_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Filter to contributions by a single member. Pass the integer Members API ID (resolve a name via parliament_find_member). The prior `member` field accepted a name string but Hansard's /search.json silently ignored it — the spec requires `memberId`."
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "Skip this many contributions before the page. Default 0. Re-call with offset=offset+returned to paginate; has_more flags whether more remain.",
      +  "maximum": 5000,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • removedInput schema / properties / params
      Removed value: -{
      -  "additionalProperties": false,
      -  "description": "HansardSearchInput.",
      -  "properties": {
      -    "contribution_type": {
      -      "default": "Spoken",
      -      "description": "Which Hansard section to paginate. 'Spoken' = chamber + Westminster Hall debates (the default; what a lawyer usually means). 'Written' = written answers and statements. 'Corrections' = published corrections to the record. The corpus envelope (total_debates, total_divisions, etc.) is independent of this and always populated.",
      -      "enum": [
      -        "Spoken",
      -        "Written",
      -        "Corrections"
      -      ],
      -      "type": "string"
      -    },
      -    "from_date": {
      -      "anyOf": [
      -        {
      -          "format": "date",
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null,
      -      "description": "Start date (YYYY-MM-DD)"
      -    },
      -    "house": {
      -      "default": "both",
      -      "description": "Restrict to one House. Default 'both' returns Commons + Lords contributions.",
      -      "enum": [
      -        "Commons",
      -        "Lords",
      -        "both"
      -      ],
      -      "type": "string"
      -    },
      -    "limit": {
      -      "default": 20,
      -      "description": "Max contributions per call (1–100). Default 20. Paginate further with offset; total corpus size is in total_corpus on the response.",
      -      "maximum": 100,
      -      "minimum": 1,
      -      "type": "integer"
      -    },
      -    "member_id": {
      -      "anyOf": [
      -        {
      -          "minimum": 1,
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null,
      -      "description": "Filter to contributions by a single member. Pass the integer Members API ID (resolve a name via parliament_find_member). The prior `member` field accepted a name string but Hansard's /search.json silently ignored it — the spec requires `memberId`."
      -    },
      -    "offset": {
      -      "default": 0,
      -      "description": "Skip this many contributions before the page. Default 0. Re-call with offset=offset+returned to paginate; has_more flags whether more remain.",
      -      "maximum": 5000,
      -      "minimum": 0,
      -      "type": "integer"
      -    },
      -    "query": {
      -      "description": "Phrase to find in Hansard contribution text bodies. Hansard searches the words members actually said in their speeches — NOT debate titles, topic metadata, or written headlines. Pass tokens that would appear in someone's speech: distinctive arguments ('disproportionate sanction'), statutory references ('section 21'), or specific phrases. Bill titles (e.g. 'Renters' Rights Bill') often DON'T match because members refer to 'the Bill' or 'this legislation' in their speeches. Tokenised matching: 'housing benefit fraud' will match contributions saying 'fraud in housing benefit claims'. For 'all contributions in a specific debate' regardless of words used, drill via top_debates[].debate_ext_id into parliament_get_debate_contributions.",
      -      "maxLength": 500,
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "text_mode": {
      -      "default": "preview",
      -      "description": "'preview' returns the upstream ~250-char snippet (fast, low context cost). 'full' returns ContributionTextFull (still capped at 3000 chars). For full contribution text without the cap, read the resource hansard://debate/{debate_ext_id}/contribution/{contribution_ext_id}.",
      -      "enum": [
      -        "preview",
      -        "full"
      -      ],
      -      "type": "string"
      -    },
      -    "to_date": {
      -      "anyOf": [
      -        {
      -          "format": "date",
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null,
      -      "description": "End date (YYYY-MM-DD)"
      -    }
      -  },
      -  "required": [
      -    "query"
      -  ],
      -  "type": "object"
      -}
    • addedInput schema / properties / query
      Added value: +{
      +  "description": "Phrase to find in Hansard contribution text bodies. Hansard searches the words members actually said in their speeches — NOT debate titles, topic metadata, or written headlines. Pass tokens that would appear in someone's speech: distinctive arguments ('disproportionate sanction'), statutory references ('section 21'), or specific phrases. Bill titles (e.g. 'Renters\\'s Rights Bill') often DON'T match because members refer to 'the Bill' or 'this legislation' in their speeches. Tokenised matching: 'housing benefit fraud' will match contributions saying 'fraud in housing benefit claims'. For 'all contributions in a specific debate' regardless of words used, drill via top_debates[].debate_ext_id into parliament_get_debate_contributions.",
      +  "maxLength": 500,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / text_mode
      Added value: +{
      +  "default": "preview",
      +  "description": "'preview' returns the upstream ~250-char snippet (fast, low context cost). 'full' returns ContributionTextFull (still capped at 3000 chars). For full contribution text without the cap, read the resource hansard://debate/{debate_ext_id}/contribution/{contribution_ext_id}.",
      +  "enum": [
      +    "preview",
      +    "full"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / to_date
      Added value: +{
      +  "anyOf": [
      +    {
      +      "format": "date",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "End date (YYYY-MM-DD)"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "params"
      -]New value: +[
      +  "query"
      +]
  3. Changed1 schema field changed
    • changedInput schema / properties / params / description
      Previous value: -"HansardSearchInput with query, optional date range, house, member_id,\ntext_mode, contribution_type, offset, limit."New value: +"HansardSearchInput."
  4. Changed1 schema field changed
    • changedInput schema / properties / params / properties / query / description
      Previous value: -"Full phrase to search in Hansard debates. Pass the complete topic, e.g. 'short selling regulation' or 'artificial intelligence liability'. Searched as an exact phrase — do not truncate to a single keyword."New value: +"Phrase to find in Hansard contribution text bodies. Hansard searches the words members actually said in their speeches — NOT debate titles, topic metadata, or written headlines. Pass tokens that would appear in someone's speech: distinctive arguments ('disproportionate sanction'), statutory references ('section 21'), or specific phrases. Bill titles (e.g. 'Renters' Rights Bill') often DON'T match because members refer to 'the Bill' or 'this legislation' in their speeches. Tokenised matching: 'housing benefit fraud' will match contributions saying 'fraud in housing benefit claims'. For 'all contributions in a specific debate' regardless of words used, drill via top_debates[].debate_ext_id into parliament_get_debate_contributions."
  5. Changed2 schema fields changed
    • addedOutput schema / properties / top_debates / items / properties / source
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Human-readable Hansard publication state (Swagger Source enum name). Tells a lawyer the citation's finality — RollingHansard/DailyHansard are pre-consolidation, BoundVolume/Historic are final bound volumes. Does NOT indicate whether the citation resolves: column lookup resolves across all four states."
      +}
    • addedOutput schema / properties / top_debates / items / properties / source_code
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Raw Hansard Overview.Source ordinal: 1=RollingHansard, 2=DailyHansard, 3=BoundVolume, 4=Historic. Populated only when the emitting tool fetches the debate payload (today: parliament_lookup_by_column); null otherwise."
      +}
  6. Changed8 schema fields changed
    • changedOutput schema / properties / top_debates / items / description
      Previous value: -"A top debate section by contribution volume in the sampled window."New value: +"A top debate section returned as a search/lookup preview or aggregate result."
    • addedOutput schema / properties / top_debates / items / properties / contribution_count / anyOf
      Added value: +[
      +  {
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / properties / top_debates / items / properties / contribution_count / default
      Added value: +null
    • changedOutput schema / properties / top_debates / items / properties / contribution_count / description
      Previous value: -"Number of contributions in this debate matching the topic"New value: +"Number of contributions in this debate. Populated only when the emitting tool fetches the debate's full Items list (today: parliament_lookup_by_column). Null on preview arrays where the secondary fetch is too costly."
    • removedOutput schema / properties / top_debates / items / properties / contribution_count / minimum
      Removed value: -0
    • removedOutput schema / properties / top_debates / items / properties / contribution_count / type
      Removed value: -"integer"
    • addedOutput schema / properties / top_debates / items / properties / relevance_rank
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Upstream Hansard relevance score for this debate against the search query (0–100). Populated for relevance-scored searches (parliament_search_hansard, parliament_policy_position_summary). Null for column-lookup matches — the column-search endpoint does not rank."
      +}
    • changedOutput schema / properties / top_debates / items / required
      Previous value: -[
      -  "debate_id",
      -  "debate_ext_id",
      -  "debate_title",
      -  "date",
      -  "house",
      -  "contribution_count"
      -]New value: +[
      +  "debate_id",
      +  "debate_ext_id",
      +  "debate_title",
      +  "date",
      +  "house"
      +]
  7. Changed3 schema fields changed
    • changedOutput schema / properties / contributions / items / properties / member_id / description
      Previous value: -"Members API integer ID. Use as `member_id` in parliament_member_debates / parliament_member_interests, or as {member_id} in hansard://member/{member_id}/biography for role history."New value: +"Members API integer ID. Use as {member_id} in hansard://member/{member_id}/biography for the member's role history."
    • changedOutput schema / properties / top_divisions / items / properties / id / description
      Previous value: -"Division ID. Use as the `division_id` input to votes_get_division for the full member-by-member voting record."New value: +"Hansard-side division ID — distinct ID-space from the Lords/Commons Votes API. This value does NOT chain to votes_get_division (different API). For per-member voting, see `votes_id` below — populated when cross-resolution succeeded."
    • addedOutput schema / properties / top_divisions / items / properties / votes_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Lords/Commons Votes API division ID, cross-resolved from the upstream by (date + house + number). Use as the `division_id` input to votes_get_division for the full member-by-member voting record. None when the cross-resolve found no match (e.g. some Daily Part divisions are recorded in Hansard before the Votes API publishes them)."
      +}
  8. Changed5 schema fields changed
    • changedInput schema / properties / params / description
      Previous value: -"HansardSearchInput with query, optional date range, house, member, text_mode."New value: +"HansardSearchInput with query, optional date range, house, member_id,\ntext_mode, contribution_type, offset, limit."
    • addedInput schema / properties / params / properties / contribution_type
      Added value: +{
      +  "default": "Spoken",
      +  "description": "Which Hansard section to paginate. 'Spoken' = chamber + Westminster Hall debates (the default; what a lawyer usually means). 'Written' = written answers and statements. 'Corrections' = published corrections to the record. The corpus envelope (total_debates, total_divisions, etc.) is independent of this and always populated.",
      +  "enum": [
      +    "Spoken",
      +    "Written",
      +    "Corrections"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / params / properties / limit / description
      Previous value: -"Maximum contributions to return in this call. Default 20 keeps responses focused; raise to 100 for a bulk sweep."New value: +"Max contributions per call (1–100). Default 20. Paginate further with offset; total corpus size is in total_corpus on the response."
    • changedInput schema / properties / params / properties / offset / description
      Previous value: -"Number of contributions to skip before this page. Default 0. Re-call with offset=offset+returned while has_more is true to paginate."New value: +"Skip this many contributions before the page. Default 0. Re-call with offset=offset+returned to paginate; has_more flags whether more remain."
    • changedInput schema / properties / params / properties / offset / maximum
      Previous value: -2000New value: +5000
  9. Changed45 schema fields changed
    • changedInput schema / properties / params / description
      Previous value: -"HansardSearchInput with query, optional date range, optional member filter."New value: +"HansardSearchInput with query, optional date range, house, member, text_mode."
    • addedInput schema / properties / params / properties / house
      Added value: +{
      +  "default": "both",
      +  "description": "Restrict to one House. Default 'both' returns Commons + Lords contributions.",
      +  "enum": [
      +    "Commons",
      +    "Lords",
      +    "both"
      +  ],
      +  "type": "string"
      +}
    • removedInput schema / properties / params / properties / member
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Filter by member name"
      -}
    • addedInput schema / properties / params / properties / member_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Filter to contributions by a single member. Pass the integer Members API ID (resolve a name via parliament_find_member). The prior `member` field accepted a name string but Hansard's /search.json silently ignored it — the spec requires `memberId`."
      +}
    • addedInput schema / properties / params / properties / text_mode
      Added value: +{
      +  "default": "preview",
      +  "description": "'preview' returns the upstream ~250-char snippet (fast, low context cost). 'full' returns ContributionTextFull (still capped at 3000 chars). For full contribution text without the cap, read the resource hansard://debate/{debate_ext_id}/contribution/{contribution_ext_id}.",
      +  "enum": [
      +    "preview",
      +    "full"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / description
      Previous value: -"Result of a Hansard debate search.\n\nWraps the list of matching contributions with the query and filters\nso the client sees a real nested object on the wire."New value: +"Result of a Hansard debate search.\n\nWraps the list of matching contributions with the query, filters,\nand corpus-level facet counts so the client sees a real nested object\non the wire."
    • changedOutput schema / properties / contributions / description
      Previous value: -"Matching Hansard contributions. Each `text` field is capped at 3000 characters."New value: +"Matching Hansard contributions with full citation metadata."
    • changedOutput schema / properties / contributions / items / description
      Previous value: -"A single Hansard debate contribution."New value: +"A single Hansard debate contribution with citation-grade metadata.\n\nField provenance maps to the upstream hansard-api.parliament.uk\n`Contributions[i]` payload, so callers can footnote a contribution\nwithout re-querying."
    • addedOutput schema / properties / contributions / items / properties / attributed_to
      Added value: +{
      +  "description": "Full citable attribution string, e.g. 'The Minister of State, DESNZ (Lord Whitehead) (Lab)'. Includes role-at-time of contribution for ministerial interventions.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / contributions / items / properties / chamber_section
      Added value: +{
      +  "description": "Hansard section bucket (Section): 'Commons Chamber', 'Lords Chamber', 'Westminster Hall', 'Written Answers', 'Written Statements'.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / contributions / items / properties / column_end
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "The last Hansard column number this contribution spans, e.g. when a long speech runs across columns 200–203. Equal to `column_start` for short contributions. Same population semantics as `column_start`."
      +}
    • addedOutput schema / properties / contributions / items / properties / column_ref
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Hansard internal page-marker code from HansardSection (e.g. 'BE-BG1', 'AA-AD'). NOT the citable column number that appears in an OSCOLA footnote — see `column_start` / `column_end` for those, which are only available when reading the contribution via hansard://debate/{debate_ext_id}/contribution/{contribution_ext_id}. From parliament_search_hansard, only this page-marker is exposed."
      +}
    • addedOutput schema / properties / contributions / items / properties / column_start
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "The citable Hansard column number where this contribution begins, e.g. 200, 1162. Extracted from `data-column-number` markers in the contribution HTML. Populated only when reading via the contribution resource — `parliament_search_hansard` returns this as None because Hansard's /search.json strips the column markers. To get the real column number for a search hit, read hansard://debate/{debate_ext_id}/contribution/{contribution_ext_id}."
      +}
    • addedOutput schema / properties / contributions / items / properties / contribution_ext_id
      Added value: +{
      +  "description": "ContributionExtId GUID — stable citation key. Use as {contribution_ext_id} in hansard://debate/{debate_ext_id}/contribution/{contribution_ext_id}.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / contributions / items / properties / date / description
      Previous value: -"Date the contribution was made"New value: +"Date the contribution was made (SittingDate)"
    • addedOutput schema / properties / contributions / items / properties / debate_ext_id
      Added value: +{
      +  "description": "DebateSectionExtId GUID. Use as {debate_ext_id} in hansard://debate/{debate_ext_id}/header.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / contributions / items / properties / debate_id
      Added value: +{
      +  "description": "Integer DebateSectionId — internal Hansard identifier",
      +  "type": "integer"
      +}
    • changedOutput schema / properties / contributions / items / properties / debate_title / description
      Previous value: -"Title of the debate or question"New value: +"Title of the debate or question (DebateSection)"
    • addedOutput schema / properties / contributions / items / properties / house
      Added value: +{
      +  "description": "House of Parliament (House)",
      +  "enum": [
      +    "Commons",
      +    "Lords"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / contributions / items / properties / member_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Members API integer ID. Use as `member_id` in parliament_member_debates / parliament_member_interests, or as {member_id} in hansard://member/{member_id}/biography for role history."
      +}
    • changedOutput schema / properties / contributions / items / properties / member_name / description
      Previous value: -"Name of the contributing member"New value: +"Name of the contributing member (MemberName)"
    • changedOutput schema / properties / contributions / items / properties / party / description
      Previous value: -"Political party affiliation"New value: +"Political party affiliation parsed from the trailing '(Party)' suffix in AttributedTo"
    • addedOutput schema / properties / contributions / items / properties / rank
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Upstream relevance score (Rank). Higher = more relevant to the query."
      +}
    • removedOutput schema / properties / contributions / items / properties / section
      Removed value: -{
      -  "description": "Hansard section (e.g. 'Commons Chamber', 'Written Answers')",
      -  "type": "string"
      -}
    • changedOutput schema / properties / contributions / items / properties / text / description
      Previous value: -"Full text of the contribution (capped at 3000 characters)"New value: +"Contribution text (capped per max_text_chars on the input; default 3000). Source: ContributionTextFull when text_mode='full', ContributionText preview otherwise."
    • changedOutput schema / properties / contributions / items / properties / url / description
      Previous value: -"Direct Hansard URL to this contribution"New value: +"Public hansard.parliament.uk URL for this contribution (synthesised from House/Date/DebateSectionExtId/ContributionExtId)."
    • changedOutput schema / properties / contributions / items / required
      Previous value: -[
      -  "member_name",
      -  "date",
      -  "debate_title",
      -  "section",
      -  "text",
      -  "url"
      -]New value: +[
      +  "member_name",
      +  "attributed_to",
      +  "date",
      +  "debate_title",
      +  "debate_id",
      +  "debate_ext_id",
      +  "contribution_ext_id",
      +  "chamber_section",
      +  "house",
      +  "text",
      +  "url"
      +]
    • addedOutput schema / properties / date_range
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxItems": 2,
      +      "minItems": 2,
      +      "prefixItems": [
      +        {
      +          "format": "date",
      +          "type": "string"
      +        },
      +        {
      +          "format": "date",
      +          "type": "string"
      +        }
      +      ],
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "(min, max) SittingDate of returned contributions, or None if empty"
      +}
    • addedOutput schema / properties / house
      Added value: +{
      +  "default": "both",
      +  "description": "House filter applied",
      +  "enum": [
      +    "Commons",
      +    "Lords",
      +    "both"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / house_breakdown
      Added value: +{
      +  "additionalProperties": {
      +    "type": "integer"
      +  },
      +  "description": "Counts by house across the returned page",
      +  "type": "object"
      +}
    • removedOutput schema / properties / member
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Member name filter applied, if any"
      -}
    • addedOutput schema / properties / member_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Members API integer ID filter applied, if any (echoed from input)."
      +}
    • addedOutput schema / properties / party_breakdown
      Added value: +{
      +  "additionalProperties": {
      +    "type": "integer"
      +  },
      +  "description": "Counts by party across the returned page",
      +  "type": "object"
      +}
    • addedOutput schema / properties / text_mode
      Added value: +{
      +  "default": "preview",
      +  "description": "Whether contribution `text` carries the upstream preview or full body (still capped).",
      +  "enum": [
      +    "preview",
      +    "full"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / top_debates
      Added value: +{
      +  "description": "Top-ranked debates touching this topic (from upstream Debates[] preview, capped at 4 by Hansard's /search.json). Each entry's `debate_ext_id` chains to hansard://debate/{debate_ext_id}/header.",
      +  "items": {
      +    "description": "A top debate section by contribution volume in the sampled window.",
      +    "properties": {
      +      "contribution_count": {
      +        "description": "Number of contributions in this debate matching the topic",
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "date": {
      +        "description": "Sitting date of the debate",
      +        "format": "date",
      +        "type": "string"
      +      },
      +      "debate_ext_id": {
      +        "description": "Debate GUID. Use as {debate_ext_id} in hansard://debate/{debate_ext_id}/header.",
      +        "type": "string"
      +      },
      +      "debate_id": {
      +        "description": "Internal Hansard debate ID (DebateSectionId)",
      +        "type": "integer"
      +      },
      +      "debate_title": {
      +        "description": "Debate title",
      +        "type": "string"
      +      },
      +      "house": {
      +        "description": "House",
      +        "enum": [
      +          "Commons",
      +          "Lords"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "debate_id",
      +      "debate_ext_id",
      +      "debate_title",
      +      "date",
      +      "house",
      +      "contribution_count"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / top_divisions
      Added value: +{
      +  "description": "Top-ranked divisions touching this topic (from upstream Divisions[] preview, capped at 4). Each entry's `id` chains to votes_get_division; `debate_section_ext_id` chains back to the parent debate.",
      +  "items": {
      +    "description": "A single division (formal parliamentary vote) — lightweight match shape.\n\nReturned as a preview slice on `parliament_search_hansard`'s `top_divisions`\nand as the full element of `parliament_get_debate_divisions`'s output.\n\nField provenance maps to the upstream `DivisionOverview` Swagger definition;\nthe live `/debates/divisions/{ext}` endpoint returns most integer/boolean\nvalues as strings, which the parser converts.",
      +    "properties": {
      +      "ayes_count": {
      +        "description": "Number of Aye votes.",
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "date": {
      +        "description": "Sitting date of the division (Date).",
      +        "format": "date",
      +        "type": "string"
      +      },
      +      "debate_section": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Parent debate title (DebateSection), e.g. 'Renters' Rights Bill'."
      +      },
      +      "debate_section_ext_id": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Parent debate GUID (DebateSectionExtId). Use as {debate_ext_id} in hansard://debate/{debate_ext_id}/header to read the surrounding debate context."
      +      },
      +      "external_id": {
      +        "description": "Division GUID (ExternalId). Stable identifier for cross-reference.",
      +        "type": "string"
      +      },
      +      "house": {
      +        "description": "House where the division was held.",
      +        "enum": [
      +          "Commons",
      +          "Lords"
      +        ],
      +        "type": "string"
      +      },
      +      "id": {
      +        "description": "Division ID. Use as the `division_id` input to votes_get_division for the full member-by-member voting record.",
      +        "type": "integer"
      +      },
      +      "motion_text": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "The motion being voted on (TextBeforeVote), e.g. 'Division on Motion A1'. This is the citable description of what the division decided."
      +      },
      +      "noes_count": {
      +        "description": "Number of Noe votes.",
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "number": {
      +        "description": "Division number within the sitting (e.g. '1', '2').",
      +        "type": "string"
      +      },
      +      "result_text": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "The result statement (TextAfterVote), e.g. 'Motion A1 disagreed.'"
      +      },
      +      "time": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Time of the division as HH:MM:SS, or None when the upstream omits it."
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "external_id",
      +      "number",
      +      "date",
      +      "house",
      +      "ayes_count",
      +      "noes_count"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / total_committees
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "TotalCommittees."
      +}
    • addedOutput schema / properties / total_corpus
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Total contributions in Hansard matching this query (TotalContributions). Use to decide whether to paginate further or escalate to parliament_policy_position_summary."
      +}
    • addedOutput schema / properties / total_corrections
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "TotalCorrections — published corrections to the Hansard record."
      +}
    • addedOutput schema / properties / total_debates
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "TotalDebates — distinct debates touching this topic."
      +}
    • addedOutput schema / properties / total_divisions
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "TotalDivisions. Non-zero → consider `top_divisions` previews below or chain to votes_search_divisions."
      +}
    • addedOutput schema / properties / total_members
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "TotalMembers — member-name matches in the corpus."
      +}
    • addedOutput schema / properties / total_petitions
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "TotalPetitions."
      +}
    • addedOutput schema / properties / total_written_answers
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "TotalWrittenAnswers."
      +}
    • addedOutput schema / properties / total_written_statements
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "TotalWrittenStatements."
      +}
  10. Changed1 schema field changed
    • addedInput schema / properties / params / description
      Added value: +"HansardSearchInput with query, optional date range, optional member filter."
  11. Changed5 schema fields changed
    • addedInput schema / properties / params / properties / limit
      Added value: +{
      +  "default": 20,
      +  "description": "Maximum contributions to return in this call. Default 20 keeps responses focused; raise to 100 for a bulk sweep.",
      +  "maximum": 100,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / params / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "Number of contributions to skip before this page. Default 0. Re-call with offset=offset+returned while has_more is true to paginate.",
      +  "maximum": 2000,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / has_more
      Added value: +{
      +  "default": false,
      +  "description": "True if a full page was returned (more may exist; re-call with offset=offset+limit)",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / limit
      Added value: +{
      +  "default": 20,
      +  "description": "Page size requested",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "Skip applied to this page (Hansard API: skip)",
      +  "type": "integer"
      +}
  12. Changed10 schema fields changed
    • changedOutput schema / description
      Previous value: -"Generic wrapper for non-object return types."New value: +"Result of a Hansard debate search.\n\nWraps the list of matching contributions with the query and filters\nso the client sees a real nested object on the wire."
    • addedOutput schema / properties / contributions
      Added value: +{
      +  "description": "Matching Hansard contributions. Each `text` field is capped at 3000 characters.",
      +  "items": {
      +    "description": "A single Hansard debate contribution.",
      +    "properties": {
      +      "constituency": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Constituency (Commons only; None for Lords)"
      +      },
      +      "date": {
      +        "description": "Date the contribution was made",
      +        "format": "date",
      +        "type": "string"
      +      },
      +      "debate_title": {
      +        "description": "Title of the debate or question",
      +        "type": "string"
      +      },
      +      "member_name": {
      +        "description": "Name of the contributing member",
      +        "type": "string"
      +      },
      +      "party": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Political party affiliation"
      +      },
      +      "section": {
      +        "description": "Hansard section (e.g. 'Commons Chamber', 'Written Answers')",
      +        "type": "string"
      +      },
      +      "text": {
      +        "description": "Full text of the contribution (capped at 3000 characters)",
      +        "type": "string"
      +      },
      +      "url": {
      +        "description": "Direct Hansard URL to this contribution",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "member_name",
      +      "date",
      +      "debate_title",
      +      "section",
      +      "text",
      +      "url"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / from_date
      Added value: +{
      +  "anyOf": [
      +    {
      +      "format": "date",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Start date filter applied, if any"
      +}
    • addedOutput schema / properties / member
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Member name filter applied, if any"
      +}
    • addedOutput schema / properties / query
      Added value: +{
      +  "description": "The phrase that was searched in Hansard",
      +  "type": "string"
      +}
    • removedOutput schema / properties / result
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / to_date
      Added value: +{
      +  "anyOf": [
      +    {
      +      "format": "date",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "End date filter applied, if any"
      +}
    • addedOutput schema / properties / total
      Added value: +{
      +  "description": "Number of contributions returned in this call",
      +  "type": "integer"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "result"
      -]New value: +[
      +  "query",
      +  "total"
      +]
    • removedOutput schema / x-fastmcp-wrap-result
      Removed value: -true
  13. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint=false; the description is fully consistent with these. It adds valuable behavioral context: tokenized matching behavior, the fact that bill titles often don't match, pagination semantics (limit/offset, has_more), text_mode character caps, and the corpus envelope being independent of contribution_type. This goes well beyond the annotations.

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?

The description is lengthy but each sentence serves a purpose: usage scope, return metadata, drill-down, exclusions, pagination, alternatives, and authority. It is front-loaded with the key directive and structured with clear separations. Slight redundancy exists (e.g., 'USE THIS TOOL WHEN' restates the title), but overall it is well-organized and earns its length.

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?

Given 9 parameters, rich annotations, an output schema, and multiple related siblings, the description covers all critical contexts: when to use, when not to use, how to paginate, how to retrieve full text, what each contribution_type means, and the authoritative nature of the data. It also points to the workflow for member-specific queries. This is fully complete for the tool's complexity.

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

Parameters5/5

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

Schema coverage is 100%, but the description enriches the query parameter with practical guidance (e.g., 'Pass tokens that would appear in someone's speech', 'Bill titles often DON'T match'). It also clarifies member_id (integer ID, not name string, with explanation of the old field), text_mode, and contribution_type semantics. This is high-value elaboration beyond bare schema definitions.

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 opens with a specific directive: 'USE THIS TOOL WHEN searching Hansard by topic, bill title, or text phrase.' It clearly identifies the resource (Hansard debates) and the action (search), and distinguishes from sibling tools by contrasting with parliament_get_debate_contributions and parliament_find_member. The stated purpose is unambiguous and technically accurate.

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 provides explicit 'DO NOT' guidance ('DO NOT text-search by member name') and names the correct alternative workflow (parliament_find_member → parliament_get_debate_contributions). It also mentions parliament_policy_position_summary for broad topic scans and gives a concrete drill-down path via read_resource. This is exemplary usage guidance.

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.

TDQS

A4.4/5.0
Disambiguation5/5

Every tool has a clearly distinct purpose, with detailed descriptions that prevent ambiguity. Tools covering similar domains (e.g., multiple parliament search tools) are carefully differentiated by their search approach and input requirements.

Naming Consistency5/5

All tools follow a consistent snake_case verb_noun pattern (e.g., bills_get_bill, case_law_search, citations_resolve). Even generic tools adhere to this style. No mixing of conventions.

Tool Count4/5

With 35 tools, the count is on the higher side but appropriate for the wide-ranging domain of UK legal research. Each tool contributes to specific sub-domains (bills, case law, citations, committees, HMRC, legislation, parliament, votes) without unnecessary duplication.

Completeness5/5

The tool surface covers nearly all essential aspects of UK legal research: searching and retrieving bills, case law, and legislation; parsing and resolving citations; exploring committee evidence; accessing Hansard debates and member interests; and checking HMRC guidance and VAT rates. Gaps like full judgment text retrieval are mitigated by paragraph-level access and indexing.