Skip to main content
Glama
paulieb89

UK Legal Research MCP Server

Hansard Policy Position Summary (deterministic facets)

parliament_policy_position_summary
Read-onlyIdempotent

Aggregate UK Hansard debate signals on a policy topic. Get breakdowns by house, year, and section without reading every contribution.

Instructions

USE THIS TOOL WHEN you want debate-level corpus signals on a topic — by_house, by_year, by_section breakdowns — without reading every contribution.

Aggregates Hansard debate-level signals on a topic. Pure counts — no LLM, no editorial labels. Sweeps /search/Debates.json with pagination (up to max_debates_scanned), then aggregates by_house, by_section, by_year, by_month, and top_debates from debate metadata. Also captures the corpus-wide envelope counts (total_contributions, total_written_statements, total_divisions, etc.) from /search.json for cross-section scope.

AFTER calling, pick a debate from top_debates and pass its debate_ext_id into parliament_get_debate_contributions to drill into who said what.

Note on member-level facets: Hansard's search API exposes debate metadata, not per-contribution member identifiers, at the corpus level. by_party and top_contributors are therefore omitted from this deterministic summary. To see who spoke in a specific debate, read hansard://debate/{debate_ext_id}/header for an ordered contribution index, or call parliament_member_debates for one named member.

This is the authoritative source for UK Hansard corpus-level signals.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYesPhrase to find in Hansard contribution text bodies for the facet aggregation. Same semantics as parliament_search_hansard.query: tokens that appear in members' actual speeches, not bill titles or topic metadata. The aggregator sweeps top_debates[] returned by /search/Debates.json — those debates are matched on the phrase appearing in titles or contribution text, so passing a Bill title (e.g. 'Renters\' Rights Bill') usually works for THIS tool even though it wouldn't for member-level text search, because debate-level matching uses metadata in addition to body text.
from_dateNoStart date (YYYY-MM-DD)
to_dateNoEnd date (YYYY-MM-DD)
houseNoRestrict to one House. Default 'both'.both
max_debates_scannedNoHard cap on debates sampled from /search/Debates.json to compute facets. Default 200 issues ≤4 upstream calls (take=50 each). Raise to 2000 (≤40 calls) for an exhaustive sweep on a heavily-debated topic. Hansard rate limit: 1000 req/5min.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYesPhrase searched in Hansard
from_dateNoStart date filter applied
to_dateNoEnd date filter applied
houseYesHouse filter applied
total_contributionsYesTotal contributions in Hansard matching topic+filters (TotalContributions)
total_debatesYesTotal distinct debates touching this topic (TotalDebates)
total_written_statementsYesTotalWrittenStatements upstream count
total_written_answersYesTotalWrittenAnswers upstream count
total_divisionsYesTotalDivisions upstream count. Non-zero → consider votes_search_divisions.
debates_scannedYesNumber of debates pulled from /search/Debates.json for the facet breakdown (≤ max_debates_scanned)
by_partyNoCounts by party. ALWAYS EMPTY in this summary — Hansard's search API only exposes member identifiers at the per-debate level, not the corpus level. For party breakdown within one debate, read hansard://debate/{ext_id}/header. For one member's contributions across the corpus, use parliament_member_debates.
by_houseNoCounts of debates by house (Commons vs Lords)
by_sectionNoCounts of debates by Hansard section bucket (Chamber / Westminster Hall / Written Answers / Written Statements)
by_yearNoCounts of debates by sitting year, desc by year
by_month_recent_12NoCounts of debates by YYYY-MM for the most recent 12 months in the sample, desc by month
top_contributorsNoALWAYS EMPTY in this summary — see by_party note. Use parliament_member_debates after picking a debate from top_debates.
top_debatesNoTop 20 debates ranked by upstream relevance_rank, with debate_ext_id for hansard://debate/{debate_ext_id}/header drill-down. contribution_count is null in this preview shape (would require a secondary call per debate).
Behavior5/5

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

Annotations already indicate readOnlyHint=true, destructiveHint=false, idempotentHint=true. The description adds significant behavioral context: 'Pure counts — no LLM, no editorial labels' and explains the aggregation process (sweeps /search/Debates.json with pagination, aggregates by house/section/year/month/top_debates). It also mentions rate limits (1000 req/5min) and envelope counts from /search.json. No contradiction with annotations.

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?

The description is appropriately sized and front-loaded with the usage guideline. Every sentence provides necessary information: what the tool does, how it works, what to do after, limitations, and parameter details. No wasted words; it is comprehensive yet efficient.

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 the tool's complexity (5 parameters, 1 required, output schema exists), the description covers all aspects: purpose, inputs, process, outputs (by_house, by_year, etc.), limitations (no member-level facets), and post-call actions. It is fully complete for an agent to select and invoke the tool correctly.

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% (all 5 parameters described). The description adds value beyond the schema: for 'topic', it explains that bill titles work due to debate-level matching; for 'max_debates_scanned', it explains the default corresponds to ≤4 upstream calls and can be raised for exhaustive sweeps with rate limit context. This compensates fully for the rich schema.

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 the tool's purpose: aggregating debate-level corpus signals on a topic (by_house, by_year, by_section) without reading every contribution. It uses a specific verb-resource pair ('aggregate Hansard debate-level signals') and distinguishes from siblings like parliament_search_hansard 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?

The description explicitly starts with 'USE THIS TOOL WHEN' and provides usage context. It instructs users to pick a debate from top_debates and call parliament_get_debate_contributions for detail. It also explains when not to use (for member-level facets) and suggests alternative tools (parliament_member_debates, hansard://debate).

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