Skip to main content
Glama

Get Contributions In A Debate

parliament_get_debate_contributions
Read-onlyIdempotent

USE THIS TOOL WHEN you have a debate_ext_id and want verbatim contributions, optionally filtered to one member.

Canonical path for "everything a member said in this debate" regardless of vocabulary — text-search tools (parliament_member_debates, parliament_search_hansard) filter by contribution TEXT, dropping members who spoke without using your phrase verbatim. This tool filters by MemberId on the debate's Items list, so vocabulary doesn't matter.

Typical chain: parliament_find_member(name) → member_id, then parliament_search_hansard or parliament_lookup_by_column → debate_ext_id, then this tool. The parliament module's instructions describe the full composition pattern.

Without member_id, returns every contribution (~100-200 for a long debate).

If the wire returns no contributions for a member you expect to have spoken, report the empty result honestly — do NOT reconstruct quotes from training data. Authoritative source for member contributions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
member_idNoOptional integer Members API ID. When given, only that member's contributions in this debate are returned — regardless of which words they used. Resolves via parliament_find_member. When omitted, every contribution in the debate is returned (typical debate: 100-200 items).
debate_ext_idYesDebate GUID (DebateSectionExtId). Chain from parliament_search_hansard top_debates[].debate_ext_id, parliament_lookup_by_column matches[].debate_ext_id, or any tool that surfaces a debate identifier.

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. Changed4 schema fields changed
    • addedInput schema / properties / debate_ext_id
      Added value: +{
      +  "description": "Debate GUID (DebateSectionExtId). Chain from parliament_search_hansard top_debates[].debate_ext_id, parliament_lookup_by_column matches[].debate_ext_id, or any tool that surfaces a debate identifier.",
      +  "minLength": 8,
      +  "type": "string"
      +}
    • addedInput schema / properties / member_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional integer Members API ID. When given, only that member's contributions in this debate are returned — regardless of which words they used. Resolves via parliament_find_member. When omitted, every contribution in the debate is returned (typical debate: 100-200 items)."
      +}
    • removedInput schema / properties / params
      Removed value: -{
      -  "additionalProperties": false,
      -  "description": "GetDebateContributionsInput with debate_ext_id (required) and\noptional member_id filter.",
      -  "properties": {
      -    "debate_ext_id": {
      -      "description": "Debate GUID (DebateSectionExtId). Chain from parliament_search_hansard top_debates[].debate_ext_id, parliament_lookup_by_column matches[].debate_ext_id, or any tool that surfaces a debate identifier.",
      -      "minLength": 8,
      -      "type": "string"
      -    },
      -    "member_id": {
      -      "anyOf": [
      -        {
      -          "minimum": 1,
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null,
      -      "description": "Optional integer Members API ID. When given, only that member's contributions in this debate are returned — regardless of which words they used. Resolves via parliament_find_member. When omitted, every contribution in the debate is returned (typical debate: 100-200 items)."
      -    }
      -  },
      -  "required": [
      -    "debate_ext_id"
      -  ],
      -  "type": "object"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "params"
      -]New value: +[
      +  "debate_ext_id"
      +]
  3. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent safety, so the description is free to add what they cannot: the vocabulary-independence of the MemberId filter, the expected result volume (~100-200 items for a long debate), and an integrity instruction to report empty results honestly rather than reconstruct quotes from training data. That is substantive behavioral context beyond the structured fields.

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?

The trigger condition and sibling differentiation are front-loaded, which is exactly right for a selection decision. It runs a little long with some restatement of the member_id filtering point across the opening and closing paragraphs, but each paragraph carries a distinct idea.

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 present, return-value explanation is unnecessary, and the description still supplies the chaining path, volume expectations, and fallback behavior. Nothing an agent needs to invoke this correctly is missing.

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 both parameters are already fully documented (member_id semantics, debate_ext_id chaining, defaults, volume). The description restates the member_id filtering behavior rather than adding new syntax or format detail, so the baseline 3 applies.

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 specific verb ('get') and resource ('contributions in a debate') and explicitly distinguishes itself from siblings parliament_member_debates and parliament_search_hansard by explaining it filters on MemberId rather than contribution text. An agent can select it correctly without opening the 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 an explicit trigger ('USE THIS TOOL WHEN you have a debate_ext_id'), names the alternatives and why they are worse for this job, and lays out the canonical composition chain (find_member → search_hansard/lookup_by_column → this tool). When-not guidance is present via the text-filter caveat.

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.