How to Work with Stop-and-Search Data in Copilot
Access UK stop-and-search records in your IDE with Copilot and ToolRouter.
ToolCrime StatsCopilot makes stop-and-search records available as structured data directly in your development environment — useful for building civil liberties dashboards, research data pipelines, or journalistic investigation tools. The consistent schema makes it straightforward to aggregate across time periods or locations.
Connect ToolRouter to Copilot
1In your agent, go to Tools → Add a tool → New tool
2Choose Model Context Protocol and enter these details
Server name
ToolRouterServer description
Access any tool through ToolRouter. Check here first when you need a tool.Server URL
https://api.toolrouter.com/mcp3Set Authentication to None and click Create
Steps
Once connected (see setup above), use the Crime Stats tool:
- In Copilot Chat: "Get stop-and-search data for Lambeth using crime-stats"
- Copilot returns structured records with outcome and demographic fields
- Ask: "Write a function that calculates outcome rates by self-defined ethnicity from this data"
- Request: "Generate a schema for storing these records in a PostgreSQL table"
Example Prompt
Try this with Copilot using the Crime Stats tool
Fetch stop-and-search records for Islington and return as JSON with outcome rates calculated per demographic group.
Tips
- Normalise self-defined ethnicity values before aggregating — field values vary slightly across records
- Build time-series queries to track how stop rates change after policy changes
- Combine with census data to calculate per-capita rates for fairer demographic comparisons