Skip to main content
Glama
dwain-barnes

MCP Server Police UK

by dwain-barnes

get_neighbourhood_team

Fetch the list of officers and staff assigned to a neighbourhood police team by specifying the force and neighbourhood IDs.

Instructions

Retrieve the team members 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

  • Handler function that executes the 'get_neighbourhood_team' tool logic. It extracts force_id and neighbourhood_id from args, builds the API endpoint as '{force_id}/{neighbourhood_id}/people', and calls makeApiRequest to fetch the team members from the police.uk API.
    async function getNeighbourhoodTeam(args: any) {
      const { force_id, neighbourhood_id } = args;
      const endpoint = `${force_id}/${neighbourhood_id}/people`;
      return await makeApiRequest(endpoint) || [];
    }
  • Input schema definition for the tool. Specifies that 'force_id' and 'neighbourhood_id' are required string properties used to identify the neighbourhood whose team members should be retrieved.
    {
      name: 'get_neighbourhood_team',
      description: 'Retrieve the team members 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']
      }
    },
  • src/index.ts:446-469 (registration)
    Tool registration in the toolFunctions mapping. Maps the tool name 'get_neighbourhood_team' to the handler function getNeighbourhoodTeam, which is invoked when the tool is called via the MCP CallToolRequestSchema handler.
    // Tool function mapping
    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,
      get_neighbourhood_boundary: getNeighbourhoodBoundary,
      get_neighbourhood_team: getNeighbourhoodTeam,
      get_neighbourhood_events: getNeighbourhoodEvents,
      get_neighbourhood_priorities: getNeighbourhoodPriorities,
      locate_neighbourhood: locateNeighbourhood,
      get_stop_searches_by_area: getStopSearchesByArea,
      get_stop_searches_by_location: getStopSearchesByLocation,
      get_stop_searches_no_location: getStopSearchesNoLocation,
      get_stop_searches_by_force: getStopSearchesByForce
    };
  • The makeApiRequest helper function that performs the actual HTTP GET request to the police.uk API (https://data.police.uk/api) with the provided endpoint and optional query parameters.
    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 carries full burden. It states 'Retrieve' implying a read operation, but does not disclose any other behavioral traits (e.g., rate limits, authentication, or data freshness).

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 sentence with no wasted words. It follows a simple structure: verb + resource.

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 retrieval tool with no output schema and 2 well-described parameters, the description is minimally adequate. However, it lacks expected return value format or any context about the team members 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?

Input schema covers both parameters with clear descriptions (force_id, neighbourhood_id). Schema description coverage is 100%, so the description adds no additional meaning beyond what's already in the schema.

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 clearly states the verb 'Retrieve' and the resource 'team members for a specific neighbourhood'. It is specific and unambiguous, though it does not differentiate from sibling tools like get_neighbourhood_details or get_senior_officers.

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 vs alternatives. The description does not mention prerequisites, typical use cases, 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