get_legislation_metadata
Retrieve structured metadata for a UK legislation document or specific provision without fetching the full text, including title, status, dates, extent, versions, and unapplied effects.
Instructions
Retrieve structured metadata for a UK legislation document or a specific fragment (Part, Chapter, section, etc.). More efficient than fetching the full document when you only need metadata.
type, year, and number must be exact — use search_legislation to confirm if unsure.
Returns JSON with: id, type, year, number, title, status (draft/final/revised/proposed), extent (e.g. ["E","W","S","NI"]), key dates (enactmentDate/madeDate), version (label of the returned representation), pointInTime (requested date, when present), versions (available milestone version labels), and unappliedEffects (amendments enacted but not yet applied to the text).
prospective is true when the response contains provisions not yet in force; version says whether the returned version is itself the prospective one. The field is never false, and it is absent on enacted/made text. A whole document requested without a version holds no provision text, so there its absence doesn't mean there are no prospective provisions.
unappliedEffects and upToDate are only present for the latest version (no version parameter). When a specific version is requested, both fields are omitted — effects are not tracked for point-in-time snapshots. For the latest version, upToDate is true when all in-force effects have been applied, false when some are outstanding.
Fragment: pass a fragment to scope metadata to a specific provision (e.g. "section/12", "part/2/chapter/1"). unappliedEffects and upToDate are scoped to the fragment for both revised and enacted/made legislation. Use get_legislation_table_of_contents to discover valid fragment IDs.
Version: use a date (YYYY-MM-DD) for a point-in-time snapshot, or enacted/made/created/adopted for the original version. The returned version field labels the version returned (for fragments, it may be earlier than the requested pointInTime). The versions field may also contain the label prospective; that label identifies the prospective version, which is fetched by omitting version rather than by passing it.
For response field details, see json://metadata-response. For legislation type codes, see types://guide.
For checking geographical extent, see cookbook://check-extent. For retrieving historical versions, see cookbook://point-in-time-version. For determining whether legislation is up to date and which amendments have yet to be applied, see cookbook://check-outstanding-effects.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"type": "<type>",
"year": "<year>",
"number": "<number>"
},
"name": "get_legislation_metadata"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Type of legislation (e.g., ukpga, uksi, asp, ukla) | |
| year | Yes | Year of enactment. A 4-digit calendar year (e.g., 2020) works for all legislation. For pre-1963 Acts, the canonical identifier uses a regnal year in Reign/Number format (e.g., Vict/63, Geo5/26) — but a calendar year will usually work too, as the API redirects. Use regnal years when you need to disambiguate (a calendar year can span two regnal years). See the years://regnal resource for valid identifiers. | |
| number | Yes | Legislation number (e.g., 2, 1234) | |
| version | No | Optional: Version to retrieve. Use enacted/made/created/adopted for original version, or YYYY-MM-DD for legislation as it stood on that date. Do not use prospective here; when versions ends with prospective, omit version to fetch that version. Dates before first version return an error. | |
| fragment | No | Optional: Fragment identifier to scope metadata to a specific provision (e.g. "section/12", "part/2/chapter/1"). Use get_legislation_table_of_contents to discover valid fragment IDs. | |
| language | No | Optional: Set to "welsh" to retrieve Welsh-language metadata for bilingual legislation (e.g. asc, anaw types). Returns Welsh title, dc:language "cy", and uses WelshApplied status for effects. Defaults to "english". Non-bilingual legislation ignores this parameter. |