Skip to main content
Glama
dwain-barnes

MCP Server Police UK

by dwain-barnes

get_neighbourhood_priorities

Retrieve current policing priorities for a specific neighbourhood by providing the force and neighbourhood identifiers.

Instructions

Retrieve policing priorities for a specific neighbourhood

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
force_idYesThe unique identifier for the force
neighbourhood_idYesThe unique identifier for the neighbourhood

Implementation Reference

  • Schema definition for the 'get_neighbourhood_priorities' tool. Defines input params: force_id (required string) and neighbourhood_id (required string).
    {
      name: 'get_neighbourhood_priorities',
      description: 'Retrieve policing priorities for a specific neighbourhood',
      inputSchema: {
        type: 'object',
        properties: {
          force_id: { type: 'string', description: 'The unique identifier for the force' },
          neighbourhood_id: { type: 'string', description: 'The unique identifier for the neighbourhood' }
        },
        required: ['force_id', 'neighbourhood_id']
      }
    },
  • Handler function for get_neighbourhood_priorities. Extracts force_id and neighbourhood_id from args, makes API call to '{force_id}/{neighbourhood_id}/priorities', returns the result or empty array.
    async function getNeighbourhoodPriorities(args: any) {
      const { force_id, neighbourhood_id } = args;
      const endpoint = `${force_id}/${neighbourhood_id}/priorities`;
      return await makeApiRequest(endpoint) || [];
    }
  • src/index.ts:463-463 (registration)
    Registration mapping the tool name 'get_neighbourhood_priorities' to the handler function getNeighbourhoodPriorities in the toolFunctions object.
    get_neighbourhood_priorities: getNeighbourhoodPriorities,
  • Helper function makeApiRequest used by getNeighbourhoodPriorities to call the police.uk API at 'https://data.police.uk/api'.
    // Helper function to make API requests to police.uk
    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?

With no annotations, the description carries full burden but only says 'Retrieve,' implying read-only. It fails to disclose important behavioral aspects such as data freshness, pagination, required authorization, or side effects.

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, front-loaded sentence with no wasted words. While very short, it conveys the core purpose efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema is provided, and the description does not explain the structure or content of the returned priorities. For a data retrieval tool, important details like whether results are ordered or limited are 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?

Input schema has 100% coverage with descriptions already explaining both parameters as unique identifiers. The description adds no additional meaning beyond what the schema provides, so baseline 3 is appropriate.

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 specifies a clear verb ('Retrieve') and a distinct resource ('policing priorities for a specific neighbourhood'). Among siblings like get_neighbourhood_details, get_neighbourhood_events, and get_neighbourhood_team, this tool's purpose is unique and unambiguous.

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 vs. alternatives like get_neighbourhood_details or get_neighbourhood_events. The description lacks any context about prerequisites, filtering, or limitations.

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