Lex API MCP - UK Legal Research
Measured conclusion: Deep-tested. L2 outcome: tools_ok.
| Access | remote |
|---|---|
| Publisher key required | No |
| Measured state | Deep-tested |
| L1 liveness | alive |
| L1 latency | 318 ms |
| Last measured | 2026-10-26 |
Add to your agent
Copy this into your MCP client config:
{
"mcpServers": {
"Lex API MCP - UK Legal Research": {
"url": "https://lex.lab.i.ai.gov.uk/mcp",
"transport": "streamable-http"
}
}
}
Measured tools (13)
search_for_legislation_sectionsFind text within sections of Acts, SIs, or other legislation types. Use for detailed content searches.
Parameters:
query(required) — string — The natural language query to search for sections of legislation. If empty will return all sections matching filters.size— integer — The number of results to return.offset— integer — The number of results to skip (for pagination).year_to— The ending year for the legislation to filter by. If not provided, no filtering will be applied.year_from— The starting year for the legislation to filter by. If not provided, no filtering will be applied.include_text— boolean — Whether to include full text in results. Set to False for faster performance when only metadata is needed.legislation_id— The legislation_id to search within. Use this if you only want to search within a specific piece of legislation. Accepts both short format (e.g., 'ukpga/1994/13') and full URL format (e.g., 'http://www.legislation.gov.uk/id/ukpga/1994/13'). If not provided, all legislation will be included based on the other filters.legislation_type— The legislation type to filter by. If not provided, all types will be included.legislation_category— The legislation category to filter by. If not provided, all categories will be included.
Hints: read-only not declared · destructive not declared · idempotent not declared · open-world not declared
search_for_legislation_actsFind legislation by title, content, or metadata. Returns full Acts and SIs with match scores.
Parameters:
query(required) — string — The search query - can be a concept, question, or keywords.limit— integer — Number of results to return.offset— integer — Number of results to skip (pagination).year_to— Ending year filter (optional).year_from— Starting year filter (optional).include_text— boolean — Whether to include full section text in results. Set to False for faster performance when only metadata is needed.legislation_type— List of legislation types to filter by (optional).
Hints: read-only not declared · destructive not declared · idempotent not declared · open-world not declared
lookup_legislationRetrieve a single Act or SI using its official citation (e.g. ukpga/2018/12).
Parameters:
legislation_type(required) — string — The specific type of legislationyear(required) — integer — The year the legislation was enacted.number(required) — integer — The number of the legislation.
Hints: read-only not declared · destructive not declared · idempotent not declared · open-world not declared
get_legislation_sectionsRetrieve the complete structure and content of all sections within a piece of legislation.
Parameters:
legislation_id(required) — string — The ID of the legislation to retrieve sections for. Accepts short form (e.g., 'ukpga/1998/42') or full URL.limit— integer — The number of results to return.
Hints: read-only not declared · destructive not declared · idempotent not declared · open-world not declared
get_legislation_full_textRetrieve the full text content of an Act or SI as a single document.
Parameters:
legislation_id(required) — string — The ID of the legislation document. Accepts short form (e.g., 'ukpga/1998/42') or full URL.include_schedules— boolean — Whether to include schedules in the response. If False, only sections are returned. If True, sections are returned first, then schedules. Only request schedules if you are sure you need them.
Hints: read-only not declared · destructive not declared · idempotent not declared · open-world not declared
proxy_legislation_dataProxy endpoint to fetch enriched metadata from legislation.gov.uk. Args: legislation_id: The legislation ID (e.g., "ukpga/2018/12") Returns: HTML content from legislation.gov.uk with CORS headers
Parameters:
legislation_id(required) — string
Hints: read-only not declared · destructive not declared · idempotent not declared · open-world not declared
search_explanatory_noteFind explanatory notes by text content across all legislation types.
Parameters:
size— integer — Maximum number of results to return.query— string — The natural language query to search for explanatory notes. If empty, will return all notes matching the filters.note_type— Filter by note type (overview, policy_background, legal_background, extent, provisions, commencement, related_documents).section_type— Filter by section type (section, schedule, part).legislation_id— Filter by legislation ID to search within a specific piece of legislation. Accepts short form (e.g., 'ukpga/1998/42') or full URL. If not provided, all legislation will be included.
Hints: read-only not declared · destructive not declared · idempotent not declared · open-world not declared
get_explanatory_note_by_legislationRetrieve all explanatory notes associated with a particular Act or SI.
Parameters:
legislation_id(required) — string — The ID of the legislation to look up explanatory notes for. Accepts short form (e.g., 'ukpga/1998/42') or full URL.limit— integer — Maximum number of results to return.
Hints: read-only not declared · destructive not declared · idempotent not declared · open-world not declared
get_explanatory_note_by_sectionRetrieve the explanatory note that explains a particular section of legislation.
Parameters:
legislation_id(required) — string — The ID of the legislation to look up an explanatory note for. Accepts short form (e.g., 'ukpga/1998/42') or full URL.section_number(required) — integer — The section number to look up an explanatory note for.
Hints: read-only not declared · destructive not declared · idempotent not declared · open-world not declared
search_amendmentsFind amendments to Acts and SIs by content, title, or affected legislation.
Parameters:
legislation_id(required) — string — ID of the legislation to search amendments for. Accepts short form (e.g., 'ukpga/1998/42') or full URL.size— integer — Maximum number of results to return.search_amended— boolean — If True, search for amendments made to the legislation. If False, search for amendments made by the legislation.
Hints: read-only not declared · destructive not declared · idempotent not declared · open-world not declared
search_amendment_sectionsFind text within specific sections of legislative amendments.
Parameters:
provision_id(required) — string — ID of the provision/section to search amendments for. Accepts short form (e.g., 'ukpga/1998/42/section/3') or full URL.size— integer — Maximum number of results to return.search_amended— boolean — If True, search for amendments made to the provision. If False, search for amendments made by the provision.
Hints: read-only not declared · destructive not declared · idempotent not declared · open-world not declared
get_live_stats_api_stats_getGet live dataset statistics with 5-minute caching.
Hints: read-only not declared · destructive not declared · idempotent not declared · open-world not declared
health_check_healthcheck_getHealth check with Qdrant connection verification.
Hints: read-only not declared · destructive not declared · idempotent not declared · open-world not declared
Measured by MCPYP probing. Untested fields are omitted, never estimated. Listing is always free; MCPYP never proxies calls or stores user tokens.