Skip to main content
Glama

uk-parliament-mcp-server

Ukparl Lookup Reference

ukparl_lookup_reference
Read-onlyIdempotent

Resolve Parliament filter IDs and inspect source coverage before searching. Use identifiers for ID namespaces and required selectors, coverage for Hansard date limitations, or a named reference topic for filter IDs. Follow opaque collection cursors with the same filters; use contentCursor to reconstruct an oversized selected payload.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "topic": "<topic>"
    },
    "name": "ukparl_lookup_reference"
  }
}

Input Schema

NameRequiredDescriptionDefault
houseNoCommons or Lords; required for active parties.
limitNoRequested whole reference rows; positive safe integer, default 10, effective cap 20.
topicYesReference topic or static identifier/coverage guide.
cursorNoOpaque collection cursor; repeat the same normalized filters.
nameContainsNoCase-insensitive AND tokens over the complete named reference set.
contentCursorNoOpaque same-selection recursive content continuation.

Output Schema

NameRequiredDescriptionDefault
capNoMode cap, the most whole reference rows one call can return (20); the effective limit is applied.limit.
pageNoWhole reference-row pagination.
errorNoPresent when the call failed. Absent on success.
itemsNoComplete named reference rows in the selected page.
shownNoActual whole reference rows selected for delivery.
topicNoSelected reference topic on a full payload.
noticeNoLicence, coverage and workload notices.
appliedNoNormalized selection applied by this call.
sourcesNoAll requests that supplied the complete reference set.
coverageNoStatic typed historical coverage facts and official sources.
deliveryNoFull selected payload, child outline, or JSON fragment.
identityNoStable selected-record identifiers retained during content retrieval.
retrievalNoSame-tool retrieval instruction.
truncatedNoFurther reference rows remain after the selected page.
provenanceNoSelected response provenance retained during content retrieval; source notices remain in the reconstructed payload.
totalCountNoKnown complete selected guide or reference row count.
contentPageNoLossless recursive content continuation.
identifiersNoStatic typed identifier namespaces and supported selections.
nameContainsNoComplete normalized AND-token filter, retained through content continuation.
collectionPageNoCollection continuation; reconstruct the outlined selected payload before following it.
requestedLimitNoCaller limit before an effective cap was applied.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `invalid_mode_arguments`: A static topic has live filters, parties lacks House, or another topic has House. `http_invalid_params`: The official reference API rejects request parameters. `http_unauthorized`: The official reference API requires authorization unexpectedly. `http_forbidden`: The official reference API denies access. `http_conflict`: The official reference API reports a conflicting request state. `http_rate_limited`: The official reference API returned HTTP 429 after bounded retry handling. `queue_full`: The Bills or Members reference origin request queue is full. `call_deadline_exceeded`: The 45-second call deadline elapsed before the official reference API answered. `http_server_error`: The official reference API returned an HTTP 5xx server error. `http_invalid_request`: The official reference API rejects the request or redirects it. `invalid_cursor`: A content or collection cursor is malformed or bound to another selection. `source_changed`: The selected normalized payload changed during content continuation. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `invalid_mode_arguments`: A static topic has live filters, parties lacks House, or another topic has House. `http_invalid_params`: The official reference API returned HTTP 400 or 422 for the request parameters. `http_unauthorized`: The official reference API requires authorization unexpectedly. `http_forbidden`: The official reference API denies access. `http_conflict`: The official reference API reports a conflicting request state. `http_rate_limited`: The official reference API returned HTTP 429 after bounded retry handling. `queue_full`: The Bills or Members reference origin request queue is full. `call_deadline_exceeded`: The 45-second call deadline elapsed before the official reference API answered. `http_server_error`: The official reference API returned an HTTP 5xx server error. `http_invalid_request`: The official reference API rejects the request or redirects it. `http_route_missing`: The official reference API returned HTTP 404 for its reference route. `http_timeout`: The official reference API returned HTTP 408 or 425. `upstream_html`: The official reference API returned an HTML page instead of JSON. `upstream_not_json`: The official reference API returned a body that is not JSON. `upstream_contract_mismatch`: Official reference data failed its expected shape or contradicted its own totals. `network_error`: The network connection to the official reference API failed. `invalid_cursor`: A content or collection cursor is malformed or bound to another selection. `source_changed`: The selected normalized payload changed during content continuation. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "invalid_mode_arguments",
      -  "http_invalid_params",
      -  "http_unauthorized",
      -  "http_forbidden",
      -  "http_conflict",
      -  "http_rate_limited",
      -  "queue_full",
      -  "call_deadline_exceeded",
      -  "http_server_error",
      -  "http_invalid_request",
      -  "invalid_cursor",
      -  "source_changed"
      -]New value: +[
      +  "invalid_mode_arguments",
      +  "http_invalid_params",
      +  "http_unauthorized",
      +  "http_forbidden",
      +  "http_conflict",
      +  "http_rate_limited",
      +  "queue_full",
      +  "call_deadline_exceeded",
      +  "http_server_error",
      +  "http_invalid_request",
      +  "http_route_missing",
      +  "http_timeout",
      +  "upstream_html",
      +  "upstream_not_json",
      +  "upstream_contract_mismatch",
      +  "network_error",
      +  "invalid_cursor",
      +  "source_changed"
      +]
  2. Changed21 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 maximum whole reference rows per call."New value: +"Mode cap, the most whole reference rows one call can return (20); the effective limit is applied.limit."
    • 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: `invalid_mode_arguments`: A static topic has live filters, parties lacks House, or another topic has House. `http_invalid_params`: The official reference API rejects request parameters. `http_unauthorized`: The official reference API requires authorization unexpectedly. `http_forbidden`: The official reference API denies access. `http_conflict`: The official reference API reports a conflicting request state. `http_rate_limited`: The official reference API or local origin queue is rate limited. `http_invalid_request`: The official reference API rejects the request or redirects it. `invalid_cursor`: A content or collection cursor is malformed or bound to another selection. `source_changed`: The selected normalized payload changed during content continuation. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `invalid_mode_arguments`: A static topic has live filters, parties lacks House, or another topic has House. `http_invalid_params`: The official reference API rejects request parameters. `http_unauthorized`: The official reference API requires authorization unexpectedly. `http_forbidden`: The official reference API denies access. `http_conflict`: The official reference API reports a conflicting request state. `http_rate_limited`: The official reference API returned HTTP 429 after bounded retry handling. `queue_full`: The Bills or Members reference origin request queue is full. `call_deadline_exceeded`: The 45-second call deadline elapsed before the official reference API answered. `http_server_error`: The official reference API returned an HTTP 5xx server error. `http_invalid_request`: The official reference API rejects the request or redirects it. `invalid_cursor`: A content or collection cursor is malformed or bound to another selection. `source_changed`: The selected normalized payload changed during content continuation. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "invalid_mode_arguments",
      -  "http_invalid_params",
      -  "http_unauthorized",
      -  "http_forbidden",
      -  "http_conflict",
      -  "http_rate_limited",
      -  "http_invalid_request",
      -  "invalid_cursor",
      -  "source_changed"
      -]New value: +[
      +  "invalid_mode_arguments",
      +  "http_invalid_params",
      +  "http_unauthorized",
      +  "http_forbidden",
      +  "http_conflict",
      +  "http_rate_limited",
      +  "queue_full",
      +  "call_deadline_exceeded",
      +  "http_server_error",
      +  "http_invalid_request",
      +  "invalid_cursor",
      +  "source_changed"
      +]
    • 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"
      +  }
      +]
    • 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 / sources / items / $ref
      Added value: +"#/$defs/Source"
    • removedOutput schema / properties / sources / items / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / sources / items / 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 / sources / items / required
      Removed value: -[
      -  "api",
      -  "url",
      -  "retrievedAt",
      -  "licenceUrl"
      -]
    • removedOutput schema / properties / sources / items / type
      Removed value: -"object"
  3. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and open-world, so the safety profile is covered. The description adds genuine behaviour beyond that: cursors are opaque and must be replayed with the same filters, and contentCursor exists specifically to reconstruct an oversized selected payload. It does not mention the effective row cap or truncation behaviour, but the pagination model itself is clearly disclosed.

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?

