Skip to main content
Glama
ChrisBrooksbank

UK Parliament MCP Server

get_hansard_section_trees

Fetch the hierarchical structure of UK Parliament debates for a sitting day by house, date, and section to review debate sections as a tree.

Instructions

Get hierarchical structure of debates for a day | Hansard, debate hierarchy, structure | Use to see the tree structure of all debates on a sitting day. Returns hierarchical tree of debate sections.

    Args:
        house: House: 'Commons' or 'Lords' (1 or 2 also accepted).
        date: Date in YYYY-MM-DD format.
        section: Section name (e.g. 'Debate', 'WestHall', 'Petitions', 'GEN'). Get valid names from get_hansard_sitting_day.

    Returns:
        Hierarchical structure of debates.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateYes
houseYes
sectionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose the read-only nature of the call (get), that the section must be a valid name obtained from another tool, and that the result is a hierarchical tree, but says nothing about error behavior on invalid sections, tree depth/size, or any rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded and mostly tight, but the pipe-delimited keyword tag line ('Hansard, debate hierarchy, structure') is filler and the content is stated twice: 'hierarchical structure of debates for a day' in the opening and 'Returns hierarchical structure of debates' at the end.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return values need not be spelled out, and all three required params are explained along with the prerequisite tool for section names. The definition is serviceable for calling the tool correctly; remaining gaps are error handling and disambiguation from adjacent debate tools.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate and largely does: it documents all three params with accepted forms for house ('Commons'/'Lords', 1 or 2 accepted), an explicit date format (YYYY-MM-DD), and section examples ('Debate', 'WestHall', 'Petitions', 'GEN') plus where to get valid names. Only the exact semantics of 'section' versus the returned tree is left fuzzy.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (get) and resource (hierarchical tree of debate sections for a sitting day), which is clear and self-contained. It does not explicitly differentiate itself from nearby Hansard siblings such as get_debate_by_id, get_top_level_debate_id, or get_debate_speakers, so an agent must infer the boundary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use to see the tree structure of all debates on a sitting day' gives clear context for invoking it, and the section arg points to get_hansard_sitting_day as the source of valid values, which is a concrete prerequisite. No when-not-to-use or explicit alternative is named, so it stops short of 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools