Skip to main content
Glama

gb_search

Read-onlyIdempotent

Search UK legislation on legislation.gov.uk by text, year, and document type, returning ELI URIs, citations, and source URLs for verification.

Instructions

Search UK legislation on legislation.gov.uk.

Maps to the official Atom search feed (/all/data.feed or /{doc_type}/data.feed, optionally with ?text=...&year=...&page=...). Each item gets eli_uri, human_readable_citation, source_url (per Art. 4 CONSTITUTION).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes``SearchQuery`` - text, doc_type (e.g. 'ukpga', 'uksi', 'asp'), year, page.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsNo
query_echoNo
dataset_noteNolegislation.gov.uk has no native /eli/ namespace; eli_uri carries the UK's own persistent identifier URI (id.../{type}/{year}/{number}) instead of a fabricated ELI path. Revised ('as amended') text reflects the effective date shown in restrict_start_date; always check for in-force / pending amendments.
total_estimateYes
Behavior4/5

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

Annotations already cover readOnly, idempotent, openWorld, and non-destructive hints. The description adds useful behavioral context: it maps to the Atom feed endpoint, lists how query parameters are used, and specifies that each item includes eli_uri, human_readable_citation, and source_url. This goes beyond the annotations, though the 'per Art. 4 CONSTITUTION' is cryptic but not misleading.

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?

The description is two sentences and front-loaded with the core purpose. The second sentence packs technical detail about mapping and return fields. However, 'per Art. 4 CONSTITUTION' is obscure and might distract, slightly reducing clarity. Overall, it is fairly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity, existing annotations, and presence of an output schema, the description provides adequate context. It fully explains the tool's scope and the source mapping. It does not elaborate on pagination or error behavior, but these are not critical given the annotations and output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the query object already documented. The description mentions the Atom feed query parameters (?text=...&year=...&page=...), but this largely mirrors the schema. It adds minimal meaning beyond what the schema provides, so the baseline of 3 applies.

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?

The description clearly states 'Search UK legislation on legislation.gov.uk' — a specific verb, resource, and platform. It distinguishes from sibling search tools like gb_search_case_law and gb_search_govuk by explicitly focusing on legislation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The context of use is clear (searching UK legislation), but there are no explicit exclusions or alternative recommendations. The description doesn't mention when to use this tool instead of sibling search tools, so usage guidance is implied rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/matematicsolutions/gb-eli-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server