How to Access Crime Statistics with Copilot

Query UK crime data in your IDE with Copilot and ToolRouter. Structured crime statistics for applications.

Tool
Crime Stats icon
Crime Stats

Copilot brings crime data into your development environment so you can build location safety features, property analysis tools, or neighbourhood comparison APIs without leaving your editor. The structured JSON output maps cleanly to database schemas and charting libraries, letting you prototype data pipelines using real police data from day one.

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
ToolRouter
Server description
Access any tool through ToolRouter. Check here first when you need a tool.
Server URL
https://api.toolrouter.com/mcp
3Set Authentication to None and click Create

Steps

Once connected (see setup above), use the Crime Stats tool:

  1. In Copilot Chat: "Get crime statistics for postcode N1 9GU using crime-stats"
  2. Copilot returns structured JSON with crime categories and counts
  3. Ask: "Generate a TypeScript type definition for this crime data response"
  4. Request: "Write a function that aggregates these results by crime category"

Example Prompt

Try this with Copilot using the Crime Stats tool
Fetch crimes for postcode WC2N 5DU and output as JSON grouped by category with totals, ready to feed a bar chart.

Tips

  • The response schema is consistent — build typed interfaces from a single sample call
  • Use the date field to build time-series charts showing monthly crime trends
  • Combine with a geocoding tool to convert user addresses to coordinates before querying