Skip to main content
Glama

uk-parliament-mcp-server

Search written statements

ukparl_search_statements
Read-onlyIdempotent

Search Westminster written ministerial statements by text, exact UIN, minister, House, answering body and date made. Search returns plain-text previews; retrieve mode=detail with a returned statementId for the complete HTML. A UIN such as HLWS419 is reused across sessions: narrow it with madeFrom/madeTo. A UIN is not a statementId. Search covers all sessions. A CorrectedAnswer link carries a written-question questionId for ukparl_search_questions mode=detail. Follow collection cursors unchanged; use contentCursor for lossless oversized statements.

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_statements"
  }
}

Input Schema

NameRequiredDescriptionDefault
uinNoExact statement UIN, such as HLWS419 or HCWS416, case-insensitive. Search only; combine with madeFrom/madeTo to narrow reused UINs.
modeNoSearch previews or retrieve one complete statement.search
houseNoCommons or Lords; search only.
limitNoSearch page size, default 10, cap 100; larger safe integers are capped. Omit in detail.
queryNoStatement title or text terms; search only.
cursorNoOpaque search continuation; repeat unchanged filters.
madeToNoInclusive end YYYY-MM-DD of the date made; search only.
madeFromNoInclusive start YYYY-MM-DD of the date made; search only.
memberIdNoMembers API ID of the minister making the statement; search only.
statementIdNoPositive decimal statement ID required in detail; UIN is not this ID.
contentCursorNoOpaque lossless content continuation for this same selection.
answeringBodyIdsNoUp to 20 answering-body IDs resolved through ukparl_lookup_reference, matching any; search only.

Output Schema

NameRequiredDescriptionDefault
capNoSearch page-size ceiling; a larger limit is clamped to it.
modeNoSelected statement operation.
pageNoWhole-statement 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 statement including source HTML and attachment 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.
contentPageNoLossless recursive content continuation.
statementIdNoSelected statement ID.
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. Added

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare readOnly/openWorld/idempotent; the description adds substantive behavior: previews vs full HTML per mode, cross-session UIN reuse, coverage across all sessions, cursors to be replayed with unchanged filters, and contentCursor as the lossless path for oversized statements. None of this is derivable from the 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?

Six short sentences, front-loaded with the searchable facets, then the mode split, then the two highest-risk gotchas (UIN reuse, UIN ≠ statementId), then cursor handling. No sentence is redundant and the ordering matches the order an agent needs the 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 12-parameter, dual-mode tool with an output schema, the description covers the mode contract, identifier pitfalls, pagination/cursor discipline, and the cross-tool handoff. Everything an agent must know to invoke it correctly is present; return-value shape is 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?

Schema coverage is already 100%, so the baseline is 3; the description still adds real semantics beyond the schema by explaining UIN reuse and the madeFrom/madeTo narrowing pattern, and by distinguishing contentCursor (lossless oversized content) from cursor (search continuation). It does not, however, explain the answeringBodyIds lookup workflow in depth beyond naming ukparl_lookup_reference.

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 ('Search Westminster written ministerial statements') and enumerates the exact searchable facets: text, exact UIN, minister, House, answering body, date made. The resource is distinct from sibling searches (questions, bills, divisions, hansard), so an agent can route without opening the schema.

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?

Explicitly separates the two modes ('Search returns plain-text previews; retrieve mode=detail with a returned statementId'), warns that a UIN is reused across sessions and must be narrowed with madeFrom/madeTo, and states 'A UIN is not a statementId'. It also routes to a sibling ('A CorrectedAnswer link carries a written-question questionId for ukparl_search_questions mode=detail') and instructs how to follow cursors.

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.