How to Integrate Electricity Price Data with Copilot
Access live UK electricity prices in your IDE with Copilot and ToolRouter. Build energy management applications.
ToolEnergy DataCopilot brings live electricity pricing into your development environment, making it straightforward to build smart scheduling features, energy cost calculators, and demand-response integrations. The structured half-hourly data maps directly to time-series charts and scheduling logic without additional transformation.
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 Energy Data tool:
- In Copilot Chat: "Get electricity prices for the South East region for today using energy-data"
- Copilot returns structured half-hourly price data
- Ask: "Write a function that finds the lowest-cost N consecutive hours in this dataset"
- Request: "Generate a TypeScript interface for the electricity price response"
Example Prompt
Try this with Copilot using the Energy Data tool
Fetch electricity prices for Yorkshire for the next 24 hours and return as a JSON array with timestamps and pence-per-kWh values, ready to feed a scheduling algorithm.
Tips
- Build a "find cheapest window" helper function and reuse it across all scheduling features
- Cache prices with a 30-minute TTL to avoid redundant API calls in your application
- Use half-hourly timestamps as keys to align price data with smart meter readings