How to Look Up Food Nutrition with Copilot
Food nutrition data in your IDE with Copilot and ToolRouter. Nutrition facts for developers.
ToolNutrition DataCopilot 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
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 Nutrition Data tool:
- In Copilot Chat: "Look up nutrition facts for oatmeal using nutrition-data"
- Copilot returns the nutritional breakdown
- Ask: "Format this as a JSON object for my nutrition tracking app"
- 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