Skip to main content
Glama
dwain-barnes

MCP Server Police UK

by dwain-barnes

get_stop_searches_no_location

Retrieve stop and search records that have no mapped location for a given police force and optional month.

Instructions

Retrieve stop and searches that could not be mapped to a location

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
force_idYesThe unique identifier for the force
dateNoSpecific month (YYYY-MM)

Implementation Reference

  • Handler function for get_stop_searches_no_location: extracts force_id and date, builds params with force mapped from force_id, calls makeApiRequest on 'stops-no-location' endpoint.
    async function getStopSearchesNoLocation(args: any) {
      const { force_id, date } = args;
      const params: Record<string, any> = { force: force_id };
      if (date) params.date = date;
      return await makeApiRequest('stops-no-location', params) || [];
    }
  • Input schema registration for get_stop_searches_no_location: defines required force_id (string) and optional date (string) parameters.
    {
      name: 'get_stop_searches_no_location',
      description: 'Retrieve stop and searches that could not be mapped to a location',
      inputSchema: {
        type: 'object',
        properties: {
          force_id: { type: 'string', description: 'The unique identifier for the force' },
          date: { type: 'string', description: 'Specific month (YYYY-MM)' }
        },
        required: ['force_id']
      }
    },
  • src/index.ts:447-469 (registration)
    Tool function mapping registration: maps the tool name 'get_stop_searches_no_location' to the handler function getStopSearchesNoLocation.
    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
    };
  • Helper function makeApiRequest used by the handler to make HTTP GET 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, so the description must carry full behavioral disclosure. It only states the filter criterion (no location) but fails to mention whether it is read-only, if it may return empty results, pagination behavior, or any operational constraints. This is insufficient for an agent to understand the tool's behavior fully.

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 that quickly conveys the tool's purpose. It is front-loaded and contains no fluff. However, it could be slightly expanded with more details without losing conciseness.

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?

Given the simple two-parameter input, no output schema, and no annotations, the description is minimally adequate but lacks details about return format, edge cases, or constraints. It is sufficient for a straightforward retrieval but not fully comprehensive.

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 has 100% description coverage, with both parameters (force_id and date) already described. The tool description does not add any additional meaning beyond what the schema provides, so a baseline score of 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 states 'Retrieve stop and searches that could not be mapped to a location,' clearly specifying the verb (retrieve) and the resource (stop searches with missing location), which distinguishes it from sibling tools like get_stop_searches_by_area or get_stop_searches_by_location.

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 that this tool is for stop searches without a location, but it does not explicitly state when to use it versus other stop search tools (e.g., by force, by area, by location). No alternatives or exclusions are mentioned, so usage is only implied.

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