Skip to main content
Glama
dwain-barnes

MCP Server Police UK

by dwain-barnes

get_neighbourhood_details

Retrieve detailed information about a specific neighbourhood, including team members and priorities, by providing force and neighbourhood IDs.

Instructions

Retrieve details for a specific neighbourhood within a force

Input Schema

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

Implementation Reference

  • The handler function for 'get_neighbourhood_details'. It extracts force_id and neighbourhood_id from args, constructs the API endpoint as `${force_id}/${neighbourhood_id}`, calls the police.uk API, and returns the result or an empty object.
    async function getNeighbourhoodDetails(args: any) {
      const { force_id, neighbourhood_id } = args;
      const endpoint = `${force_id}/${neighbourhood_id}`;
      return await makeApiRequest(endpoint) || {};
    }
  • Input schema definition for 'get_neighbourhood_details' tool. Requires 'force_id' (string) and 'neighbourhood_id' (string) as input parameters.
    {
      name: 'get_neighbourhood_details',
      description: 'Retrieve details for a specific neighbourhood within a force',
      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']
      }
    },
  • src/index.ts:447-459 (registration)
    Registration mapping that links the tool name 'get_neighbourhood_details' to its handler function getNeighbourhoodDetails in the toolFunctions object.
    const toolFunctions = {
      get_street_level_crimes: getStreetLevelCrimes,
      get_street_level_outcomes: getStreetLevelOutcomes,
      get_crimes_at_location: getCrimesAtLocation,
      get_crimes_no_location: getCrimesNoLocation,
      get_crime_categories: getCrimeCategories,
      get_last_updated: getLastUpdated,
      get_outcomes_for_crime: getOutcomesForCrime,
      get_list_of_forces: getListOfForces,
      get_force_details: getForceDetails,
      get_senior_officers: getSeniorOfficers,
      get_neighbourhoods: getNeighbourhoods,
      get_neighbourhood_details: getNeighbourhoodDetails,
  • The helper function makeApiRequest used by getNeighbourhoodDetails to call the police.uk API at https://data.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, so the description alone must disclose behavior. It implies a read-only retrieval but lacks details on authentication, rate limits, data freshness, or any side effects. The description is too minimal for full transparency.

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?

A single sentence that is direct and contains no unnecessary words. It is well front-loaded and efficient.

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?

Although the tool is simple, the description omits what 'details' means (no output schema provided). Compared to siblings that specify boundaries, events, etc., this description lacks completeness. It should mention the typical output structure.

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 covers both parameters with descriptions, achieving 100% coverage. The tool description adds no extra meaning beyond the schema, so a baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Retrieve details for a specific neighbourhood within a force', clearly indicating the action and resources. However, it does not differentiate from siblings like get_neighbourhood_boundary or get_neighbourhood_events, which also retrieve specific neighbourhood data.

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 on when to use this tool versus alternatives such as get_neighbourhood_boundary, events, priorities, or team. There is no mention of prerequisites or when not to use it.

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