Skip to main content
Glama

UK Business Tools - Ledgerhall

Hansard Policy Position Summary (deterministic facets)

law_parliament_policy_position_summary
Read-onlyIdempotent

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
houseNoRestrict to one House. Default 'both'.both
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.
to_dateNoEnd date (YYYY-MM-DD)
from_dateNoStart date (YYYY-MM-DD)
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
houseYesHouse filter applied
topicYesPhrase searched in Hansard
by_yearNoCounts of debates by sitting year, desc by year
to_dateNoEnd date filter applied
by_houseNoCounts of debates by house (Commons vs Lords)
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.
from_dateNoStart date filter applied
by_sectionNoCounts of debates by Hansard section bucket (Chamber / Westminster Hall / Written Answers / Written Statements)
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).
total_debatesYesTotal distinct debates touching this topic (TotalDebates)
debates_scannedYesNumber of debates pulled from /search/Debates.json for the facet breakdown (≤ max_debates_scanned)
total_divisionsYesTotalDivisions upstream count. Non-zero → consider votes_search_divisions.
top_contributorsNoALWAYS EMPTY in this summary — see by_party note. Use parliament_member_debates after picking a debate from top_debates.
by_month_recent_12NoCounts of debates by YYYY-MM for the most recent 12 months in the sample, desc by month
total_contributionsYesTotal contributions in Hansard matching topic+filters (TotalContributions)
total_written_answersYesTotalWrittenAnswers upstream count
total_written_statementsYesTotalWrittenStatements upstream count

TDQS

A5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and the description adds valuable context: 'Pure counts — no LLM, no editorial labels' and the deterministic nature. It also transparently discloses API limitations (no per-contribution member identifiers, by_party/top_contributors omitted) and why, going beyond annotation-provided information.

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 front-loaded with the use case, then systematically covers aggregation mechanics, post-processing workflow, limitations, and authority. Though length is above average, every sentence adds value—no fluff or repetition. The structure with clear sections (USE, AFTER, Note) makes it easy to parse despite its density.

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?

For a complex aggregation tool with 5 parameters and an output schema, the description fully covers expected return facets (by_house, by_section, by_year, by_month, top_debates, envelope counts), explains how to chain with sibling tools, and addresses edge cases around topic matching and member-level facets. It effectively bridges the tool's position within the sibling ecosystem.

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 description coverage is 100%, but the description adds substantial meaning: topic semantics are contrasted with parliament_search_hansard.query, noting that Bill titles work for debate-level matching. It also explains max_debates_scanned implications (upstream call count, rate limit, exhaustive sweep guidance), providing depth the schema alone does not offer.

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 with specific facets (by_house, by_year, by_section) and emphasizes 'Pure counts — no LLM, no editorial labels.' It explicitly distinguishes itself from sibling tools like parliament_get_debate_contributions for drill-down, making its purpose unmistakable.

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 opens with 'USE THIS TOOL WHEN you want debate-level corpus signals... without reading every contribution,' providing explicit when-to-use context. It also gives a workflow ('AFTER calling, pick a debate from top_debates and pass its debate_ext_id into parliament_get_debate_contributions') and names alternatives (parliament_member_debates, hansard://debate header) for member-level needs.

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/5.0
Disambiguation4/5

Tools are well-grouped by domain prefixes (dd_, gov_, law_, prop_) with clear descriptions that differentiate them. However, there is minor overlap, e.g., dd_search could be used instead of individual searches, and dd_fetch versus dedicated profile tools might cause confusion.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern with domain-specific prefixes (dd_, gov_, law_, prop_). Names are descriptive and predictable, e.g., dd_charity_search, gov_govuk_search, law_bills_search_bills.

Tool Count4/5

70 tools is high but justified by the broad scope covering due diligence, government, legal, and property domains. Each domain has a reasonable number of tools (about 15-20 each). The count is on the upper end but still manageable.

Completeness5/5

The tool set is comprehensive across all domains: full CRUD for companies and charities, detailed legal research (cases, legislation, parliament, citations), property data (EPC, planning, price paid, rentals), and government information. No obvious gaps for the intended use cases.

Resources