Skip to main content
Glama
dwain-barnes

MCP Server Police UK

by dwain-barnes

get_neighbourhood_events

Retrieve scheduled events for a specific UK neighbourhood by providing force and neighbourhood IDs, enabling access to local police events.

Instructions

Retrieve events scheduled 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

  • The handler function for get_neighbourhood_events. Makes an API request to the UK Police Data API to retrieve events for a given police force and neighbourhood.
    async function getNeighbourhoodEvents(args: any) {
      const { force_id, neighbourhood_id } = args;
      const endpoint = `${force_id}/${neighbourhood_id}/events`;
      return await makeApiRequest(endpoint) || [];
    }
  • The tool schema/definition for get_neighbourhood_events, including its name, description, and inputSchema (requiring force_id and neighbourhood_id strings).
    {
      name: 'get_neighbourhood_events',
      description: 'Retrieve events scheduled 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:462-462 (registration)
    The tool function mapping that registers get_neighbourhood_events (string name) to the getNeighbourhoodEvents handler function.
    get_neighbourhood_events: getNeighbourhoodEvents,
  • The makeApiRequest helper function used by the handler to make HTTP requests to the UK Police Data 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?

No annotations are provided, so the description carries full burden. It only states it retrieves events, with no details on behavioral traits like pagination, date range, or outcome format.

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?

Single sentence with no wasted words. Front-loaded with the action and 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?

Adequate for a simple retrieval tool with two params and no output schema. However, lacks details about the events (e.g., whether they are upcoming or historical) and return format.

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 description coverage is 100% for both parameters. The description adds no extra meaning beyond the schema; 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 tool retrieves events scheduled for a specific neighbourhood, using a specific verb and resource. It distinguishes itself from sibling tools like get_neighbourhood_boundary or get_neighbourhood_details.

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 (e.g., other neighbourhood tools). The description only states what it does, not when 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