How to Build Energy Cost Tools with Copilot

Build energy cost and solar savings applications with Copilot and ToolRouter.

Tool
Energy Data icon
Energy Data

Copilot uses combined electricity price and solar generation data to help you build comprehensive energy cost calculators, property valuation tools with energy cost components, and portfolio-level sustainability reporting features directly in your IDE.

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 Energy Data tool:

  1. Fetch electricity prices for your target region using energy-data
  2. Fetch solar estimates for your target postcode and system size using energy-data
  3. Ask: "Write a cost modelling function combining both datasets with an annual consumption parameter"
  4. Request: "Generate test data for three different consumption profiles using this function"

Example Prompt

Try this with Copilot using the Energy Data tool
Fetch electricity prices for Yorkshire and solar estimates for a 4kWp south-facing system at LS1 4HY. Write a TypeScript function that calculates annual cost with and without solar for a given consumption value.

Tips

  • Abstract the calculation logic into a pure function that accepts price and generation arrays
  • Build a range of consumption presets (low/medium/high household) for UI flexibility
  • Combine with a postcode lookup to make the tool addressable for any UK location