Two sentences, front-loaded with the core purpose before the topic routing and cursor mechanics. Nothing is redundant, though the density of terms like 'ID namespaces', 'required selectors', and 'normalized filters' makes the first read slower than it needs to be.

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?

With an output schema present, the description need not explain return values, and annotations carry the safety profile. What remains is covered: purpose, topic selection, and cursor replay. Only the practical limit behaviour (effective cap of 20 against a requested limit) is left entirely to the schema.

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 coverage is 100%, so the baseline is 3, but the description earns more by explaining what the topic values actually buy the caller (ID namespaces and required selectors versus Hansard date limitations) and by pairing each cursor parameter with its continuation rule. The house, limit, and nameContains parameters get no added meaning in the description, which is the only gap.

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-and-resource pair: 'Resolve Parliament filter IDs and inspect source coverage before searching.' This distinguishes it from the sibling search_* and get_* tools, which retrieve records rather than reference data. The one weakness is that the actual topic values are described obliquely ('a named reference topic') rather than enumerated, so the agent must open the schema to see the full scope.

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?

Explicitly positions the tool temporally ('before searching'), which tells the agent when it is the right call. It then routes within the tool ('identifiers for ID namespaces and required selectors, coverage for Hansard date limitations, or a named reference topic for filter IDs') and gives a continuation rule for cursors. There is no explicit when-not or named alternative, which keeps it short of a 5.

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.