ukleg.legislation.search
Search the UK statute book (legislation.gov.uk) for Acts of Parliament, Statutory Instruments, and other UK legislation by title keywords, type, and year. Returns matching legislation items with title, type (e.g. UK Public General Act), year, chapter number, description/long title, enactment date...
This record as markdown: /tools/io-github-whiteknightonhorse-apibase/ukleg.legislation.search.md
What ukleg.legislation.search does on Apibase
AI agents call ukleg.legislation.search to retrieve information from Apibase without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | — | Page number for pagination (default 1, 20 results per page). |
type | string | — | Legislation type code. Common values: ukpga (UK Public General Acts), uksi (UK Statutory Instruments), asp (Scottish Parliament Acts), asc (Acts of Senedd Cymru |
year | integer | — | Year the legislation was enacted (e.g. 2008, 2018). Supports years from 1267 to present. |
title | string | — | Search term for the legislation title (e.g. "climate change", "data protection", "companies"). At least one of title, year, or type should be provided. |
Parameters from the server's own tool schema.
Why ukleg.legislation.search is rated Low
Queries public legislative data without side effects or access to sensitive information systems.
From the tool's definition Search the UK statute book for Acts of Parliament, returns matching legislation items with metadata and URLs.
Attacks that exploit this kind of access
The rule that runs ukleg.legislation.search safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Apibase, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For ukleg.legislation.search, this is the rule to start with:
ukleg.legislation.search is read-only, so it stays allowed. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Apibase, apply this rule, and every ukleg.legislation.search call is checked against it from then on.
Questions about ukleg.legislation.search
Search the UK statute book (legislation.gov.uk) for Acts of Parliament, Statutory Instruments, and other UK legislation by title keywords, type, and year. Returns matching legislation items with title, type (e.g. UK Public General Act), year, chapter number, description/long title, enactment date, subject categories, and direct URL to the full text. Supports all UK jurisdictions: England, Wales, Scotland (Scottish Parliament Acts), and Northern Ireland. Common types: ukpga (UK Public General Acts — major Acts of Parliament), uksi (UK Statutory Instruments), asp (Acts of the Scottish Parliament), asc (Acts of Senedd Cymru), nia (Northern Ireland Assembly Acts). Results are paginated (20 per page). Use page parameter to navigate. Data source: legislation.gov.uk — The National Archives, Open Government Licence v3.0, no auth required. It is categorised as a Read tool in the Apibase MCP Server, which means it retrieves data without modifying state.
ukleg.legislation.search accepts 4 parameters: page, type, year, title. The full parameter table on this page comes from the server's own tool schema.
Register the Apibase MCP server in PolicyLayer and add a rule for ukleg.legislation.search: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Apibase. Nothing to install.
ukleg.legislation.search is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the ukleg.legislation.search rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for ukleg.legislation.search. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
ukleg.legislation.search is provided by the Apibase MCP server (apibase-mcp-client). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Apibase, and thousands of servers like it.
This server
Across the catalogue