[Integrations](https://spiral.ai/integrations) › [VS Code](https://spiral.ai/integrations/vscode) › [Canadian Nutrient File nutrient dictionary](https://spiral.ai/integrations/vscode/canadian-nutrient-file-nutrient-dictionary)

# How to Use Canadian Nutrient File nutrient dictionary in VS Code

Get CNF nutrient identifiers, names, symbols, and units. Use it to distinguish nutrient definitions and label food comparisons correctly.

|  |  |
| --- | --- |
| Model | Canadian Nutrient File nutrient dictionary |
| Available through | Alexandria |
| Category | Industry Data |
| Price | $0.00873 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Canadian Nutrient File nutrient dictionary in VS Code

- Use Canadian Nutrient File nutrient dictionary to find protein, sodium, and dietary fiber, then add their returned identifiers and units to our project's comparison configuration.
- Use Canadian Nutrient File nutrient dictionary to look this up and give me the result as a table. Save the result in ./assets.
- Pull the latest numbers from Canadian Nutrient File nutrient dictionary and tell me what changed since last week.
- Check Canadian Nutrient File nutrient dictionary and summarize what you find in three bullet points.
- Pull the newest data from Canadian Nutrient File nutrient dictionary and give me the result as a table.

## How to set up Canadian Nutrient File nutrient dictionary in VS Code

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the hosted server**: Use Add to VS Code on the console's Agents & MCP page, or run:

```bash
code --add-mcp '{"name":"spiral","type":"http","url":"https://api.spiral.ai/mcp"}'
```

2. **Sign in**: VS Code asks you to sign in when it first starts the server: sign in to Spiral and click Authorize. No API key. Run MCP: List Servers from the Command Palette to check that Spiral is running.

### Use the Spiral skill

1. **Send VS Code this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run Canadian Nutrient File nutrient dictionary**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "food-nutrition-canada-ca/foods/list_nutrients",
    "input": {
      "lang": "en"
    }
  }'
