Skip to main content
Glama

UK Business Tools - Ledgerhall

Search Parliamentary Divisions

law_votes_search_divisions
Read-onlyIdempotent

USE THIS TOOL WHEN searching Commons or Lords formal votes by topic, date, or member.

Returns one page of division summaries (title, date, vote counts, pass/fail) plus total, the source's count of all matching divisions. While has_more is true, re-call with offset=offset+returned. AFTER calling, pass division_id + house into votes_get_division for the full member-by-member voter lists.

Authoritative source for UK parliamentary vote records.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
houseNoWhich house to search.Commons
limitNoMaximum divisions to return. Default 25. The Lords API honours up to 100; the Commons API returns at most 25 per call, so page by `returned`, not `limit`.
queryNoSearch term for division titles, e.g. 'Rwanda' or 'Online Safety Bill'. Omit to browse recent divisions.
offsetNoNumber of divisions to skip before this page. Default 0. Re-call with offset=offset+returned while has_more is true.
to_dateNoEnd date (YYYY-MM-DD).
from_dateNoStart date (YYYY-MM-DD).
member_idNoFilter to divisions where this member voted. Get the member ID from parliament_find_member.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
houseYesCommons or Lords
limitNoPage size requested (the Commons API returns at most 25 regardless)
queryNoThe search term, if any (None = browse recent)
totalYesTotal divisions matching the filters, from the source API's searchTotalResults count
offsetNoSkip applied to this page
has_moreNoTrue if divisions beyond this page exist (offset + returned < total)
returnedYesNumber of divisions returned in this call
divisionsNoMatching divisions. Use the integer `id` field with votes_get_division to fetch the full voter list.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum divisions to return. Default 25 (Commons API max-per-page)."New value: +"Maximum divisions to return. Default 25. The Lords API honours up to 100; the Commons API returns at most 25 per call, so page by `returned`, not `limit`."
    • changedInput schema / properties / offset / maximum
      Previous value: -2000New value: +2147483647
    • changedOutput schema / properties / has_more / description
      Previous value: -"True if a full page was returned (more may exist)"New value: +"True if divisions beyond this page exist (offset + returned < total)"
    • changedOutput schema / properties / limit / description
      Previous value: -"Page size requested"New value: +"Page size requested (the Commons API returns at most 25 regardless)"
    • addedOutput schema / properties / returned
      Added value: +{
      +  "description": "Number of divisions returned in this call",
      +  "type": "integer"
      +}
    • changedOutput schema / properties / total / description
      Previous value: -"Number of divisions returned in this call"New value: +"Total divisions matching the filters, from the source API's searchTotalResults count"
    • changedOutput schema / required
      Previous value: -[
      -  "house",
      -  "total"
      -]New value: +[
      +  "house",
      +  "returned",
      +  "total"
      +]
  2. Changed9 schema fields changed
    • addedInput schema / properties / from_date
      Added value: +{
      +  "anyOf": [
      +    {
      +      "format": "date",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Start date (YYYY-MM-DD)."
      +}
    • addedInput schema / properties / house
      Added value: +{
      +  "default": "Commons",
      +  "description": "Which house to search.",
      +  "enum": [
      +    "Commons",
      +    "Lords"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 25,
      +  "description": "Maximum divisions to return. Default 25 (Commons API max-per-page).",
      +  "maximum": 100,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / member_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Filter to divisions where this member voted. Get the member ID from parliament_find_member."
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "Number of divisions 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": "DivisionSearchInput.",
      -  "properties": {
      -    "from_date": {
      -      "anyOf": [
      -        {
      -          "format": "date",
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null,
      -      "description": "Start date (YYYY-MM-DD)."
      -    },
      -    "house": {
      -      "default": "Commons",
      -      "description": "Which house to search.",
      -      "enum": [
      -        "Commons",
      -        "Lords"
      -      ],
      -      "type": "string"
      -    },
      -    "limit": {
      -      "default": 25,
      -      "description": "Maximum divisions to return. Default 25 (Commons API max-per-page).",
      -      "maximum": 100,
      -      "minimum": 1,
      -      "type": "integer"
      -    },
      -    "member_id": {
      -      "anyOf": [
      -        {
      -          "minimum": 1,
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null,
      -      "description": "Filter to divisions where this member voted. Get the member ID from parliament_find_member."
      -    },
      -    "offset": {
      -      "default": 0,
      -      "description": "Number of divisions to skip before this page. Default 0. Re-call with offset=offset+returned while has_more is true.",
      -      "maximum": 2000,
      -      "minimum": 0,
      -      "type": "integer"
      -    },
      -    "query": {
      -      "anyOf": [
      -        {
      -          "maxLength": 500,
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null,
      -      "description": "Search term for division titles, e.g. 'Rwanda' or 'Online Safety Bill'. Omit to browse recent divisions."
      -    },
      -    "to_date": {
      -      "anyOf": [
      -        {
      -          "format": "date",
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null,
      -      "description": "End date (YYYY-MM-DD)."
      -    }
      -  },
      -  "type": "object"
      -}
    • addedInput schema / properties / query
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 500,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Search term for division titles, e.g. 'Rwanda' or 'Online Safety Bill'. Omit to browse recent divisions."
      +}
    • addedInput schema / properties / to_date
      Added value: +{
      +  "anyOf": [
      +    {
      +      "format": "date",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "End date (YYYY-MM-DD)."
      +}
    • removedInput schema / required
      Removed value: -[
      -  "params"
      -]
  3. Changed1 schema field changed
    • changedInput schema / properties / params / description
      Previous value: -"DivisionSearchInput with optional query, house, date range, member filter."New value: +"DivisionSearchInput."
  4. Added
  5. Removed
  6. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already establish read-only, idempotent, non-destructive behavior. The description adds meaningful behavioral detail beyond annotations: it explains the pagination contract ('While has_more is true, re-call with offset=offset+returned'), the response shape, and the required next step. No contradiction with annotations.

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 compact and front-loaded with the trigger condition. Every sentence earns its place: usage, return summary, pagination rule, follow-up action, and source authority. The formatting, including line breaks and the 'AFTER calling' cue, aids scanability.

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 rich schema, output schema, and annotations, the description supplies the missing workflow context: how to page, what fields come back, and how to proceed to member-level results. Nothing an agent needs to call and use this tool correctly appears to be 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 the baseline is 3. Each parameter is already well-documented in the schema, including the Commons/Lords limit discrepancy and member_id sourcing. The description only loosely reinforces 'topic, date, or member' and pagination without adding new parameter-level meaning.

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, resource, and scope: 'searching Commons or Lords formal votes by topic, date, or member.' It clearly distinguishes itself from the related sibling tool law_votes_get_division by positioning this tool as the search step and the sibling as the follow-up for full voter lists.

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?

It gives explicit when-to-use guidance ('USE THIS TOOL WHEN searching Commons or Lords formal votes') and tells the agent to follow up with votes_get_division. It does not explicitly state when not to use this tool or name a direct alternative, though the downstream role is clear.

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