Skip to main content
Glama

Track legislation.gov.uk publications

uklaw_track_changes
Read-onlyIdempotent

Read the legislation.gov.uk Publication Log for a date window of up to 31 days: new items, new revised versions, newly recorded effects, and withdrawals, newest first — the compliance-monitoring view of "what changed". Filter by content type, effect direction, category, an item or type/year, first-time items only, or event. With a full item path it reads that item's own log, usually in one call; otherwise it walks the window day by day, newest first, so a broad window may need several calls. A changes event carries no effect detail — uklaw_get_amendments with that item has it. Continue with next_cursor.

Input Schema

NameRequiredDescriptionDefault
itemNoA full item path (ukpga/2018/12) or legislation.gov.uk URI reads that item's own log; a type (uksi) or type and year (uksi/2026) narrows the day walk. Get a full path from uklaw_lookup_citation or uklaw_search_legislation.
eventNoOnly published or only withdrawn events. Omit for both.
limitNoMost events returned by this call (1–80).
cursorNonext_cursor from the previous call, passed with the other inputs unchanged; omit to start from end_date.
categoryNoItem category: primary, secondary, or eu-origin. With content_type legislation or associated-documents only.
end_dateNoLast event date, YYYY-MM-DD; defaults to start_date. The window is at most 31 days.
new_onlyNotrue: only events for items appearing on legislation.gov.uk for the first time.
directionNoWith content_type changes only: effects recorded against (affected) or made by (affecting) the item.
start_dateYesFirst event date of the window, YYYY-MM-DD (UK local time).
content_typeNolegislation (documents published), changes (effects recorded), draft, or associated-documents. Omit for all.

Output Schema

NameRequiredDescriptionDefault
capNoThe limit applied.
daysNoDays touched by a day walk (empty in item-log mode).
modeNoday_walk: per-day pages; item_log: one item's undated log.
errorNoPresent when the call failed. Absent on success.
shownNoEvents returned.
eventsNoEvents, newest first.
noticeNoGuidance when the window is quiet or the list continues.
windowNoThe window read.
filtersNoFilters applied.
has_moreNoTrue when more events remain in the window — call again with next_cursor.
truncatedNoTrue when the list was capped at limit.
attributionNoAttribution lines the returned content requires (OGL always; EU and Westlaw credits when applicable).
next_cursorNoPass as cursor to continue; present only when has_more is true.
read_back_toNoItem-log mode: date (YYYY-MM-DD) of the oldest event on the pages of the item's log this call has passed. The log is read newest first, jumping ahead by page to find an older window; a page checked beyond the window's start does not count. While it is after end_date, the read has not reached the window yet. Absent in a day walk and when no event read carries a calendar date.
item_log_totalNoEvents in the item's whole log, all dates; present in item-log mode when reported.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `invalid_date`: start_date or end_date is shaped YYYY-MM-DD but is not a real calendar date. `invalid_window`: end_date is before start_date, or the window is over 31 days. `direction_needs_changes`: direction is set without content_type changes. `category_needs_content_type`: category is set without content_type legislation or associated-documents. `invalid_item`: item is not a (partial) item path or legislation.gov.uk URI, its type code is unknown, or it carries a provision. `invalid_cursor`: cursor does not decode, belongs to a different window, or holds a position no call over that window reaches (a day outside the window or after today, a day in item-log mode, a page past 10,000, or an offset past the end of its page). `filter_refused`: legislation.gov.uk answered the Publication Log feed with 404 or 400: a filter combination it does not accept. `upstream_refused`: legislation.gov.uk answered 403 or 429 (its fair use rate limit or a block). `pacer_shed`: The shared request queue cannot start this call within its deadline. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `invalid_date`: start_date or end_date is shaped YYYY-MM-DD but is not a real calendar date. `invalid_window`: end_date is before start_date, or the window is over 31 days. `direction_needs_changes`: direction is set without content_type changes. `category_needs_content_type`: category is set without content_type legislation or associated-documents. `invalid_item`: item is not a (partial) item path or legislation.gov.uk URI, its type code is unknown, or it carries a provision. `invalid_cursor`: cursor does not decode, belongs to a different window, or holds a position no call over that window reaches (a day outside the window or after today, a day in item-log mode, a page past 10,000, an offset past the end of its page, a page-search bound outside item-log mode, at or below its page, or past 10,000, or an events-returned mark other than the one the server writes). `filter_refused`: legislation.gov.uk answered the Publication Log feed with 404 or 400: a filter combination it does not accept. `upstream_refused`: legislation.gov.uk answered 403 or 429 (its fair use rate limit or a block). `pacer_shed`: The shared request queue cannot start this call within its deadline. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / read_back_to / description
      Previous value: -"Item-log mode: date (YYYY-MM-DD) of the oldest event this call read from the item's log, which is read newest first. While it is after end_date, the read has not reached the window yet. Absent in a day walk and when no event read carries a calendar date."New value: +"Item-log mode: date (YYYY-MM-DD) of the oldest event on the pages of the item's log this call has passed. The log is read newest first, jumping ahead by page to find an older window; a page checked beyond the window's start does not count. While it is after end_date, the read has not reached the window yet. Absent in a day walk and when no event read carries a calendar date."
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, open-world behavior, and the description adds non-obvious operational traits: newest-first ordering, day-by-day walking that can require multiple calls, and cursor continuation. The main remaining gap is that it doesn't say how to detect the end of the window beyond next_cursor absence.

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?

Three dense sentences, front-loaded with the core purpose and followed by mode behavior and the sibling hand-off; nothing is padding. The middle sentence's filter list partly restates the schema enums, which is the only redundancy.

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?

With an output schema present, return-shape detail is unnecessary, and the description still covers ordering, pagination, multi-call cost, and the sibling hand-off for missing effect detail. An agent has everything needed to choose and invoke it correctly.

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 100%, so parameters are already well documented; the description adds meaning by explaining that `item` switches the tool between single-item log and windowed day-walk, and by summarizing the filter set. It does not add syntax or interaction detail beyond what the schema enums and conditional notes already provide.

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?

States a specific verb and resource ("Read the legislation.gov.uk Publication Log") plus the exact scope: a date window of up to 31 days covering new items, revised versions, effects, and withdrawals. It also frames the tool conceptually ("the compliance-monitoring view of 'what changed'"), which distinguishes it from sibling lookup/search tools.

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?

Explicitly routes between modes: a full item path reads that item's own log in one call, while anything else walks day by day and may need several calls. It also names the alternative for a gap ("A changes event carries no effect detail — uklaw_get_amendments with that item has it") and explains how to continue with next_cursor.

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.