Skip to main content
Glama

UK Data for Agents

legislation_search

Read-onlyIdempotent

Search UK legislation by title (legislation.gov.uk). (cost: 1 credit)

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "legislation_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNonumber 1-50
queryNostring, required
includeEuNoboolean, default false: also search EU retained law

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / includeEu
      Added value: +{
      +  "description": "boolean, default false: also search EU retained law",
      +  "type": [
      +    "boolean",
      +    "string"
      +  ]
      +}
  2. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered. The description adds a genuinely useful non-schema trait — a cost of 1 credit — but says nothing about result ordering, pagination, or whether matching is exact vs. partial title matching.

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?

Two short clauses, zero filler, and the resource/source are front-loaded before the cost note. It is on the edge of over-terseness for a tool with three parameters, but no sentence is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description should hint at the return shape (a list of legislation matches with titles/years), which it does not. For a simple three-parameter search tool with full annotation and schema coverage this is adequate but leaves the agent guessing about results and next steps.

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 description coverage is 100%, so limit, query and includeEu are already documented. The phrase 'by title' adds real meaning about what the query string matches (titles rather than full text), but nothing is said about how limit interacts with total result counts or what includeEu returns differently.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Search') and resource ('UK legislation'), plus the source domain (legislation.gov.uk) and the matching field ('by title'). This clearly separates it from siblings like govuk_search and legislation_text, though it never names legislation_text explicitly as the full-text counterpart.

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?

Usage is only implied: an agent can infer this is for finding legislation when it knows a title, and that legislation_text would be needed for content. There is no explicit when-to-use, when-not-to-use, or named alternative, so routing between the two legislation tools is left to inference.

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.

Resources