Skip to main content
Glama
paulieb89

UK Legal Research MCP Server

Search Hansard Debates

parliament_search_hansard
Read-onlyIdempotent

Search Hansard by topic, phrase, or bill title to find parliamentary debate contributions with citation-grade metadata.

Instructions

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
paramsYesHansardSearchInput.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe phrase that was searched in Hansard
from_dateNoStart date filter applied, if any
to_dateNoEnd date filter applied, if any
houseNoHouse filter appliedboth
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
offsetNoSkip applied to this page (Hansard API: skip)
limitNoPage size requested
totalYesNumber of contributions returned in this call
total_corpusNoTotal contributions in Hansard matching this query (TotalContributions). Use to decide whether to paginate further or escalate to parliament_policy_position_summary.
total_debatesNoTotalDebates — distinct debates touching this topic.
total_divisionsNoTotalDivisions. Non-zero → consider `top_divisions` previews below or chain to votes_search_divisions.
total_written_statementsNoTotalWrittenStatements.
total_written_answersNoTotalWrittenAnswers.
total_correctionsNoTotalCorrections — published corrections to the Hansard record.
total_petitionsNoTotalPetitions.
total_committeesNoTotalCommittees.
total_membersNoTotalMembers — member-name matches in the corpus.
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.
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.
party_breakdownNoCounts by party across the returned page
house_breakdownNoCounts by house across the returned page
date_rangeNo(min, max) SittingDate of returned contributions, or None if empty
has_moreNoTrue if a full page was returned (more may exist; re-call with offset=offset+limit)
contributionsNoMatching Hansard contributions with full citation metadata.
Behavior5/5

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

Discloses pagination (limit+offset), text_mode options, tokenized matching, and return of citation-grade metadata, adding value beyond annotations which already mark it as read-only and idempotent.

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?

Front-loaded with purpose and usage guidance, but slightly verbose with detailed parameter explanations. Nonetheless, every sentence serves a purpose.

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?

Covers all aspects: pagination, output metadata, alternative tools, when not to use, and behavioral nuances. Output schema exists, so description doesn't need to explain return structure but still hints at fields.

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 adds detailed behavioral context for each parameter, such as how query matches tokens, how text_mode affects output, and how member_id should be resolved.

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 clearly states it searches Hansard by topic, bill title, or text phrase, and distinguishes from sibling tools like parliament_find_member and parliament_get_debate_contributions.

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 states when to use (searching Hansard by text) and when not to (text-search by member name), providing alternative chains and referencing the Pannick workflow.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/paulieb89/uk-legal-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server