Skip to main content
Glama
dwain-barnes

MCP Server Police UK

by dwain-barnes

get_crimes_no_location

Fetch crimes that could not be mapped to a specific location, filtered by category, police force, and month.

Instructions

Retrieve crimes that could not be mapped to a location

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryYesThe category of the crimes
forceYesSpecific police force
dateNoLimit results to a specific month (YYYY-MM)

Implementation Reference

  • Handler function that calls the police.uk API endpoint 'crimes-no-location' with category, force, and optional date parameters. Returns crimes that could not be mapped to a location.
    async function getCrimesNoLocation(args: any) {
      const { category, force, date } = args;
      const params: Record<string, any> = { category, force };
      if (date) params.date = date;
      return await makeApiRequest('crimes-no-location', params) || [];
    }
  • Input schema definition for get_crimes_no_location tool. Requires 'category' and 'force', with optional 'date'.
    {
      name: 'get_crimes_no_location',
      description: 'Retrieve crimes that could not be mapped to a location',
      inputSchema: {
        type: 'object',
        properties: {
          category: { type: 'string', description: 'The category of the crimes' },
          force: { type: 'string', description: 'Specific police force' },
          date: { type: 'string', description: 'Limit results to a specific month (YYYY-MM)' }
        },
        required: ['category', 'force']
      }
    },
  • src/index.ts:451-451 (registration)
    Registration of the getCrimesNoLocation handler function under the tool name 'get_crimes_no_location' in the toolFunctions mapping object.
    get_crimes_no_location: getCrimesNoLocation,
  • Shared helper function used by getCrimesNoLocation to make HTTP 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 bears the full burden. It only states the purpose without disclosing any behavioral traits such as read-only nature, potential error conditions, or side effects. For a retrieval tool, this is insufficient.

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 communicates the core purpose without extraneous words. It is appropriately sized for a simple retrieval tool but could benefit from slight expansion.

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?

Given the tool has three parameters and no output schema, the description should provide hints about return format or constraints, but it does not. It is too minimal given the absence of output schema and annotations.

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?

Schema coverage is 100%, meaning all parameters are described in the schema. The description adds no further meaning beyond the schema's parameter descriptions. 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 clearly states the specific purpose: retrieving crimes that could not be mapped to a location. This distinguishes it from sibling tools like get_crimes_at_location which retrieve crimes at a specific location.

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 given on when to use this tool versus alternatives such as get_crimes_at_location or get_street_level_crimes. The description does not mention exclusions or prerequisites.

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