How to Build Nutrition Labels with Copilot

Nutrition label data in your IDE with Copilot and ToolRouter. Generate nutrition facts for food apps.

Tool
Nutrition Data icon
Nutrition Data

Copilot generates nutrition label data as structured objects ready for rendering in your application. Get aggregated totals as JSON, create React or Vue components that render FDA-style labels, and build recipe-to-label pipelines that dynamically calculate nutrition when users submit their own recipes. The data flows straight from the API into your code.

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

  1. In Copilot Chat: "Calculate nutrition totals for this recipe: 300g pasta, 200g sauce, 100g cheese"
  2. Copilot looks up each ingredient and returns aggregated totals
  3. Ask: "Generate a React component that renders this as a nutrition label"
  4. Integrate the nutrition label component into your application

Example Prompt

Try this with Copilot using the Nutrition Data tool
Look up nutrition for these ingredients and return an aggregated nutrition facts JSON: 200g flour, 50g sugar, 100g butter, 2 eggs. For 12 servings.

Tips

  • Generate nutrition label components from the structured data
  • Build recipe-to-label pipelines for food applications
  • Use the API to dynamically calculate labels when users submit recipes