Skip to main content
Glama

UK Data for Agents

written_question_search

Read-onlyIdempotent

Search UK parliamentary written questions and the government's answers by keyword, e.g. what a department has said about potholes, NHS waiting lists or visa numbers. Returns who asked, which department answered, dates, status and an excerpt of the answer. Source: UK Parliament Written Questions API (Commons and Lords). For the full answer text use written_question_detail; it does not cover oral questions or Hansard debates. (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": "written_question_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNostring, required, keyword or phrase to search in questions and answers
takeNoint, optional, number of results 1-100, default 10

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/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, so the safety profile is covered. The description adds genuinely non-redundant context: the response fields (asker, answering department, dates, status), that answers are returned as an excerpt rather than full text, the upstream data source, and a per-call credit cost. Pagination/result-cap behavior is left implicit, which keeps it from a 5.

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?

Four tight sentences, front-loaded with purpose followed by return shape, routing, and cost. The potholes/NHS/visa examples earn their space by making the resource concrete, and nothing repeats the schema or annotations.

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 two-parameter read-only search with no output schema, the definition covers purpose, likely return fields, scope boundaries, sibling routing, and cost. Nothing an agent needs in order to call this correctly is missing.

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 both parameters are already documented, and the description adds little beyond confirming that 'q' is a keyword/phrase searched across both questions and answers. Baseline 3 applies; no syntax, quoting, or result-count guidance is offered beyond the schema.

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 ('Search UK parliamentary written questions and the government's answers by keyword') and immediately bounds the scope (Commons and Lords written questions). It explicitly distinguishes itself from written_question_detail and from oral questions/Hansard, so an agent can differentiate it from siblings without opening a schema.

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?

Names concrete use cases ('what a department has said about potholes, NHS waiting lists or visa numbers') and gives an explicit routing rule: use written_question_detail for full answer text, and note that oral questions and Hansard debates are out of scope. That covers when-to-use, when-not-to-use, and the alternative in one pass.

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