How to Look Up Food Nutrition with Copilot

Food nutrition data in your IDE with Copilot and ToolRouter. Nutrition facts for developers.

Tool
Nutrition Data icon
Nutrition Data

Copilot brings nutrition data directly into your development workflow. Look up food facts without leaving your editor, get results formatted as JSON or TypeScript interfaces ready for your health app, and seed databases with accurate nutritional records. It bridges the gap between raw API data and production-ready 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: "Look up nutrition facts for oatmeal using nutrition-data"
  2. Copilot returns the nutritional breakdown
  3. Ask: "Format this as a JSON object for my nutrition tracking app"
  4. Integrate the data into your application

Example Prompt

Try this with Copilot using the Nutrition Data tool
Search for "sweet potato" nutrition data and return it as JSON. I need it for my food tracking app database.

Tips

  • Great for seeding nutrition databases in health and fitness applications
  • Generate TypeScript interfaces from the nutrition data structure
  • Use the API to validate user-submitted nutrition data in your app