Skip to main content
Glama
dwain-barnes

MCP Server Police UK

by dwain-barnes

get_list_of_forces

Get a comprehensive list of all police forces in the UK using the Police UK API. Retrieve force names and identifiers for use with other crime data queries.

Instructions

Retrieve a list of all police forces

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for get_list_of_forces. It calls the police.uk API 'forces' endpoint and returns the list of all police forces.
    async function getListOfForces() {
      return await makeApiRequest('forces') || [];
    }
  • Schema definition for get_list_of_forces tool. It takes no input parameters (empty properties object).
    {
      name: 'get_list_of_forces',
      description: 'Retrieve a list of all police forces',
      inputSchema: {
        type: 'object',
        properties: {}
      }
    },
  • src/index.ts:455-455 (registration)
    Registration mapping the tool name 'get_list_of_forces' to its handler function getListOfForces in the toolFunctions object.
    get_list_of_forces: getListOfForces,
  • The compiled handler function for get_list_of_forces in the dist file.
    async function getListOfForces() {
        return await makeApiRequest('forces') || [];
    }
  • dist/index.js:439-439 (registration)
    Registration mapping in the dist file.
    get_list_of_forces: getListOfForces,
  • The makeApiRequest helper function used by getListOfForces to call 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 only states the action without disclosing behavioral traits such as caching, performance, or response structure. This is minimal for a tool without 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 a single, clear sentence with no wasted words. It is appropriately sized for a simple list-all tool.

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?

The tool has no parameters, no output schema, and no annotations. The description is largely complete, though lacking a hint about the return format (e.g., list of force names). Still, it's adequate for such a straightforward tool.

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?

The input schema has no parameters and 100% coverage, so the description need not add parameter info. Baseline of 4 is appropriate; no compensation needed.

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 'Retrieve a list of all police forces' uses a specific verb ('retrieve') and resource ('list of all police forces'), clearly distinguishing it from siblings that deal with specific forces or other entities.

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 implies usage for getting all forces, but lacks explicit guidance on when to use this tool versus siblings like get_force_details or get_neighbourhoods. No when-not-to-use or alternatives mentioned.

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