Skip to main content
Glama

uk-parliament-mcp-server

Ukparl Search Members

ukparl_search_members
Read-onlyIdempotent

Find MPs and peers by name, location or constituency, party, House, and current or historical membership. currentOnly=false includes current and former members. asOf selects historical membership and accepts name only, without House, party or location filters. Search results preserve latest profile fields; retrieve sections with ukparl_get_member. Follow opaque cursors with unchanged filters and use contentCursor for oversized records.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "ukparl_search_members"
  }
}

Input Schema

NameRequiredDescriptionDefault
asOfNoHistorical membership on YYYY-MM-DD; only name and pagination may accompany it.
nameNoName substring; omission searches all names.
houseNoFilter most recent House; unavailable with asOf.
limitNoRequested whole members; default 10, cap 20; safe over-cap integers are clamped.
cursorNoOpaque collection cursor for the same filters.
partyIdNoParty ID; active reference parties do not exhaust historical IDs.
currentOnlyNoTrue restricts to current members; false includes former and current.
constituencyNoSource location or constituency text, not exact equality.
contentCursorNoSame-selection lossless content continuation.

Output Schema

NameRequiredDescriptionDefault
capNoMember page-size ceiling; a larger limit is clamped to it.
modeNoModern or dated historical search.
pageNoCollection continuation by actually emitted records.
errorNoPresent when the call failed. Absent on success.
itemsNoWhole summary member records.
queryNoComplete normalized filters and membership-date semantics.
shownNoActual whole members emitted.
noticeNoLicence, historical scope and workload notices.
sourceNoActual official search request; provenance for every item on the page.
appliedNoEffective source and workload; full filters stay in /query.
deliveryNoFull selected payload, child outline, or JSON fragment.
guidanceNoEmpty-result recovery guidance.
identityNoStable selected-record identifiers retained during content retrieval.
retrievalNoSame-tool retrieval instruction.
truncatedNoFurther whole member results remain.
provenanceNoSelected response provenance retained during content retrieval; source notices remain in the reconstructed payload.
totalCountNoSource total before paging.
contentPageNoLossless recursive content continuation.
collectionPageNoCollection continuation; reconstruct the outlined selected payload before following it.
requestedLimitNoOriginal request when capped.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed26 schema fields changed
    • addedOutput schema / $defs
      Added value: +{
      +  "MemberLink": {
      +    "additionalProperties": false,
      +    "description": "Published relationship link; href may be relative.",
      +    "properties": {
      +      "href": {
      +        "description": "Published source text; null or omitted means unavailable.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "method": {
      +        "description": "Published source text; null or omitted means unavailable.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "rel": {
      +        "description": "Published source text; null or omitted means unavailable.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "Page": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "hasMore": {
      +        "description": "Further collection items remain.",
      +        "type": "boolean"
      +      },
      +      "nextCursor": {
      +        "description": "Opaque collection continuation; repeat the same filters.",
      +        "type": "string"
      +      },
      +      "returned": {
      +        "description": "Whole items emitted on this page.",
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "total": {
      +        "description": "Total supplied by the source or fully read local collection.",
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "returned",
      +      "hasMore"
      +    ],
      +    "type": "object"
      +  },
      +  "Source": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "api": {
      +        "description": "Official API namespace.",
      +        "enum": [
      +          "bills",
      +          "members",
      +          "commons_votes",
      +          "lords_votes",
      +          "hansard",
      +          "questions",
      +          "committees"
      +        ],
      +        "type": "string"
      +      },
      +      "licenceUrl": {
      +        "description": "Open Parliament Licence HTTPS URL; its exclusions still apply.",
      +        "type": "string"
      +      },
      +      "notices": {
      +        "description": "Source-specific notices.",
      +        "items": {
      +          "description": "Source notice preserved verbatim.",
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "retrievedAt": {
      +        "description": "Response retrieval time in ISO 8601 UTC.",
      +        "format": "date-time",
      +        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
      +        "type": "string"
      +      },
      +      "url": {
      +        "description": "Actual official HTTPS request URL.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "api",
      +      "url",
      +      "retrievedAt",
      +      "licenceUrl"
      +    ],
      +    "type": "object"
      +  }
      +}
    • changedOutput schema / properties / cap / description
      Previous value: -"Effective member workload cap."New value: +"Member page-size ceiling; a larger limit is clamped to it."
    • addedOutput schema / properties / collectionPage / $ref
      Added value: +"#/$defs/Page"
    • removedOutput schema / properties / collectionPage / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / collectionPage / properties
      Removed value: -{
      -  "hasMore": {
      -    "description": "Further collection items remain.",
      -    "type": "boolean"
      -  },
      -  "nextCursor": {
      -    "description": "Opaque collection continuation; repeat the same filters.",
      -    "type": "string"
      -  },
      -  "returned": {
      -    "description": "Whole items emitted on this page.",
      -    "maximum": 9007199254740991,
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  "total": {
      -    "description": "Total supplied by the source or fully read local collection.",
      -    "maximum": 9007199254740991,
      -    "minimum": 0,
      -    "type": "integer"
      -  }
      -}
    • removedOutput schema / properties / collectionPage / required
      Removed value: -[
      -  "returned",
      -  "hasMore"
      -]
    • removedOutput schema / properties / collectionPage / type
      Removed value: -"object"
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `queue_full`: The selected Parliament origin has two active requests and 32 queued requests. `http_invalid_params`: The official API returned HTTP 400 for this request. `http_unauthorized`: The official public API returned HTTP 401. `http_forbidden`: The official public API returned HTTP 402 or 403. `http_conflict`: The official API returned HTTP 409, 423 or 424. `http_rate_limited`: The official API returned HTTP 429 after bounded retry handling. `http_invalid_request`: The official API returned an unexpected redirect or another unsupported HTTP client response. `invalid_mode_arguments`: Historical search is combined with unsupported filters. `invalid_cursor`: A collection or content cursor is invalid or belongs to different filters. `source_changed`: Selected source records changed during content retrieval. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `queue_full`: The selected Parliament origin has two active requests and 32 queued requests. `http_invalid_params`: The official API returned HTTP 400 for this request. `http_unauthorized`: The official public API returned HTTP 401. `http_forbidden`: The official public API returned HTTP 402 or 403. `http_conflict`: The official API returned HTTP 409, 423 or 424. `http_rate_limited`: The official API returned HTTP 429 after bounded retry handling. `http_invalid_request`: The official API returned an unexpected redirect or another unsupported HTTP client response. `invalid_mode_arguments`: Historical search is combined with unsupported filters. `invalid_cursor`: A collection or content cursor is invalid or belongs to different filters. `source_changed`: Selected source records changed during content retrieval. `call_deadline_exceeded`: The 45-second call deadline elapsed before the official API answered. `http_server_error`: The official API returned an HTTP 5xx server error. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "queue_full",
      -  "http_invalid_params",
      -  "http_unauthorized",
      -  "http_forbidden",
      -  "http_conflict",
      -  "http_rate_limited",
      -  "http_invalid_request",
      -  "invalid_mode_arguments",
      -  "invalid_cursor",
      -  "source_changed"
      -]New value: +[
      +  "queue_full",
      +  "http_invalid_params",
      +  "http_unauthorized",
      +  "http_forbidden",
      +  "http_conflict",
      +  "http_rate_limited",
      +  "http_invalid_request",
      +  "invalid_mode_arguments",
      +  "invalid_cursor",
      +  "source_changed",
      +  "call_deadline_exceeded",
      +  "http_server_error"
      +]
    • changedOutput schema / properties / items / items / properties / latestHouseMembership / description
      Previous value: -"Latest source membership, not a guaranteed as-of snapshot."New value: +"Source House membership: latest on a profile or search, the one held on the date on an asOf search."
    • changedOutput schema / properties / items / items / properties / latestParty / description
      Previous value: -"Latest source party, possibly unknown in historical results."New value: +"Source party: current on a profile or search, held on the date on an asOf search; possibly unknown in historical results."
    • changedOutput schema / properties / items / items / properties / links / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "additionalProperties": false,
      -      "description": "Published relationship link; href may be relative.",
      -      "properties": {
      -        "href": {
      -          "description": "Published source text; null or omitted means unavailable.",
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "method": {
      -          "description": "Published source text; null or omitted means unavailable.",
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "rel": {
      -          "description": "Published source text; null or omitted means unavailable.",
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "$ref": "#/$defs/MemberLink"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / items / items / properties / source
      Removed value: -{
      -  "additionalProperties": false,
      -  "description": "Actual search provenance.",
      -  "properties": {
      -    "api": {
      -      "description": "Official API namespace.",
      -      "enum": [
      -        "bills",
      -        "members",
      -        "commons_votes",
      -        "lords_votes",
      -        "hansard",
      -        "questions",
      -        "committees"
      -      ],
      -      "type": "string"
      -    },
      -    "licenceUrl": {
      -      "description": "Open Parliament Licence HTTPS URL; its exclusions still apply.",
      -      "type": "string"
      -    },
      -    "notices": {
      -      "description": "Source-specific notices.",
      -      "items": {
      -        "description": "Source notice preserved verbatim.",
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    "retrievedAt": {
      -      "description": "Response retrieval time in ISO 8601 UTC.",
      -      "format": "date-time",
      -      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
      -      "type": "string"
      -    },
      -    "url": {
      -      "description": "Actual official HTTPS request URL.",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "api",
      -    "url",
      -    "retrievedAt",
      -    "licenceUrl"
      -  ],
      -  "type": "object"
      -}
    • changedOutput schema / properties / items / items / required
      Previous value: -[
      -  "id",
      -  "memberId",
      -  "source",
      -  "detailLevel"
      -]New value: +[
      +  "id",
      +  "memberId",
      +  "detailLevel"
      +]
    • addedOutput schema / properties / page / $ref
      Added value: +"#/$defs/Page"
    • removedOutput schema / properties / page / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / page / properties
      Removed value: -{
      -  "hasMore": {
      -    "description": "Further collection items remain.",
      -    "type": "boolean"
      -  },
      -  "nextCursor": {
      -    "description": "Opaque collection continuation; repeat the same filters.",
      -    "type": "string"
      -  },
      -  "returned": {
      -    "description": "Whole items emitted on this page.",
      -    "maximum": 9007199254740991,
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  "total": {
      -    "description": "Total supplied by the source or fully read local collection.",
      -    "maximum": 9007199254740991,
      -    "minimum": 0,
      -    "type": "integer"
      -  }
      -}
    • removedOutput schema / properties / page / required
      Removed value: -[
      -  "returned",
      -  "hasMore"
      -]
    • removedOutput schema / properties / page / type
      Removed value: -"object"
    • changedOutput schema / properties / provenance / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "description": "Complete official request provenance.",
      -    "properties": {
      -      "api": {
      -        "description": "Official API namespace.",
      -        "enum": [
      -          "bills",
      -          "members",
      -          "commons_votes",
      -          "lords_votes",
      -          "hansard",
      -          "questions",
      -          "committees"
      -        ],
      -        "type": "string"
      -      },
      -      "licenceUrl": {
      -        "description": "Open Parliament Licence HTTPS URL; its exclusions still apply.",
      -        "type": "string"
      -      },
      -      "notices": {
      -        "description": "Source-specific notices.",
      -        "items": {
      -          "description": "Source notice preserved verbatim.",
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "retrievedAt": {
      -        "description": "Response retrieval time in ISO 8601 UTC.",
      -        "format": "date-time",
      -        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
      -        "type": "string"
      -      },
      -      "url": {
      -        "description": "Actual official HTTPS request URL.",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "api",
      -      "url",
      -      "retrievedAt",
      -      "licenceUrl"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "description": "Compact provenance with a pointer to the complete request source.",
      -    "properties": {
      -      "api": {
      -        "description": "Official API namespace.",
      -        "enum": [
      -          "bills",
      -          "members",
      -          "commons_votes",
      -          "lords_votes",
      -          "hansard",
      -          "questions",
      -          "committees"
      -        ],
      -        "type": "string"
      -      },
      -      "contentPath": {
      -        "description": "RFC 6901 pointer to full source provenance in the reconstructable payload.",
      -        "type": "string"
      -      },
      -      "licenceUrl": {
      -        "description": "Open Parliament Licence URL.",
      -        "type": "string"
      -      },
      -      "origin": {
      -        "description": "Official origin only; the full request URL is at contentPath.",
      -        "type": "string"
      -      },
      -      "retrievedAt": {
      -        "description": "Response retrieval time.",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "api",
      -      "origin",
      -      "retrievedAt",
      -      "licenceUrl",
      -      "contentPath"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "$ref": "#/$defs/Source",
      +    "description": "Complete official request provenance."
      +  },
      +  {
      +    "additionalProperties": false,
      +    "description": "Compact provenance with a pointer to the complete request source.",
      +    "properties": {
      +      "api": {
      +        "description": "Official API namespace.",
      +        "enum": [
      +          "bills",
      +          "members",
      +          "commons_votes",
      +          "lords_votes",
      +          "hansard",
      +          "questions",
      +          "committees"
      +        ],
      +        "type": "string"
      +      },
      +      "contentPath": {
      +        "description": "RFC 6901 pointer to full source provenance in the reconstructable payload.",
      +        "type": "string"
      +      },
      +      "licenceUrl": {
      +        "description": "Open Parliament Licence URL.",
      +        "type": "string"
      +      },
      +      "origin": {
      +        "description": "Official origin only; the full request URL is at contentPath.",
      +        "type": "string"
      +      },
      +      "retrievedAt": {
      +        "description": "Response retrieval time.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "api",
      +      "origin",
      +      "retrievedAt",
      +      "licenceUrl",
      +      "contentPath"
      +    ],
      +    "type": "object"
      +  }
      +]
    • addedOutput schema / properties / source / $ref
      Added value: +"#/$defs/Source"
    • removedOutput schema / properties / source / additionalProperties
      Removed value: -false
    • changedOutput schema / properties / source / description
      Previous value: -"Actual official search request."New value: +"Actual official search request; provenance for every item on the page."
    • removedOutput schema / properties / source / properties
      Removed value: -{
      -  "api": {
      -    "description": "Official API namespace.",
      -    "enum": [
      -      "bills",
      -      "members",
      -      "commons_votes",
      -      "lords_votes",
      -      "hansard",
      -      "questions",
      -      "committees"
      -    ],
      -    "type": "string"
      -  },
      -  "licenceUrl": {
      -    "description": "Open Parliament Licence HTTPS URL; its exclusions still apply.",
      -    "type": "string"
      -  },
      -  "notices": {
      -    "description": "Source-specific notices.",
      -    "items": {
      -      "description": "Source notice preserved verbatim.",
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  "retrievedAt": {
      -    "description": "Response retrieval time in ISO 8601 UTC.",
      -    "format": "date-time",
      -    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
      -    "type": "string"
      -  },
      -  "url": {
      -    "description": "Actual official HTTPS request URL.",
      -    "type": "string"
      -  }
      -}
    • removedOutput schema / properties / source / required
      Removed value: -[
      -  "api",
      -  "url",
      -  "retrievedAt",
      -  "licenceUrl"
      -]
    • removedOutput schema / properties / source / type
      Removed value: -"object"
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Goes beyond the readOnly/openWorld/idempotent annotations by disclosing that results preserve latest profile fields even when searching historical membership, and that asOf suppresses House, party and location filtering. Cursor mechanics and the oversized-record path add real behavioral context. Minor gap: it does not state result volume or ordering expectations beyond the cap mentioned in the schema.

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?

Front-loads the core purpose in one sentence, then adds constraint and pagination guidance in short declarative clauses with no filler. The telegraphic style ("asOf selects historical membership and accepts name only") is dense but every sentence carries distinct information.

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 9-parameter search tool with a full output schema and annotations, the description covers the moments an agent needs to decide and invoke correctly: filter interactions, historical mode restrictions, retrieval follow-up, and both cursor types. Return-value explanation is rightly omitted since an output schema exists.

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 100%, so baseline is 3; the description earns above that by clarifying the interaction between asOf and the other filters and by explaining that contentCursor exists for oversized records, not ordinary paging. It also clarifies that location/constituency is textual rather than exact-match and that currentOnly=false spans both current and former members.

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?

States a specific verb and resource ("Find MPs and peers") plus the full facet set it searches on: name, location/constituency, party, House, and current vs historical membership. It also explicitly separates itself from ukparl_get_member, which is named as the tool for retrieving full profile sections rather than searching.

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?

Gives concrete selection rules: currentOnly=false for former members, asOf for historical membership with the restriction that it accepts name only, and ukparl_get_member for full sections. It also states the operational procedure for pagination — follow opaque cursors with unchanged filters, use contentCursor for oversized records — so the agent knows both when and how to use it.

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.