Skip to main content
Glama

Search GOV.UK

govuk_search
Read-onlyIdempotent

Search GOV.UK's 700k+ content items using the official Search API.

Returns a list of matching content items with title, description, link, format, owning organisation(s), and last updated timestamp.

Use filter_format to narrow to specific content types (e.g. 'transaction' for citizen-facing services, 'guide' for guidance, 'publication' for official documents). Use filter_organisations to restrict to a department.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoNumber of results to return (1–50)
orderNoSort order. Use '-public_timestamp' for newest-first (default relevance).
queryYesFree-text search query, e.g. 'universal credit eligibility' or 'MOT check'
startNoOffset for pagination, e.g. 10 for the second page of 10 results
filter_formatNoFilter by document format. Common values: 'guide', 'answer', 'transaction', 'publication', 'news_article', 'detailed_guide', 'hmrc_manual_section', 'travel_advice', 'organisation'. Leave blank to search all types.
filter_organisationsNoFilter by organisation slug, e.g. 'hm-revenue-customs', 'department-for-work-pensions', 'driver-and-vehicle-standards-agency'.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYesMax results requested for this page.
queryYesThe free-text query that was searched.
startYesOffset used for this page (zero-based).
totalYesTotal matching results across all pages on GOV.UK.
resultsNoMatching pages. Use the `link` field of any result as the `base_path` input to govuk_get_content for the full item.
has_moreYesTrue if more results exist beyond this page. Re-call with start=start+returned to fetch the next page.
returnedYesNumber of results actually returned in this response.

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and non-destructive. The description adds useful behavioral context beyond annotations: it mentions the official Search API, the scale of 700k+ items, and the exact fields returned in the result list. This enriches the agent's understanding without contradicting 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 compact and well-structured: opening sentence states purpose, second sentence summarizes return shape, final sentence gives filter usage. No filler or redundancy; every sentence contributes useful information.

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?

With a rich output schema, detailed annotations, and full schema parameter descriptions, the description covers the core search behavior and filter usage effectively. It lacks explicit guidance on pagination or when not to use this tool, but overall it is sufficient for an agent to select 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 baseline is 3. The description goes beyond schema by giving real-world meaning to filter_format ('transaction' for citizen-facing services, 'guide' for guidance) and explaining the purpose of filter_organisations ('restrict to a department'). This adds semantic value for correctly using these parameters.

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 opens with a specific verb and resource: 'Search GOV.UK's 700k+ content items using the official Search API.' It clearly distinguishes from sibling tools like govuk_get_content by emphasizing broad search across all content, and it details what is returned (title, description, link, format, organisation, timestamp).

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 how to use filters ('Use filter_format... Use filter_organisations...'), but it does not explicitly say when to choose this tool over siblings such as govuk_get_content or govuk_grep_content. The search use case is implied but not contrasted with alternatives.

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.

TDQS

A4.6/5.0
Disambiguation5/5

Each tool targets a distinct operation: page metadata, sections, content search, organisation profiles, organisation listing, postcode lookup, and full-text search. No two tools overlap in purpose, so an agent can clearly differentiate them.

Naming Consistency5/5

All tools follow the 'govuk_verb_noun' pattern (e.g., govuk_get_content, govuk_list_organisations) using imperative verbs. The naming is uniform and predictable, with only minor variation in verb choice (get, grep, lookup) but no mixing of conventions.

Tool Count5/5

Seven tools is ideal for the scope of reading GOV.UK data: page content (3 tools), organisations (2), postcode lookup (1), and search (1). Each tool serves a necessary function without being excessive or insufficient.

Completeness5/5

The tool set covers the primary read operations for the domain: retrieving page structure and content, searching across content, browsing and fetching organisations, and looking up postcodes. While there is no single tool to fetch all sections at once, the combination of get_content and get_section covers it adequately. No obvious gaps for a read-only API.

Resources