Skip to main content
Glama

Resolve a legislation citation

uklaw_lookup_citation
Read-onlyIdempotent

Resolve a citation or short title to the canonical legislation.gov.uk item and provision: "Data Protection Act 2018 s. 45", "2018 c. 12", "S.I. 2019/419", "S.S.I. 2020/123", "S.R. 2020/12", "2020 asp 13", "Regulation (EU) 2016/679 art. 28", a legislation.gov.uk URI, or a short title. Returns the item path to pass to uklaw_get_document, and when a provision is given, whether it exists in the current version. A miss or an ambiguous title is a result with found false plus guidance or candidates, not an error. To find legislation by topic or by partial title words rather than a known citation, use uklaw_search_legislation.

Input Schema

NameRequiredDescriptionDefault
citationYesA citation ("2018 c. 12", "S.I. 2019/419 reg. 5", "Regulation (EU) 2016/679 art. 28"), a short title ("Data Protection Act 2018 s. 45(2)(f)"), or a legislation.gov.uk URI. uklaw_list_reference topic citation_formats lists the accepted forms.

Output Schema

NameRequiredDescriptionDefault
itemNoCanonical item path, e.g. ukpga/2018/12 — pass to uklaw_get_document; present when found.
typeNoCanonical type code (a Welsh SI cited as uksi comes back as wsi); present when found.
yearNoCalendar year of the item; absent when not known, e.g. a regnal-year item resolved from its path.
errorNoPresent when the call failed. Absent on success.
foundNoTrue when the citation resolved to exactly one item.
titleNoItem title; absent when it could not be fetched within the call.
id_uriNoCanonical identifier URI of the item; present when found.
numberNoItem number within the year; present when found.
parsedNoThe citation as the parser read it.
guidanceNoWhat to do next after a miss, ambiguity, or a check that could not run.
title_cyNoWelsh title, for bilingual items.
made_dateNoDate enacted or made (YYYY-MM-DD); absent when not fetched or not reported.
candidatesNoCandidate items (at most 20) when the citation is ambiguous.
type_labelNoHuman label of the type; present when found.
attributionNoAttribution lines the returned content requires (OGL always; EU and Westlaw credits when applicable).
document_uriNolegislation.gov.uk page for the item; present when found.
provision_uriNoIdentifier URI of that provision, alongside provision_path.
provision_pathNoProvision path the citation named, when it named one and the item was found.
provision_foundNoWhether the provision exists in the current version; absent when the check could not run.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/openWorld annotations, it discloses the failure contract that an agent most needs: a miss or ambiguous title returns a result with found=false plus guidance or candidates rather than an error, and provision lookups report whether the provision exists in the current version. This is genuine behavioral information not inferable from the structured fields.

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?

Front-loaded with the action and the accepted formats, then the return value, then the error semantics, then the routing alternative — a sensible order. The example list is long, but each example covers a distinct citation family rather than being filler.

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 single-parameter, read-only public lookup with an output schema, the description supplies the accepted input grammar, the return shape (item path plus provision existence), the non-error failure behavior, and the sibling alternative. Nothing material is missing.

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% and the parameter is documented there, so the baseline is 3, but the description adds accepted citation families beyond the schema examples (S.S.I., S.R., asp) and cross-references uklaw_list_reference topic citation_formats for the full grammar.

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 opens with a specific verb and resource ("Resolve a citation or short title to the canonical legislation.gov.uk item and provision") and enumerates the exact input forms it accepts. It is clearly distinguishable from the sibling uklaw_search_legislation, which is named as the topic-based alternative.

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?

It states both the when-to-use condition (you already have a citation, short title, or URI) and the when-not-to-use condition ("To find legislation by topic or by partial title words rather than a known citation, use uklaw_search_legislation"). It also names the downstream step, passing the returned item path to uklaw_get_document.

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.