Skip to main content
Glama

UK Data for Agents

constituency_search

Read-onlyIdempotent

Find a UK parliamentary constituency by part of its name and get its id and current MP, from the UK Parliament Members API. This is the lookup step for the election result tools. It searches constituency names only; to go from a postcode to an MP use mp_lookup. (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": "constituency_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNostring, required, part of the constituency name (2-100 chars), e.g. "Holborn"
takeNointeger, optional, max results 1-20, 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 readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered. The description adds real context beyond them: the upstream data source, the fields returned (id, current MP), name-only matching semantics, and a 1-credit cost. It stops short of describing no-match/empty-result behavior or result ordering, 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?

Three short sentences, front-loaded with the core action and return value, then the workflow role, then the exclusion and cost tag. Nothing is redundant and the routing hint sits where an agent will read it first.

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 lookup with no output schema, the description supplies what's missing on the output side (id and current MP) and the workflow context for chaining into constituency_election_result. Nothing an agent needs to invoke it correctly is absent.

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% and both parameters carry their own descriptions and limits, so the baseline is 3. The description only reinforces that matching is on 'part of' the name; it adds no syntax, partial-match rules (prefix vs substring), or guidance on pagination via 'take' beyond what the schema says.

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+resource ('Find a UK parliamentary constituency by part of its name') plus what it returns (id and current MP) and the backing source (UK Parliament Members API). It also distinguishes itself from the similarly-named constituency_election_result (this is the lookup *step* for those tools) and from mp_lookup, so an agent can route without opening schemas.

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?

Explicitly frames itself as the preparatory lookup for the election-result tools and names the alternative path: name-based search here, postcode-to-MP via mp_lookup. It also states a negative scope ('searches constituency names only'), which tells the agent what inputs will not work.

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