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 coverage on any policy topic. Get counts by house, year, month, and top debates, plus corpus-wide envelope totals, 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
paramsYesPolicyPositionSummaryInput with topic, optional date range, house, max_debates_scanned.

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 declare readOnlyHint=true, etc. Description adds 'Pure counts — no LLM, no editorial labels,' explains underlying mechanism (sweeps /search/Debates.json with pagination), and mentions rate limits. Adds significant context beyond 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?

Well-structured and front-loaded with key instruction. However, the description is somewhat lengthy with detailed API paths; could be slightly more concise without losing clarity.

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?

With an output schema assumed present, the description covers purpose, usage, limitations, behavior, parameters, and post-call actions comprehensively. No gaps identified for a deterministic aggregation tool.

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%. Description adds critical context for the 'topic' parameter (debate-level matching uses metadata, Bill titles work), explains default and max for max_debates_scanned, and mentions rate limits. Adds substantial meaning beyond 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 clearly states the tool aggregates Hansard debate-level signals, providing breakdowns by house, year, section, etc. It distinguishes itself from siblings like parliament_search_hansard (text search) and parliament_get_debate_contributions (drill down).

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 instructs 'USE THIS TOOL WHEN you want debate-level corpus signals... without reading every contribution.' Provides post-call guidance (pick a debate, use parliament_get_debate_contributions). Notes limitations (no member-level facets) and suggests alternatives (parliament_member_debates).

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