Skip to main content
Glama

UK Business Tools - Ledgerhall

Get Member Debates

law_parliament_member_debates
Read-onlyIdempotent

USE THIS TOOL WHEN you have a member_id and want contributions where THAT member used a specific topic phrase verbatim (text-body search).

CALL parliament_find_member(name) FIRST to obtain the integer member_id.

This is a name-based text-body search — it matches contributions whose TEXT contains the topic phrase. A member who spoke in a debate but didn't use your phrase verbatim is filtered out. For verbatim retrieval of every contribution by a member in a known debate (regardless of vocabulary), use parliament_get_debate_contributions(debate_ext_id, member_id=...) instead.

Each contribution's text field is capped at 3000 characters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum contributions to return. Default 20.
topicNoOptional phrase to find in THIS member's contribution text bodies. Hansard searches the words the member actually said, NOT the topic or title of the debate. Pass tokens this member would have spoken — distinctive arguments ('disproportionate sanction'), statutory references ('section 21'), or motion numbers ('Motion C1') — not the bill's name (members rarely say e.g. 'Renters\' Rights Bill' verbatim in their speeches). If you want 'every contribution this member made in a specific debate' regardless of words used, find the debate_ext_id then use parliament_get_debate_contributions(debate_ext_id, member_id=...).
offsetNoNumber of contributions to skip before this page. Default 0. Re-call with offset=offset+returned while has_more is true.
member_idYesParliament Members API integer ID. Obtain from parliament_find_member.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoPage size requested
topicNoTopic phrase filter applied, if any
totalYesNumber of contributions returned in this call
offsetNoSkip applied to this page
has_moreNoTrue if a full page was returned (more may exist)
member_idYesParliament Members API member ID
contributionsNoHansard contributions for the member. Each `text` field is capped at 3000 characters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • changedOutput schema / properties / contributions / items / properties / attributed_to / description
      Previous value: -"Full citable attribution string, e.g. 'The Minister of State, DESNZ (Lord Whitehead) (Lab)'. Includes role-at-time of contribution for ministerial interventions."New value: +"Full citable attribution string, verbatim from Hansard, e.g. 'The Minister of State, DESNZ (Lord Whitehead) (Lab)' or 'Lord Pannick (CB)'. This is the authoritative citation text — quote it as-is rather than reconstructing it from other fields."
    • changedOutput schema / properties / contributions / items / properties / constituency / description
      Previous value: -"Constituency (Commons only; None for Lords)"New value: +"Constituency (Commons only; None for Lords). Not currently populated from AttributedTo — see `party`'s note on why positional parsing of that string is unsafe; use parliament_find_member for authoritative constituency."
    • changedOutput schema / properties / contributions / items / properties / member_id / description
      Previous value: -"Members API integer ID. Use as {member_id} in hansard://member/{member_id}/biography for the member's role history."New value: +"Members API integer ID. Use as {member_id} in hansard://member/{member_id}/biography for the member's role history. None for a collective or otherwise unresolved attribution (e.g. 'Hon. Members') — Hansard itself has no member to identify there."
    • addedOutput schema / properties / contributions / items / properties / member_name / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / properties / contributions / items / properties / member_name / default
      Added value: +null
    • changedOutput schema / properties / contributions / items / properties / member_name / description
      Previous value: -"Name of the contributing member (MemberName)"New value: +"Authoritative display name of the contributing member — populated ONLY when the source endpoint itself supplies a real name field, never derived by parsing `attributed_to`. Populated from Hansard's MemberName field on the search endpoints (parliament_search_hansard, parliament_member_debates). ALWAYS None from parliament_get_debate_contributions (backed by /debates/Debate/{ext}.json), because DebateItem has no MemberName field at all — only `AttributedTo` (a citation-display string) and `member_id`. AttributedTo's shape varies unpredictably (own name first, hereditary-title styling, ministerial office, chair/speaker role, annotations, collective labels — e.g. 'Lord Pannick (CB)' vs 'The Earl of Devon (CB)' vs 'Madam Deputy Speaker (Judith Cummins)' vs 'Madam Deputy Speaker' alone, all verified live) with no positional rule that reliably recovers the person's name across all of them — two earlier attempts ('use the last parenthesis', then 'unless it starts with `The `') were each falsified by a real, live counterexample. `attributed_to` is preserved in full instead of being decomposed into a guess. Resolve authoritative identity via `member_id` and parliament_find_member when this is None."
    • removedOutput schema / properties / contributions / items / properties / member_name / type
      Removed value: -"string"
    • changedOutput schema / properties / contributions / items / properties / party / description
      Previous value: -"Political party affiliation parsed from the trailing '(Party)' suffix in AttributedTo"New value: +"ALWAYS None. Hansard's AttributedTo is a citation-display string Hansard composes for readability, not structured party data — neither the search-contributions nor the debate-items schema declares a Party field, and the parenthesised text varies by convention (constituency, party, office, 'Maiden Speech', a virtual-attendance marker, or nothing at all) in ways that cannot be told apart by position alone. Guessing a party from it previously produced fabricated values for ministers/officeholders (e.g. party='Lucy Powell' for 'The Leader of the House of Commons (Lucy Powell)'). For a member's authoritative party, resolve `member_id` via parliament_find_member against the Members API's structured latestParty field."
    • changedOutput schema / properties / contributions / items / required
      Previous value: -[
      -  "member_name",
      -  "attributed_to",
      -  "date",
      -  "debate_title",
      -  "debate_id",
      -  "debate_ext_id",
      -  "contribution_ext_id",
      -  "chamber_section",
      -  "house",
      -  "text",
      -  "url"
      -]New value: +[
      +  "attributed_to",
      +  "date",
      +  "debate_title",
      +  "debate_id",
      +  "debate_ext_id",
      +  "contribution_ext_id",
      +  "chamber_section",
      +  "house",
      +  "text",
      +  "url"
      +]
  2. Changed6 schema fields changed
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 20,
      +  "description": "Maximum contributions to return. Default 20.",
      +  "maximum": 100,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / member_id
      Added value: +{
      +  "description": "Parliament Members API integer ID. Obtain from parliament_find_member.",
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / 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.",
      +  "maximum": 2000,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • removedInput schema / properties / params
      Removed value: -{
      -  "additionalProperties": false,
      -  "description": "MemberDebatesInput with member_id and optional topic filter.",
      -  "properties": {
      -    "limit": {
      -      "default": 20,
      -      "description": "Maximum contributions to return. Default 20.",
      -      "maximum": 100,
      -      "minimum": 1,
      -      "type": "integer"
      -    },
      -    "member_id": {
      -      "description": "Parliament Members API integer ID. Obtain from parliament_find_member.",
      -      "minimum": 1,
      -      "type": "integer"
      -    },
      -    "offset": {
      -      "default": 0,
      -      "description": "Number of contributions to skip before this page. Default 0. Re-call with offset=offset+returned while has_more is true.",
      -      "maximum": 2000,
      -      "minimum": 0,
      -      "type": "integer"
      -    },
      -    "topic": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null,
      -      "description": "Optional phrase to find in THIS member's contribution text bodies. Hansard searches the words the member actually said, NOT the topic or title of the debate. Pass tokens this member would have spoken — distinctive arguments ('disproportionate sanction'), statutory references ('section 21'), or motion numbers ('Motion C1') — not the bill's name (members rarely say e.g. 'Renters' Rights Bill' verbatim in their speeches). If you want 'every contribution this member made in a specific debate' regardless of words used, find the debate_ext_id then use parliament_get_debate_contributions(debate_ext_id, member_id=...)."
      -    }
      -  },
      -  "required": [
      -    "member_id"
      -  ],
      -  "type": "object"
      -}
    • addedInput schema / properties / topic
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional phrase to find in THIS member's contribution text bodies. Hansard searches the words the member actually said, NOT the topic or title of the debate. Pass tokens this member would have spoken — distinctive arguments ('disproportionate sanction'), statutory references ('section 21'), or motion numbers ('Motion C1') — not the bill's name (members rarely say e.g. 'Renters\\' Rights Bill' verbatim in their speeches). If you want 'every contribution this member made in a specific debate' regardless of words used, find the debate_ext_id then use parliament_get_debate_contributions(debate_ext_id, member_id=...)."
      +}
    • changedInput schema / required
      Previous value: -[
      -  "params"
      -]New value: +[
      +  "member_id"
      +]
  3. Changed1 schema field changed
    • changedInput schema / properties / params / properties / topic / description
      Previous value: -"Optional phrase to filter this member's contributions by topic, e.g. 'housing benefit' or 'net zero'. Searched as an exact phrase."New value: +"Optional phrase to find in THIS member's contribution text bodies. Hansard searches the words the member actually said, NOT the topic or title of the debate. Pass tokens this member would have spoken — distinctive arguments ('disproportionate sanction'), statutory references ('section 21'), or motion numbers ('Motion C1') — not the bill's name (members rarely say e.g. 'Renters' Rights Bill' verbatim in their speeches). If you want 'every contribution this member made in a specific debate' regardless of words used, find the debate_ext_id then use parliament_get_debate_contributions(debate_ext_id, member_id=...)."
  4. Changed1 schema field 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."
  5. Changed20 schema fields changed
    • 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"
      +]
  6. Added
  7. Removed
  8. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare the safety profile (readOnly, idempotent, non-destructive, openWorld), but the description adds useful behavior beyond them: matching is verbatim text-body only, non-matching contributions are filtered out, and each contribution's text is capped at 3000 characters. It does not cover rate limits or auth, so it is strong but not exhaustive.

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?

It is front-loaded with the primary use case, then prerequisite, caveat, and alternative. The structure is scannable and every sentence serves a purpose, though some content duplicates the schema's already detailed parameter descriptions.

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 output schema exists and the annotations cover safety, the description supplies what an agent still needs: member_id sourcing, verbatim text-search semantics, the distinction from the alternative tool, and the text truncation limit. Nothing critical is missing for correct invocation.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents member_id, topic, limit, and offset in detail. The description largely reinforces the topic semantics already present in the schema and adds the member_id prerequisite, but does not significantly extend parameter meaning beyond the structured fields. Baseline 3 is appropriate.

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 states a precise verb and resource: it returns contributions by a specific member matching a topic phrase via text-body search. It also explicitly distinguishes this tool from parliament_get_debate_contributions, so an agent can tell which sibling to use without opening either schema.

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?

It gives explicit when-to-use conditions ('WHEN you have a member_id and want contributions where THAT member used a specific topic phrase verbatim'), a prerequisite ('CALL parliament_find_member FIRST'), and a named alternative with the exact situation that selects it. This is complete routing 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.

Resources