```

Then paste one of the prompts above: VS Code finds Canadian Nutrient File nutrient dictionary on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/vscode

## Canadian Nutrient File nutrient dictionary tools and prices

- [Canadian Nutrient File, Health Canada (food-nutrition.canada.ca) · List nutrients](https://spiral.ai/tools/alexandria/food-nutrition-canada-ca/foods/list_nutrients) (Alexandria): $0.00873 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| lang | en, fr | en | lang |
| query |  | — | Substring to find in the nutrient name, display name, symbol or tagname (e.g. 'vitamin d', 'PROT', 'folate'). Omitted or empty returns all 152 nutrients (~40 KB). |
| group_id | 1 to … | — | Keep only nutrients of this CNF nutrient group (1 Proximates, 2 Other Carbohydrates, 3 Minerals, 4 Vitamins, 5 Amino Acids, 6 Lipids, 7 Other components). |

## What can you do with Canadian Nutrient File nutrient dictionary in VS Code?

Build a Canadian food comparison feature with CNF descriptions, categories, nutrient definitions, and portion-aware results. A coding agent can turn this 2015 reference data into labeled tables for recipe and menu projects.

### Build a recipe substitution reference

Find descriptions matching lentils, beans, and chickpeas, organize them by CNF food category, resolve protein and fiber definitions, rank candidates, and inspect portions before proposing ingredient substitutions.

### Compare cafeteria menu ingredients

Organize candidate ingredients by food category, match their preparation descriptions, identify sodium and protein units, and compare ranked foods with their detailed serving profiles.

### Create a food composition classroom exercise

Let students choose a CNF category and nutrient, find familiar foods, examine the ranking, and compare the reported portions with complete food profiles. Include the edition and nutrient units in the worksheet.

### Screen ingredients for a product concept

Build a category-based shortlist for a soup or snack concept, resolve the nutrients of interest, rank candidate foods, and review matching descriptions and portion values. Use the results as reference estimates during concept work.

### Explain nutrient units in food comparisons

Look up nutrient definitions and units, then use detailed food profiles to explain exactly which component a comparison measures.

### Draft a public food comparison article

Find the food descriptions used in an article, check nutrient definitions, and inspect ranked results and detailed profiles before writing comparisons.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All VS Code guides](https://spiral.ai/integrations/vscode)

## Canadian Nutrient File nutrient dictionary in other agents

- [Amp](https://spiral.ai/integrations/amp/canadian-nutrient-file-nutrient-dictionary)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/canadian-nutrient-file-nutrient-dictionary)
- [Claude](https://spiral.ai/integrations/claude-desktop/canadian-nutrient-file-nutrient-dictionary)
- [Claude Code](https://spiral.ai/integrations/claude-code/canadian-nutrient-file-nutrient-dictionary)
- [Cline](https://spiral.ai/integrations/cline/canadian-nutrient-file-nutrient-dictionary)
- [Codex](https://spiral.ai/integrations/codex/canadian-nutrient-file-nutrient-dictionary)
- [Cursor](https://spiral.ai/integrations/cursor/canadian-nutrient-file-nutrient-dictionary)
- [Devin](https://spiral.ai/integrations/devin/canadian-nutrient-file-nutrient-dictionary)
- [dots](https://spiral.ai/integrations/dots/canadian-nutrient-file-nutrient-dictionary)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/canadian-nutrient-file-nutrient-dictionary)
- [Gemini](https://spiral.ai/integrations/gemini/canadian-nutrient-file-nutrient-dictionary)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/canadian-nutrient-file-nutrient-dictionary)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/canadian-nutrient-file-nutrient-dictionary)
- [goose](https://spiral.ai/integrations/goose/canadian-nutrient-file-nutrient-dictionary)
- [Grok](https://spiral.ai/integrations/grok/canadian-nutrient-file-nutrient-dictionary)
- [Grok Build](https://spiral.ai/integrations/grok-build/canadian-nutrient-file-nutrient-dictionary)
- [Hermes](https://spiral.ai/integrations/hermes/canadian-nutrient-file-nutrient-dictionary)
- [Instinct](https://spiral.ai/integrations/instinct/canadian-nutrient-file-nutrient-dictionary)
- [Manus](https://spiral.ai/integrations/manus/canadian-nutrient-file-nutrient-dictionary)
- [Muse](https://spiral.ai/integrations/muse/canadian-nutrient-file-nutrient-dictionary)
- [Muse Code](https://spiral.ai/integrations/muse-code/canadian-nutrient-file-nutrient-dictionary)
- [n8n](https://spiral.ai/integrations/n8n/canadian-nutrient-file-nutrient-dictionary)
- [Notion](https://spiral.ai/integrations/notion/canadian-nutrient-file-nutrient-dictionary)
- [OpenClaw](https://spiral.ai/integrations/openclaw/canadian-nutrient-file-nutrient-dictionary)
- [opencode](https://spiral.ai/integrations/opencode/canadian-nutrient-file-nutrient-dictionary)
- [Perplexity](https://spiral.ai/integrations/perplexity/canadian-nutrient-file-nutrient-dictionary)
- [Raycast](https://spiral.ai/integrations/raycast/canadian-nutrient-file-nutrient-dictionary)
- [Windsurf](https://spiral.ai/integrations/windsurf/canadian-nutrient-file-nutrient-dictionary)
- [Zapier](https://spiral.ai/integrations/zapier/canadian-nutrient-file-nutrient-dictionary)

## More VS Code guides

- [Canadian Nutrient File food search](https://spiral.ai/integrations/vscode/canadian-nutrient-file-food-search)
- [Canadian Nutrient File nutrient rankings](https://spiral.ai/integrations/vscode/canadian-nutrient-file-nutrient-rankings)
- [Canadian Nutrient File food groups](https://spiral.ai/integrations/vscode/canadian-nutrient-file-food-groups)
- [Free Use Bible commentary](https://spiral.ai/integrations/vscode/free-use-bible-commentary)
- [Canadian Nutrient File food details](https://spiral.ai/integrations/vscode/canadian-nutrient-file-food-details)
- [Free Use Bible commentary catalog](https://spiral.ai/integrations/vscode/free-use-bible-commentary-catalog)

## Questions about Canadian Nutrient File nutrient dictionary in VS Code

**Can VS Code use Canadian Nutrient File nutrient dictionary?**

Yes. Add Spiral to VS Code as an MCP server, and VS Code can find and run Canadian Nutrient File nutrient dictionary like any built-in tool.

**How much does Canadian Nutrient File nutrient dictionary cost in VS Code?**

$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your VS Code plan is separate.

**Do I need an Alexandria account to use Canadian Nutrient File nutrient dictionary in VS Code?**

No. Spiral runs Canadian Nutrient File nutrient dictionary on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up Canadian Nutrient File nutrient dictionary in VS Code?**

About two minutes: add the hosted server, then sign in.

**Does VS Code wait while Canadian Nutrient File nutrient dictionary runs?**

Canadian Nutrient File nutrient dictionary runs in the background. VS Code starts the run, checks on it and gives you the json when it's ready.

**Does the online CNF contain the latest Canadian nutrient dataset?**

The online CNF still serves the 2015 edition, and Health Canada says those pages will not be updated. The 2026 dataset is available separately, so an online lookup does not establish a food's current formulation.

**How much food and nutrient coverage does the online edition have?**

The 2015 CNF contains 5,690 foods with up to 152 food components. Coverage varies by food and nutrient; an unavailable nutrient value is not a measured zero.

**Where do the Canadian food values come from?**

The 2015 CNF incorporates USDA reference data through SR27 for foods corresponding to the Canadian market. Health Canada adjusts values for Canadian fortification and regulatory standards and adds Canadian food data.

**Are nutrient amounts based on a serving or on food weight?**

The underlying CNF values are recorded per 100 grams of edible food. Food-specific conversion factors translate those values into household measures, so a volume measure needs the weight associated with that food.

**Can CNF values replace a packaged product's nutrition label?**

CNF values generally represent averages across products, with brand-specific information only where the description identifies it. Health Canada says the generic information is not specific enough to produce a product's Nutrition Facts table.

