search_hansard
Pack: uk-parliament · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)
No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/search_hansard for the schema, then POST the same URL with its arguments for the data.
Search debate contributions in Hansard.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | Full-text query |
house | string | no | Commons | Lords |
date_from | string | no | YYYY-MM-DD |
date_to | string | no | YYYY-MM-DD |
member_id | number | no | Filter by contribution member id |
take | number | no | 1-20 (default 20) |
skip | number | no | 0-based offset |
Example call
Arguments
{
"query": "climate change",
"house": "Commons"
}
curl
curl -X POST https://gateway.pipeworx.io/uk-parliament/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_hansard","arguments":{"query":"climate change","house":"Commons"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('search_hansard', {
"query": "climate change",
"house": "Commons"
});
More examples
{
"query": "NHS funding",
"house": "Lords",
"date_from": "2024-01-01",
"date_to": "2024-12-31",
"take": 15
}
Response shape
| Field | Type | Description |
|---|---|---|
SearchTerms | array | |
SpokenResultCount | number | |
WrittenResultCount | number | |
CorrectionsResultCount | number | |
DivisionsResultCount | number | |
Results | array | |
TotalResultCount | number |
Full JSON Schema
{
"type": "object",
"properties": {
"SearchTerms": {
"type": "array",
"items": {
"type": "string"
}
},
"SpokenResultCount": {
"type": "number"
},
"WrittenResultCount": {
"type": "number"
},
"CorrectionsResultCount": {
"type": "number"
},
"DivisionsResultCount": {
"type": "number"
},
"Results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"MemberName": {
"type": "string"
},
"MemberId": {
"type": "number"
},
"AttributedTo": {
"type": "string"
},
"ItemId": {
"type": "number"
},
"ContributionExtId": {
"type": "string"
},
"ContributionText": {
"type": "string"
},
"ContributionTextFull": {
"type": "string"
},
"HRSTag": {
"type": "string"
},
"HansardSection": {
"type": "string"
},
"Timecode": {
"type": [
"string",
"null"
]
},
"DebateSection": {
"type": "string"
},
"DebateSectionId": {
"type": "number"
},
"DebateSectionExtId": {
"type": "string"
},
"SittingDate": {
"type": "string"
},
"Section": {
"type": "string"
},
"House": {
"type": "string"
},
"OrderInDebateSection": {
"type": "number"
},
"DebateSectionOrder": {
"type": "number"
},
"Rank": {
"type": "number"
}
}
}
},
"TotalResultCount": {
"type": "number"
}
},
"description": "Search results for Hansard debate contributions"
}
Connect
Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:
{
"mcpServers": {
"pipeworx": {
"url": "https://pipeworx.io/mcp"
}
}
}
Connect to just the uk-parliament pack
{
"mcpServers": {
"uk-parliament": {
"url": "https://gateway.pipeworx.io/uk-parliament/mcp"
}
}
}
See Getting Started for client-specific install steps.