get_stop_searches_by_location
Fetch stop and search incidents by location ID. Optionally specify a month (YYYY-MM) to filter results. Useful for analyzing police stop and search activity at a given location.
Instructions
Retrieve stop and searches at a specific location by ID
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| location_id | Yes | The ID of the location | |
| date | No | Specific month (YYYY-MM) |
Implementation Reference
- src/index.ts:425-430 (handler)Handler function that executes the get_stop_searches_by_location tool logic. Takes location_id (required) and date (optional), makes API request to 'stops-at-location' endpoint.
async function getStopSearchesByLocation(args: any) { const { location_id, date } = args; const params: Record<string, any> = { location_id }; if (date) params.date = date; return await makeApiRequest('stops-at-location', params) || []; } - src/index.ts:234-244 (schema)Schema definition for get_stop_searches_by_location, describing the tool with input parameters: location_id (number, required) and date (string, optional).
name: 'get_stop_searches_by_location', description: 'Retrieve stop and searches at a specific location by ID', inputSchema: { type: 'object', properties: { location_id: { type: 'number', description: 'The ID of the location' }, date: { type: 'string', description: 'Specific month (YYYY-MM)' } }, required: ['location_id'] } }, - src/index.ts:466-466 (registration)Registration/mapping of the tool name 'get_stop_searches_by_location' to the handler function getStopSearchesByLocation in the toolFunctions map.
get_stop_searches_by_location: getStopSearchesByLocation,