Skip to main content
Glama

Get Legislation

get_legislation
Read-onlyIdempotent

Get metadata for one specific piece of UK legislation by type + year + number (e.g. ukpga/2010/15 = Equality Act 2010). Returns title, type, year, number, status, extent, enactment date, a long-title summary, and the full-text URL. Content is XML; fields are best-effort parsed and a raw excerpt is included.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesDocument type, e.g. "ukpga". One of: ukpga (UK Public General Acts), uksi (UK Statutory Instruments), asp (Scottish Parliament Acts), anaw/asc (Wales), nia (Northern Ireland), ukla (UK Local Acts).
yearYesYear, e.g. 2010.
numberYesItem number within that year/type, e.g. 15.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "number": 15,
      +    "type": "ukpga",
      +    "year": 2010
      +  },
      +  {
      +    "number": 987,
      +    "type": "uksi",
      +    "year": 2021
      +  }
      +]
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior. The description adds further behavioral details: return fields (title, type, year, status, extent, enactment date, long-title summary, full-text URL), content format (XML), and a quality caveat (fields are best-effort parsed with a raw excerpt). This enriches the agent's understanding beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences with no wasted words. The first sentence states the tool's action and purpose with an example. The second lists return fields and notes the format and caveat. Every sentence adds essential information.

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 simple tool with three required parameters, no output schema, and rich annotations, the description covers all necessary aspects: what it does, how to call it (example), what it returns (field list), and a quality note (best-effort parsing). There are no gaps in helping an agent decide when to use it and what to expect.

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 description coverage is 100%, so the schema already documents each parameter. The description adds value by providing a concrete example of valid parameter combinations (ukpga/2010/15) and explains how the three parameters together identify a unique document, which aids an agent in constructing a valid call.

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?

Description begins with a specific verb ('Get metadata') and identifies the resource (UK legislation) by type, year, and number. It includes a concrete example (Equality Act 2010) which distinguishes it from the sibling search_legislation tool that searches across multiple documents.

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

Usage Guidelines4/5

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

The description explicitly states the required parameters (type, year, number) and format, making it clear that this tool is for retrieving a single, known piece of legislation. It does not explicitly state when not to use it or name alternatives, but the context of siblings implies search_legislation for broader queries, so it's sufficiently directive.

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.