Skip to main content
Glama
dwain-barnes

MCP Server Police UK

by dwain-barnes

get_senior_officers

Retrieve senior officers for any UK police force by specifying its force ID. Get leadership information for police forces in England, Wales, and Northern Ireland.

Instructions

Retrieve senior officers for a specific police force

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
force_idYesThe unique identifier for the force

Implementation Reference

  • Schema/registration definition for the 'get_senior_officers' tool, defining its name, description, and input schema requiring a 'force_id' string.
    {
      name: 'get_senior_officers',
      description: 'Retrieve senior officers for a specific police force',
      inputSchema: {
        type: 'object',
        properties: {
          force_id: { type: 'string', description: 'The unique identifier for the force' }
        },
        required: ['force_id']
      }
    },
  • Handler function 'getSeniorOfficers' that executes the tool logic. It extracts force_id from args, constructs the API endpoint 'forces/{force_id}/people', and calls makeApiRequest.
    async function getSeniorOfficers(args: any) {
      const { force_id } = args;
      const endpoint = `forces/${force_id}/people`;
      return await makeApiRequest(endpoint) || [];
    }
  • src/index.ts:457-457 (registration)
    Registration of the 'get_senior_officers' tool name to its handler function in the toolFunctions mapping object.
    get_senior_officers: getSeniorOfficers,
  • Helper function 'makeApiRequest' used by the handler to make HTTP requests to the police.uk API.
    async function makeApiRequest(endpoint: string, params?: Record<string, any>) {
      const baseUrl = 'https://data.police.uk/api';
      const url = `${baseUrl}/${endpoint}`;
      
      try {
        const response = await axios.get(url, { params, timeout: 10000 });
        return response.data;
      } catch (error) {
        console.error(`API request failed: ${error}`);
        return null;
      }
    }
Behavior2/5

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

No annotations are provided, and the description does not disclose behavioral traits such as whether the operation is read-only, requires authentication, or any rate limits. The minimal description leaves ambiguity about the return format and behavior.

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?

The description is a single concise sentence with no wasted words. It could be improved by adding a bit more detail without becoming verbose.

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?

For a simple query tool with one parameter and no output schema, the description is adequate but lacks information about the return structure (e.g., list of officers with names and ranks). This leaves some uncertainty for the agent.

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?

The input schema already describes force_id well. The description adds no additional meaning beyond the schema, so it meets the baseline for 100% coverage.

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 clearly states the verb 'Retrieve', the resource 'senior officers', and the context 'for a specific police force', distinguishing it from sibling tools like get_force_details or get_crime_categories.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. With many sibling tools for police data, explicit usage context would be beneficial.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dwain-barnes/police-uk-api-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server