Skip to main content
Glama

uk-parliament-mcp-server

Search written questions

ukparl_search_questions
Read-onlyIdempotent

Search Westminster written questions and answer previews by text, exact UIN, asking or answering member, House, answering body, answer state and dates. An undated UIN returns candidates across sessions; narrow with tabling dates and retrieve mode=detail with a returned questionId for complete question and answer HTML, corrections and attachment links. A UIN is not a questionId and never determines House. Search includes all sessions and withdrawn questions. Follow collection cursors unchanged; use contentCursor for lossless oversized answers.

Input Schema

NameRequiredDescriptionDefault
uinNoExact UIN lookup string, such as 36068 or HL1234; preserves leading zeros. Search only; combine with tabling dates to narrow reused UINs.
modeNoSearch previews or retrieve one complete question.search
houseNoCommons or Lords; search only.
limitNoSearch page size, default 10, cap 20; larger safe integers are capped. Omit in detail.
queryNoQuestion or answer content terms; search only.
cursorNoOpaque search continuation; repeat unchanged filters.
answeredNoTrue answered, false unanswered, omission either; search only.
memberIdNoAsking Members API ID; search only.
tabledToNoInclusive tabling end YYYY-MM-DD; search only.
answeredToNoInclusive answer end YYYY-MM-DD; search only.
questionIdNoPositive decimal Questions API ID required in detail; UIN is not this ID.
tabledFromNoInclusive tabling start YYYY-MM-DD; search only.
answeredFromNoInclusive answer start YYYY-MM-DD; search only.
contentCursorNoOpaque lossless content continuation for this same selection.
answeringBodyIdsNoUp to 20 answering-body IDs resolved through ukparl_lookup_reference; search only.
answeringMemberIdNoAnswering Members API ID; search only, independent of asking memberId.

Output Schema

NameRequiredDescriptionDefault
capNoEffective search page-size cap.
modeNoSelected question operation.
pageNoWhole-question search continuation.
errorNoPresent when the call failed. Absent on success.
foundNoDetail lookup success; false requires guidance.
itemsNoSelected search page; never automatically hydrated.
shownNoActually emitted whole search results.
totalNoUpstream total when known.
noticeNoLicence, preview and workload notices.
recordNoComplete selected question including answer HTML and attachments metadata.
sourceNoActual selected official request.
appliedNoEffective filters, explicit upstream scope and date semantics.
filtersNoComplete normalized selection filters.
deliveryNoFull selected payload, child outline, or JSON fragment.
guidanceNoSame-tool recovery for missing or empty selections.
identityNoStable selected-record identifiers retained during content retrieval.
retrievalNoSame-tool retrieval instruction.
truncatedNoFurther whole search results remain.
provenanceNoSelected response provenance retained during content retrieval; source notices remain in the reconstructed payload.
questionIdNoSelected Questions API ID.
contentPageNoLossless recursive content continuation.
collectionPageNoCollection continuation; reconstruct the outlined selected payload before following it.
requestedLimitNoOriginal page-size request when capped.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/openWorld, and the description adds real behavior beyond them: search spans all sessions and includes withdrawn questions, undated UIN lookups are ambiguous and return multiple candidates, and contentCursor exists for lossless oversized answers. It does not discuss error behavior or result ordering, but the scope and cursor semantics are meaningful disclosures.

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-loaded with purpose and facets, then moom into mode/UIN and cursor rules with no filler sentences. Dense but each clause carries an operational instruction; slightly packed, with four distinct rules in the middle sentence.

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 16 optional parameters, two modes, an output schema and complex cursor/pagination behavior, the description covers what an agent needs: how to pick a mode, how to disambiguate UINs, how to handle paging, and where to get full content. Output format details are correctly left to the output 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?

With 100% schema coverage the baseline is 3, but the description adds semantics the schema alone does not convey: the UIN/questionId distinction, that a UIN never determines House, and that answeringMemberId is independent of memberId. Cursor handling (follow collection cursors unchanged, use contentCursor for oversized answers) further clarifies two of the parameters.

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?

Names a specific verb and resource ('Search Westminster written questions and answer previews') and enumerates the searchable facets: text, UIN, asking/answering member, House, answering body, answer state and dates. It also distinguishes the detail mode, which separates it from the pure search siblings like ukparl_search_hansard.

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 explicit operational guidance: an undated UIN returns candidates across sessions, so narrow with tabling dates; switch to mode=detail with a returned questionId for full HTML, corrections and attachments. It also states the exclusion rule that a UIN is not a questionId and never determines House, and gives cursor handling instructions.

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.