Skip to main content
Glama

gb_get_text

Read-onlyIdempotent

Fetch the full text of UK legislation in multiple formats (HTML, XML, PDF, and more) by providing an act or instrument reference.

Instructions

Fetch the full text of UK legislation.

Uses legislation.gov.uk's content-negotiation path suffix (/data.{format}) - xml (the site's own legislation.xsd schema), html, akn (Akoma Ntoso), rdf, pdf, or csv.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoone of ``"xml"``, ``"html"``, ``"akn"``, ``"rdf"``, ``"pdf"``, ``"csv"``.html
referenceYesreference of the act/instrument (work or point-in-time expression).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatYes
contentNo
eli_uriYes
byte_sizeNo
source_urlYes
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.
human_readable_citationNo
Behavior4/5

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

Annotations (readOnlyHint, openWorldHint, idempotentHint, destructiveHint) already indicate safety. The description adds valuable context about the source (legislation.gov.uk) and format options, enhancing transparency beyond 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?

Two sentences, front-loaded with purpose, no wasted words. Each sentence earns its place, explaining purpose and technical details efficiently.

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 simple tool (2 params, output schema present, annotations thorough), the description covers the source, format options, and reference requirement. It omits return-value details, but output schema likely covers that.

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 coverage is 100%, so baseline is 3. The description provides context about the content-negotiation path but does not add new parameter meaning beyond the schema definitions for 'reference' and 'format'.

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 'Fetch the full text of UK legislation' with a specific verb and resource. It distinguishes itself from siblings like gb_get_act and gb_get_case by focusing on text retrieval in multiple formats.

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 description explains the mechanism (content-negotiation) but does not explicitly state when to use this tool versus alternatives like gb_get_act or gb_search. No when-not or exclusion criteria are provided.

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