Skip to main content
Glama

UK Data for Agents

constituency_election_result

Read-onlyIdempotent

Latest election result for a UK parliamentary constituency: every candidate with party, votes and vote share, the winner, majority, electorate and turnout, from the UK Parliament Members API. Answers "who won in X and by how much?", including by-elections. Needs a constituency id (get one from constituency_search). Covers Westminster elections only, not local, mayoral or devolved elections. (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_election_result"
  }
}

Input Schema

NameRequiredDescriptionDefault
constituencyIdNointeger, required, Parliament constituency id (from constituency_search), e.g. 4105 for Holborn and St Pancras

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 context not in the annotations: the upstream source (UK Parliament Members API), the scope restriction to Westminster elections, and a cost of 1 credit. It does not discuss pagination or error behavior, but neither is relevant for a single-record lookup.

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 dense sentences with no filler: what it returns, the question it answers, then the prerequisite and scope limits. Front-loaded and every clause carries information.

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?

There is no output schema, and the description compensates by enumerating the returned fields, so an agent knows what to expect. Prerequisite, scope exclusions, source and cost are all present for a single-parameter tool.

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% and the schema already documents the constituencyId as an integer id sourced from constituency_search, with an example. The description repeats the dependency but adds no new syntax, format, or edge-case meaning beyond that, so this sits at the baseline.

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 ('Latest election result for a UK parliamentary constituency') and enumerates exactly what is returned: candidates with party, votes and share, winner, majority, electorate, turnout. An agent can distinguish this immediately from constituency_search or commons_division_result.

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 the exact question it answers ('who won in X and by how much?'), covers the by-election case, states the prerequisite (obtain a constituency id from constituency_search), and explicitly excludes local, mayoral and devolved elections. When-to-use and when-not-to-use are both present.

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