@cyanheads/openfoodfacts-mcp-server 0.1.10 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/AGENTS.md +10 -10
  2. package/CLAUDE.md +10 -10
  3. package/README.md +18 -14
  4. package/changelog/0.2.x/0.2.0.md +24 -0
  5. package/changelog/0.3.x/0.3.0.md +19 -0
  6. package/dist/config/server-config.d.ts +1 -0
  7. package/dist/config/server-config.d.ts.map +1 -1
  8. package/dist/config/server-config.js +7 -0
  9. package/dist/config/server-config.js.map +1 -1
  10. package/dist/mcp-server/tools/definitions/browse-taxonomy.tool.d.ts +1 -0
  11. package/dist/mcp-server/tools/definitions/browse-taxonomy.tool.d.ts.map +1 -1
  12. package/dist/mcp-server/tools/definitions/browse-taxonomy.tool.js +33 -14
  13. package/dist/mcp-server/tools/definitions/browse-taxonomy.tool.js.map +1 -1
  14. package/dist/mcp-server/tools/definitions/compare-products.tool.d.ts.map +1 -1
  15. package/dist/mcp-server/tools/definitions/compare-products.tool.js +5 -1
  16. package/dist/mcp-server/tools/definitions/compare-products.tool.js.map +1 -1
  17. package/dist/mcp-server/tools/definitions/get-product.tool.d.ts +16 -3
  18. package/dist/mcp-server/tools/definitions/get-product.tool.d.ts.map +1 -1
  19. package/dist/mcp-server/tools/definitions/get-product.tool.js +173 -30
  20. package/dist/mcp-server/tools/definitions/get-product.tool.js.map +1 -1
  21. package/dist/mcp-server/tools/definitions/index.d.ts +17 -3
  22. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  23. package/dist/mcp-server/tools/definitions/search-products.tool.d.ts.map +1 -1
  24. package/dist/mcp-server/tools/definitions/search-products.tool.js +3 -1
  25. package/dist/mcp-server/tools/definitions/search-products.tool.js.map +1 -1
  26. package/dist/services/openfoodfacts/openfoodfacts-service.d.ts +15 -0
  27. package/dist/services/openfoodfacts/openfoodfacts-service.d.ts.map +1 -1
  28. package/dist/services/openfoodfacts/openfoodfacts-service.js +47 -2
  29. package/dist/services/openfoodfacts/openfoodfacts-service.js.map +1 -1
  30. package/dist/services/openfoodfacts/types.d.ts +30 -0
  31. package/dist/services/openfoodfacts/types.d.ts.map +1 -1
  32. package/dist/services/taxonomy/taxonomy-service.d.ts +28 -11
  33. package/dist/services/taxonomy/taxonomy-service.d.ts.map +1 -1
  34. package/dist/services/taxonomy/taxonomy-service.js +130 -18
  35. package/dist/services/taxonomy/taxonomy-service.js.map +1 -1
  36. package/package.json +1 -1
  37. package/server.json +17 -3
package/AGENTS.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** openfoodfacts-mcp-server
4
- **Version:** 0.1.10
4
+ **Version:** 0.3.0
5
5
  **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.11.0`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
@@ -42,8 +42,10 @@ export const offGetProduct = tool('off_get_product', {
42
42
  }),
43
43
  output: z.object({
44
44
  barcode: z.string().describe('Barcode as returned by the API.'),
45
- found: z.boolean().describe('False when the barcode has no contributor record.'),
46
- product: z.object({ /* ... */ }).optional().describe('Product data. Absent when found is false.'),
45
+ // No `found` flag: a missing record is the thrown not_found error, so a boolean here could
46
+ // only ever be true. Don't advertise a state the handler cannot return — a caller that
47
+ // branches on it never handles the path that actually fires.
48
+ product: z.object({ /* ... */ }).describe('Product data. Always present on success.'),
47
49
  }),
48
50
  errors: [
49
51
  {
@@ -56,16 +58,14 @@ export const offGetProduct = tool('off_get_product', {
56
58
 
57
59
  async handler(input, ctx) {
58
60
  const svc = getOpenFoodFactsService();
59
- const result = await svc.getProduct(input.barcode, input.fields);
60
- if (!result.found) throw ctx.fail('not_found', `Barcode ${input.barcode} not found`);
61
- return result;
61
+ const product = await svc.getProduct(input.barcode, ctx);
62
+ if (!product) throw ctx.fail('not_found', `Barcode ${input.barcode} not found`);
63
+ return { barcode: input.barcode, product };
62
64
  },
63
65
 
64
66
  format: (result) => [{
65
67
  type: 'text',
66
- text: result.found
67
- ? `**${result.product?.product_name ?? 'Unknown'}** (${result.barcode})`
68
- : `Not found: ${result.barcode}`,
68
+ text: `**${result.product.product_name ?? 'Unknown'}** (${result.barcode})`,
69
69
  }],
70
70
  });
71
71
  ```
@@ -178,7 +178,7 @@ src/
178
178
  openfoodfacts-service.ts # Open Food Facts API client (HTTP, rate limiting, retry)
179
179
  types.ts # Domain types
180
180
  taxonomy/
181
- taxonomy-service.ts # Embedded tag vocabulary (categories, labels, allergens, etc.)
181
+ taxonomy-service.ts # Tag vocabulary — live resolution, offline sample, merge/fallback policy
182
182
  mcp-server/
183
183
  tools/definitions/
184
184
  get-product.tool.ts # off_get_product
package/CLAUDE.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** openfoodfacts-mcp-server
4
- **Version:** 0.1.10
4
+ **Version:** 0.3.0
5
5
  **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.11.0`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
@@ -42,8 +42,10 @@ export const offGetProduct = tool('off_get_product', {
42
42
  }),
43
43
  output: z.object({
44
44
  barcode: z.string().describe('Barcode as returned by the API.'),
45
- found: z.boolean().describe('False when the barcode has no contributor record.'),
46
- product: z.object({ /* ... */ }).optional().describe('Product data. Absent when found is false.'),
45
+ // No `found` flag: a missing record is the thrown not_found error, so a boolean here could
46
+ // only ever be true. Don't advertise a state the handler cannot return — a caller that
47
+ // branches on it never handles the path that actually fires.
48
+ product: z.object({ /* ... */ }).describe('Product data. Always present on success.'),
47
49
  }),
48
50
  errors: [
49
51
  {
@@ -56,16 +58,14 @@ export const offGetProduct = tool('off_get_product', {
56
58
 
57
59
  async handler(input, ctx) {
58
60
  const svc = getOpenFoodFactsService();
59
- const result = await svc.getProduct(input.barcode, input.fields);
60
- if (!result.found) throw ctx.fail('not_found', `Barcode ${input.barcode} not found`);
61
- return result;
61
+ const product = await svc.getProduct(input.barcode, ctx);
62
+ if (!product) throw ctx.fail('not_found', `Barcode ${input.barcode} not found`);
63
+ return { barcode: input.barcode, product };
62
64
  },
63
65
 
64
66
  format: (result) => [{
65
67
  type: 'text',
66
- text: result.found
67
- ? `**${result.product?.product_name ?? 'Unknown'}** (${result.barcode})`
68
- : `Not found: ${result.barcode}`,
68
+ text: `**${result.product.product_name ?? 'Unknown'}** (${result.barcode})`,
69
69
  }],
70
70
  });
71
71
  ```
@@ -178,7 +178,7 @@ src/
178
178
  openfoodfacts-service.ts # Open Food Facts API client (HTTP, rate limiting, retry)
179
179
  types.ts # Domain types
180
180
  taxonomy/
181
- taxonomy-service.ts # Embedded tag vocabulary (categories, labels, allergens, etc.)
181
+ taxonomy-service.ts # Tag vocabulary — live resolution, offline sample, merge/fallback policy
182
182
  mcp-server/
183
183
  tools/definitions/
184
184
  get-product.tool.ts # off_get_product
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![Version](https://img.shields.io/badge/Version-0.1.10-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/openfoodfacts-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.29.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/openfoodfacts-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/openfoodfacts-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3.0-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-0.3.0-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/openfoodfacts-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.29.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/openfoodfacts-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/openfoodfacts-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3.0-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
12
12
  </div>
13
13
 
@@ -36,17 +36,17 @@ Four tools for working with [Open Food Facts](https://world.openfoodfacts.org/)
36
36
  | `off_get_product` | Fetch a packaged food product by barcode. Returns name, brand, quantity, ingredients, allergens, additives, Nutri-Score, NOVA group, Green-Score, nutrition per 100g/serving, categories, labels, and data completeness. |
37
37
  | `off_search_products` | Search by text query and/or structured tag filters (category, brand, label, allergen, additive, Nutri-Score grade, NOVA group, country). Returns summary rows with barcodes for follow-up lookups. |
38
38
  | `off_compare_products` | Side-by-side nutrition and scoring comparison for 2–10 products by barcode. Returns a normalized table of energy, macros, salt, Nutri-Score, NOVA, and Green-Score. |
39
- | `off_browse_taxonomy` | Browse and search the canonical tag vocabulary (categories, labels, allergens, additives, countries, NOVA groups, Nutri-Score grades) for use as filter values in `off_search_products`. |
39
+ | `off_browse_taxonomy` | Resolve a human term to the canonical tag ID (categories, labels, allergens, additives, countries, NOVA groups, Nutri-Score grades) that `off_search_products` filters on, against the live Open Food Facts taxonomy. |
40
40
 
41
41
  ### `off_get_product`
42
42
 
43
43
  Fetch a packaged food product by barcode (EAN-13 or UPC).
44
44
 
45
45
  - Accepts 8–14 digit barcodes (EAN-13, EAN-8, UPC-A, UPC-E)
46
- - Returns ingredients (raw text and parsed list with percent estimates, vegan/vegetarian flags), all 14 major allergens as tag IDs, E-number additives, Nutri-Score a–e, NOVA 1–4, Green-Score/Eco-Score, full nutriments per 100g and per serving, categories/labels/packaging/origins as canonical tag IDs, front image URL, and data completeness score (0–1)
46
+ - Returns ingredients (raw text and parsed list with percent estimates, vegan/vegetarian flags), all 14 major allergens as tag IDs, E-number additives, Nutri-Score a–e, NOVA 1–4, Green-Score/Eco-Score, every nutrient Open Food Facts holds per 100g and per serving, the serving size those per-serving figures are measured against, categories/labels/packaging/origins as canonical tag IDs, front image URL, and data completeness score (0–1)
47
47
  - Optional `fields` parameter restricts the response to a subset (e.g., scores only, or nutrition only)
48
48
  - Open Food Facts is crowd-sourced — a missing field means "not yet entered by contributors," not that the attribute is absent from the actual product
49
- - `found: false` means no contributor has recorded this barcode yet — not a product defect
49
+ - A barcode no contributor has recorded raises the `not_found` error carrying a recovery hint — it is never returned as an empty result
50
50
 
51
51
  ---
52
52
 
@@ -82,13 +82,16 @@ Side-by-side nutrition and scoring comparison for 2–10 barcodes.
82
82
 
83
83
  ### `off_browse_taxonomy`
84
84
 
85
- Browse the canonical Open Food Facts tag vocabulary before building `off_search_products` filters.
85
+ Resolve a human term to the canonical Open Food Facts tag ID before building `off_search_products` filters.
86
86
 
87
87
  - Facets: `categories`, `labels`, `allergens`, `additives`, `countries`, `nova_groups`, `nutrition_grades`
88
- - Optional `search` parameter: case-insensitive substring match against tag ID or display name (e.g., `"gluten"` → `en:gluten`, `en:no-gluten`, `en:no-added-gluten`)
89
- - Taxonomy is served from a curated in-process vocabulary — no live network call, so lookups are instant and offline
90
- - The categories facet is broad — pass a `search` term to narrow it to the relevant tags
91
- - `limit` controls results returned (1–100, default 20)
88
+ - With a `search` term, the five open facets resolve against the live Open Food Facts taxonomy — tens of thousands of category tags, not a fixed local list. Matching is case-insensitive substring against tag ID or display name (e.g., `"gluten"` → `en:no-gluten`, `en:gluten-free`)
89
+ - Upstream tags are often plural (`"kombucha"` → `en:kombuchas`) — pass the returned `id` through unchanged rather than constructing one
90
+ - `nova_groups` and `nutrition_grades` are closed vocabularies answered offline and returned complete. Their IDs are bare (`1`–`4`, `a`–`e`), matching what `off_search_products` accepts
91
+ - Live results are merged behind an in-process sample that also serves offline operation. If Open Food Facts is unreachable or the taxonomy budget is spent, the tool answers from that sample and says so rather than failing — an empty result is never presented as an authoritative "no such tag"
92
+ - Omitting `search` lists only the offline sample. The upstream taxonomy endpoint suggests against a term and cannot enumerate a facet, so an unfiltered call is not a view of the full vocabulary and reports no facet total
93
+ - `limit` controls results returned (1–100, default 20). There is no offset or page input — the upstream endpoint offers no cursor, so narrow the term instead
94
+ - Taxonomy lookups carry their own ~10 requests/min client-side budget, separate from the search budget
92
95
 
93
96
  ---
94
97
 
@@ -106,14 +109,14 @@ Built on [`@cyanheads/mcp-ts-core`](https://www.npmjs.com/package/@cyanheads/mcp
106
109
  Open Food Facts-specific:
107
110
 
108
111
  - No API key required — the identifying `User-Agent` header (required by OFF terms) is baked into the service layer
109
- - Token-bucket rate limiting per endpoint class: product reads (~100/min), search (~10/min). A local refusal says so — it never reports itself as an Open Food Facts rate limit
112
+ - Token-bucket rate limiting per endpoint class: product reads (~100/min), search (~10/min), taxonomy resolution (~10/min). A local refusal says so — it never reports itself as an Open Food Facts rate limit
110
113
  - Automatic retry (3 attempts, 500ms base) for transient failures only — 5xx, timeouts, and 429 (honoring `Retry-After`), with HTML error page detection for 503 during high load. A 4xx is never retried; the upstream's own explanation is surfaced instead
111
- - Nutriments normalized from raw hyphenated keys (`energy-kcal_100g`) to underscore form — only the `_100g` and `_serving` variants are returned
112
- - Embedded tag taxonomy for `off_browse_taxonomy` — curated 200+ category subset, full allergen/label/additive vocabularies
114
+ - Nutriments normalized from raw hyphenated keys (`energy-kcal_100g`) to underscore form — the `_100g` and `_serving` variants of every nutrient on the record, with the macros as named fields and the rest in an open map that carries each nutrient's own unit (micronutrients are reported in grams, so calcium `0.071` is 71 mg)
115
+ - Live tag resolution for `off_browse_taxonomy` against the Open Food Facts taxonomy, merged behind a small in-process sample that covers offline operation and is authoritative for E-number lookups, which the upstream suggester answers poorly
113
116
 
114
117
  Agent-friendly output:
115
118
 
116
- - `found` field on every product response — explicit `false` when a barcode has no contributor record, not a thrown error
119
+ - Per-serving nutrition always carries its denominator — `serving_size` as printed plus the parsed `serving_quantity`/`serving_quantity_unit`, and an explicit note when Open Food Facts has recorded none
117
120
  - Missing fields signal incomplete crowd-sourced data, not product attribute absence — surfaced in descriptions and format output
118
121
  - Computed scores (Nutri-Score, NOVA, Green-Score) returned as-is with regional caveat notes — not interpreted or normalized to health claims
119
122
  - `not_found` list in `off_compare_products` allows partial batch comparisons without request failure — and a barcode whose fetch failed lands in `failed` instead, so a transport error is never reported as "no contributor record"
@@ -240,6 +243,7 @@ All configuration is validated at startup via Zod schemas in `src/config/server-
240
243
  | `OFF_BASE_URL` | Open Food Facts API base URL. Override for local testing against a mock server. | `https://world.openfoodfacts.org` |
241
244
  | `OFF_RATE_LIMIT_PRODUCT` | Product read rate limit (requests/min). | `100` |
242
245
  | `OFF_RATE_LIMIT_SEARCH` | Search rate limit (requests/min). | `10` |
246
+ | `OFF_RATE_LIMIT_TAXONOMY` | Taxonomy resolution rate limit (requests/min). A spent budget falls back to the offline sample rather than failing. | `10` |
243
247
  | `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http`. | `stdio` |
244
248
  | `MCP_HTTP_PORT` | HTTP server port. | `3010` |
245
249
  | `MCP_AUTH_MODE` | Auth mode: `none`, `jwt`, or `oauth`. | `none` |
@@ -292,7 +296,7 @@ The Dockerfile defaults to HTTP transport, stateless session mode, and logs to `
292
296
  | `src/config` | Server-specific environment variable parsing and validation with Zod. |
293
297
  | `src/mcp-server/tools` | Tool definitions (`*.tool.ts`). |
294
298
  | `src/services/openfoodfacts` | Open Food Facts API client — HTTP, rate limiting, retry, field normalization. |
295
- | `src/services/taxonomy` | Embedded tag vocabulary service for `off_browse_taxonomy`. |
299
+ | `src/services/taxonomy` | Tag vocabulary service for `off_browse_taxonomy` — live resolution, offline sample, merge and fallback policy. |
296
300
  | `tests/` | Unit and integration tests mirroring `src/`. |
297
301
 
298
302
  ## Development guide
@@ -0,0 +1,24 @@
1
+ ---
2
+ summary: "BREAKING: off_get_product drops the unreachable found field and makes product required. Nutriments now cover every upstream nutrient via additional_100g/additional_serving, per-serving figures carry serving_size, and format() reaches full parity with structuredContent."
3
+ breaking: true
4
+ security: false
5
+ ---
6
+
7
+ # 0.2.0 — 2026-07-26
8
+
9
+ ## Removed
10
+
11
+ - **`off_get_product`** — `found` output field removed. It was unreachable: the handler already throws the typed `not_found` error before constructing an output, so `found` could only ever be `true`. **Breaking:** callers checking `result.found === false` must switch to relying on the `not_found` error instead — the not-found behavior itself is unchanged, only the schema catches up to it. ([#20](https://github.com/cyanheads/openfoodfacts-mcp-server/issues/20))
12
+
13
+ ## Changed
14
+
15
+ - **`off_get_product`** — `product` is now a required output field (previously optional, paired with `found`). Always present on a successful call.
16
+
17
+ ## Added
18
+
19
+ - **`off_get_product`** — `additional_100g` / `additional_serving` open nutrient maps surface every nutrient Open Food Facts returns beyond the 12 named macros (calcium, iron, vitamins, trans fat, added sugars, energy in kJ, …), each carrying the unit Open Food Facts reported it in. ([#17](https://github.com/cyanheads/openfoodfacts-mcp-server/issues/17))
20
+ - **`off_get_product`** — `serving_size`, `serving_quantity`, and `serving_quantity_unit` returned alongside per-serving nutrition, so per-serving figures carry their denominator. `serving_quantity` is coerced from either a JSON number or a numeric string, since Open Food Facts returns both across products; the unit is not assumed to be grams (some products report millilitres). ([#16](https://github.com/cyanheads/openfoodfacts-mcp-server/issues/16))
21
+
22
+ ## Fixed
23
+
24
+ - **`format()`** across `off_get_product`, `off_search_products`, and `off_compare_products` now renders full parity with `structuredContent`: parsed ingredients and category tags render in full instead of the previous 20/5/3 caps, `completeness` and ingredient `percent_estimate` render at exact precision alongside the rounded percentage, and `vegan`/`vegetarian` `'maybe'` verdicts render instead of being silently dropped. ([#9](https://github.com/cyanheads/openfoodfacts-mcp-server/issues/9))
@@ -0,0 +1,19 @@
1
+ ---
2
+ summary: "off_browse_taxonomy resolves search terms against the live Open Food Facts taxonomy instead of a 79-entry embedded list, and nova_groups tag IDs are now bare digits that round-trip into off_search_products."
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.3.0 — 2026-07-26
8
+
9
+ ## Added
10
+
11
+ - **`off_browse_taxonomy`** — a search term now resolves against the live Open Food Facts taxonomy (`search.openfoodfacts.org/autocomplete`) for the five open facets (`categories`, `labels`, `allergens`, `additives`, `countries`), merged behind the embedded offline sample. Fixes ordinary terms (hummus, tofu, kombucha, pizzas) dead-ending on the 79-entry embedded category list. ([#14](https://github.com/cyanheads/openfoodfacts-mcp-server/issues/14))
12
+ - **`OFF_RATE_LIMIT_TAXONOMY`** env var (default `10`/min) — taxonomy resolution's own rate-limit tier, separate from the search budget.
13
+ - **`off_browse_taxonomy`** enrichment gains a `notice` field: names whether an answer came from the offline sample, a failed live lookup, or a genuine no-match, so an empty result is never read as an authoritative "no such tag."
14
+
15
+ ## Changed
16
+
17
+ - **`off_browse_taxonomy`** — `nova_groups` tag IDs are now bare digits (`1`–`4`) instead of `en:1`–`en:4`, matching what `off_search_products`' `nova_group` enum accepts and the bare-letter convention `nutrition_grades` already used. The previous IDs were rejected outright by `off_search_products`. ([#15](https://github.com/cyanheads/openfoodfacts-mcp-server/issues/15))
18
+ - **`off_browse_taxonomy`** — `total_in_facet` is now omitted for the five live facets, since the autocomplete endpoint reports no match total and cannot be enumerated. Still returned for the closed `nova_groups`/`nutrition_grades` vocabularies.
19
+ - **`off_browse_taxonomy`** — `annotations.openWorldHint` flips to `true`.
@@ -7,6 +7,7 @@ declare const ServerConfigSchema: z.ZodObject<{
7
7
  baseUrl: z.ZodDefault<z.ZodString>;
8
8
  rateLimitProduct: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
9
9
  rateLimitSearch: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
10
+ rateLimitTaxonomy: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
10
11
  }, z.core.$strip>;
11
12
  export type ServerConfig = z.infer<typeof ServerConfigSchema>;
12
13
  /** Lazy-parsed server config from environment variables. */
@@ -1 +1 @@
1
- {"version":3,"file":"server-config.d.ts","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAG3C,QAAA,MAAM,kBAAkB;;;;iBAiBtB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAI9D,4DAA4D;AAC5D,wBAAgB,eAAe,IAAI,YAAY,CAO9C"}
1
+ {"version":3,"file":"server-config.d.ts","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAG3C,QAAA,MAAM,kBAAkB;;;;;iBAuBtB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAI9D,4DAA4D;AAC5D,wBAAgB,eAAe,IAAI,YAAY,CAQ9C"}
@@ -21,6 +21,12 @@ const ServerConfigSchema = z.object({
21
21
  .min(1)
22
22
  .default(10)
23
23
  .describe('Search rate limit (requests/min)'),
24
+ rateLimitTaxonomy: z.coerce
25
+ .number()
26
+ .int()
27
+ .min(1)
28
+ .default(10)
29
+ .describe('Taxonomy resolution rate limit (requests/min)'),
24
30
  });
25
31
  let _config;
26
32
  /** Lazy-parsed server config from environment variables. */
@@ -29,6 +35,7 @@ export function getServerConfig() {
29
35
  baseUrl: 'OFF_BASE_URL',
30
36
  rateLimitProduct: 'OFF_RATE_LIMIT_PRODUCT',
31
37
  rateLimitSearch: 'OFF_RATE_LIMIT_SEARCH',
38
+ rateLimitTaxonomy: 'OFF_RATE_LIMIT_TAXONOMY',
32
39
  });
33
40
  return _config;
34
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"server-config.js","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,OAAO,CAAC,iCAAiC,CAAC;SAC1C,QAAQ,CAAC,8BAA8B,CAAC;IAC3C,gBAAgB,EAAE,CAAC,CAAC,MAAM;SACvB,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,OAAO,CAAC,GAAG,CAAC;SACZ,QAAQ,CAAC,wCAAwC,CAAC;IACrD,eAAe,EAAE,CAAC,CAAC,MAAM;SACtB,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,OAAO,CAAC,EAAE,CAAC;SACX,QAAQ,CAAC,kCAAkC,CAAC;CAChD,CAAC,CAAC;AAIH,IAAI,OAAiC,CAAC;AAEtC,4DAA4D;AAC5D,MAAM,UAAU,eAAe;IAC7B,OAAO,KAAK,cAAc,CAAC,kBAAkB,EAAE;QAC7C,OAAO,EAAE,cAAc;QACvB,gBAAgB,EAAE,wBAAwB;QAC1C,eAAe,EAAE,uBAAuB;KACzC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC"}
1
+ {"version":3,"file":"server-config.js","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,OAAO,CAAC,iCAAiC,CAAC;SAC1C,QAAQ,CAAC,8BAA8B,CAAC;IAC3C,gBAAgB,EAAE,CAAC,CAAC,MAAM;SACvB,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,OAAO,CAAC,GAAG,CAAC;SACZ,QAAQ,CAAC,wCAAwC,CAAC;IACrD,eAAe,EAAE,CAAC,CAAC,MAAM;SACtB,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,OAAO,CAAC,EAAE,CAAC;SACX,QAAQ,CAAC,kCAAkC,CAAC;IAC/C,iBAAiB,EAAE,CAAC,CAAC,MAAM;SACxB,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,OAAO,CAAC,EAAE,CAAC;SACX,QAAQ,CAAC,+CAA+C,CAAC;CAC7D,CAAC,CAAC;AAIH,IAAI,OAAiC,CAAC;AAEtC,4DAA4D;AAC5D,MAAM,UAAU,eAAe;IAC7B,OAAO,KAAK,cAAc,CAAC,kBAAkB,EAAE;QAC7C,OAAO,EAAE,cAAc;QACvB,gBAAgB,EAAE,wBAAwB;QAC1C,eAAe,EAAE,uBAAuB;QACxC,iBAAiB,EAAE,yBAAyB;KAC7C,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -24,6 +24,7 @@ export declare const offBrowseTaxonomyTool: import("@cyanheads/mcp-ts-core").Too
24
24
  }, z.core.$strip>>;
25
25
  total_in_facet: z.ZodOptional<z.ZodNumber>;
26
26
  }, z.core.$strip>, undefined, {
27
+ readonly notice: z.ZodOptional<z.ZodString>;
27
28
  readonly truncated: z.ZodOptional<z.ZodBoolean>;
28
29
  readonly shown: z.ZodOptional<z.ZodNumber>;
29
30
  readonly cap: z.ZodOptional<z.ZodNumber>;
@@ -1 +1 @@
1
- {"version":3,"file":"browse-taxonomy.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/browse-taxonomy.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;EA+HhC,CAAC"}
1
+ {"version":3,"file":"browse-taxonomy.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/browse-taxonomy.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;EAiJhC,CAAC"}
@@ -6,11 +6,11 @@ import { tool, z } from '@cyanheads/mcp-ts-core';
6
6
  import { getTaxonomyService } from '../../../services/taxonomy/taxonomy-service.js';
7
7
  export const offBrowseTaxonomyTool = tool('off_browse_taxonomy', {
8
8
  title: 'Browse Food Facts Taxonomy',
9
- description: 'Browse and search the canonical tag vocabulary for Open Food Facts filter facets. Returns tag IDs and display names for use as filter values in off_search_products. Covers categories, labels/certifications, allergens, additives, countries, NOVA groups, and Nutri-Score grades. Tag IDs use the "en:" prefix convention (e.g. "en:organic", "en:gluten-free", "en:milk"). Use these tag IDs as filter values, not plain English terms.',
9
+ description: 'Resolve a human term to the canonical Open Food Facts tag ID that off_search_products filters on. Covers categories, labels/certifications, allergens, additives, countries, NOVA groups, and Nutri-Score grades. Pass a search term to resolve against the live Open Food Facts vocabulary, which holds tens of thousands of tags; omitting it lists only the offline sample this server ships, which is a small slice of every facet except NOVA groups and Nutri-Score grades. Most tag IDs use the "en:" prefix (e.g. "en:organic", "en:gluten-free", "en:milk"); NOVA groups return bare digits "1"-"4" and Nutri-Score grades bare letters "a"-"e". Pass the id through to off_search_products exactly as returned. Category tags are frequently plural upstream ("kombucha" resolves to "en:kombuchas"), so use the returned id rather than constructing one.',
10
10
  annotations: {
11
11
  readOnlyHint: true,
12
12
  idempotentHint: true,
13
- openWorldHint: false,
13
+ openWorldHint: true,
14
14
  },
15
15
  input: z.object({
16
16
  facet: z
@@ -23,18 +23,18 @@ export const offBrowseTaxonomyTool = tool('off_browse_taxonomy', {
23
23
  'nova_groups',
24
24
  'nutrition_grades',
25
25
  ])
26
- .describe('"categories" covers food categories (en:cheeses, en:breakfast-cereals). "labels" covers certifications (en:organic, en:fair-trade). "allergens" covers declared allergens (en:milk, en:gluten). "additives" covers E-numbers (en:e322). "countries" covers country-of-sale tags (en:france). "nova_groups" and "nutrition_grades" return the complete fixed vocabularies.'),
26
+ .describe('"categories" covers food categories (en:cheeses, en:breakfast-cereals). "labels" covers certifications (en:organic, en:fair-trade). "allergens" covers declared allergens (en:milk, en:gluten). "additives" covers E-numbers (en:e322). "countries" covers country-of-sale tags (en:france). "nova_groups" and "nutrition_grades" are closed vocabularies answered offline and returned complete; the other five are resolved against the live Open Food Facts taxonomy.'),
27
27
  search: z
28
28
  .string()
29
29
  .optional()
30
- .describe('Case-insensitive substring filter against tag ID or display name. Example: "gluten" returns en:gluten, en:no-gluten. Omit to list all entries for the facet (may be large for categories).'),
30
+ .describe('Term to resolve. Matched case-insensitively as a substring of the tag ID or display name, against both the live Open Food Facts vocabulary and this server\'s offline sample. A single word works best ("hummus", not "hummus dip"). Omit only to see the offline sample — the live vocabulary cannot be listed without a term, so an unfiltered call is not a view of the full facet.'),
31
31
  limit: z
32
32
  .number()
33
33
  .int()
34
34
  .min(1)
35
35
  .max(100)
36
36
  .default(20)
37
- .describe('Maximum entries to return (1–100, default 20). The categories facet is broad; a search term narrows it to the relevant tags.'),
37
+ .describe('Maximum entries to return (1–100, default 20). There is no offset or page input: the upstream taxonomy endpoint serves only the first `limit` matches for a term and offers no cursor, so narrow the search term rather than paging.'),
38
38
  }),
39
39
  output: z.object({
40
40
  facet: z.string().describe('The facet name that was queried (echoes the input).'),
@@ -43,7 +43,7 @@ export const offBrowseTaxonomyTool = tool('off_browse_taxonomy', {
43
43
  .object({
44
44
  id: z
45
45
  .string()
46
- .describe('Canonical tag ID (e.g. "en:organic"). Use this value in off_search_products filter parameters.'),
46
+ .describe('Canonical tag ID (e.g. "en:organic"; bare "1"–"4" for NOVA groups, bare "a"–"e" for Nutri-Score grades). Pass this value through to the matching off_search_products filter parameter unchanged.'),
47
47
  name: z.string().describe('Human-readable display name (e.g. "Organic").'),
48
48
  products: z
49
49
  .number()
@@ -55,33 +55,50 @@ export const offBrowseTaxonomyTool = tool('off_browse_taxonomy', {
55
55
  total_in_facet: z
56
56
  .number()
57
57
  .optional()
58
- .describe('Total entries in this facet before search filtering. Large for categories.'),
58
+ .describe('Total entries in this facet. Present only for nova_groups and nutrition_grades, whose vocabularies are closed and complete here. Absent for the live facets: the Open Food Facts taxonomy endpoint reports no match total and cannot be enumerated, so no figure would be a real one.'),
59
59
  }),
60
60
  enrichment: {
61
+ notice: z
62
+ .string()
63
+ .optional()
64
+ .describe('Caveat about how this answer was produced — that the listing is the offline sample rather than the live vocabulary, that the live vocabulary was unreachable, or that nothing matched and why.'),
61
65
  truncated: z.boolean().optional().describe('True when more tags exist beyond the limit.'),
62
66
  shown: z.number().optional().describe('Number of tags returned.'),
63
67
  cap: z.number().optional().describe('The limit that was applied.'),
64
68
  },
65
- handler(input, ctx) {
69
+ async handler(input, ctx) {
66
70
  const svc = getTaxonomyService();
67
- const result = svc.search(input.facet, input.search && input.search.trim().length > 0 ? input.search.trim() : undefined, input.limit);
71
+ // The service trims and treats a blank term as absent, so the raw input goes through as given.
72
+ const result = await svc.search(input.facet, input.search, input.limit, ctx);
68
73
  ctx.log.info('Taxonomy browsed', {
69
74
  facet: input.facet,
70
75
  search: input.search,
71
76
  returned: result.tags.length,
72
- total: result.total_in_facet,
77
+ matched: result.matched_in_facet,
73
78
  });
74
79
  // Disclose truncation only when matching rows were dropped by the limit. Compare the
75
80
  // returned count against the filtered-match count, not the full facet size — otherwise a
76
81
  // filtered search (including a zero-match one) falsely reports truncation against the
77
82
  // pre-filter vocabulary total.
83
+ //
84
+ // `notice` is one slot, and ctx.enrich.truncated() writes it from `guidance`, so the service's
85
+ // caveat is routed through that argument when both apply rather than being emitted separately
86
+ // and silently overwritten. It is the more useful next move than the generic raise-the-limit
87
+ // default: on an unfiltered browse the answer is to pass a search term, not a larger cap.
78
88
  if (result.tags.length < result.matched_in_facet) {
79
- ctx.enrich.truncated({ shown: result.tags.length, cap: input.limit });
89
+ ctx.enrich.truncated({
90
+ shown: result.tags.length,
91
+ cap: input.limit,
92
+ ...(result.notice && { guidance: result.notice }),
93
+ });
94
+ }
95
+ else if (result.notice) {
96
+ ctx.enrich.notice(result.notice);
80
97
  }
81
98
  return {
82
99
  facet: result.facet,
83
100
  tags: result.tags,
84
- total_in_facet: result.total_in_facet,
101
+ ...(result.total_in_facet !== undefined && { total_in_facet: result.total_in_facet }),
85
102
  };
86
103
  },
87
104
  format: (result) => {
@@ -89,14 +106,16 @@ export const offBrowseTaxonomyTool = tool('off_browse_taxonomy', {
89
106
  `## ${result.facet} (${result.tags.length} entries${result.total_in_facet !== undefined ? ` of ${result.total_in_facet} total` : ''})\n`,
90
107
  ];
91
108
  if (result.tags.length === 0) {
92
- lines.push('No matching tags found. Try a different search term.');
109
+ // No claim about the vocabulary is made here — whether nothing matched or the live lookup
110
+ // failed is the notice's to say, and it reaches this surface as a trailer either way.
111
+ lines.push('No tags returned for this query.');
93
112
  return [{ type: 'text', text: lines.join('\n') }];
94
113
  }
95
114
  for (const tag of result.tags) {
96
115
  const products = tag.products !== undefined ? ` (~${tag.products.toLocaleString()} products)` : '';
97
116
  lines.push(`- \`${tag.id}\` — ${tag.name}${products}`);
98
117
  }
99
- lines.push('\n*Use the `id` values (e.g. "en:organic") as filter parameters in off_search_products.*');
118
+ lines.push('\n*Pass an `id` through to off_search_products exactly as shown — "en:organic" for most facets, bare "1"–"4" for NOVA groups, bare "a"–"e" for Nutri-Score grades.*');
100
119
  return [{ type: 'text', text: lines.join('\n') }];
101
120
  },
102
121
  });
@@ -1 +1 @@
1
- {"version":3,"file":"browse-taxonomy.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/browse-taxonomy.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAc,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAEzF,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC,qBAAqB,EAAE;IAC/D,KAAK,EAAE,4BAA4B;IACnC,WAAW,EACT,6aAA6a;IAC/a,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;QAClB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,KAAK;KACrB;IAED,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,KAAK,EAAE,CAAC;aACL,IAAI,CAAC;YACJ,YAAY;YACZ,QAAQ;YACR,WAAW;YACX,WAAW;YACX,WAAW;YACX,aAAa;YACb,kBAAkB;SACnB,CAAC;aACD,QAAQ,CACP,2WAA2W,CAC5W;QACH,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,4LAA4L,CAC7L;QACH,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,GAAG,CAAC;aACR,OAAO,CAAC,EAAE,CAAC;aACX,QAAQ,CACP,8HAA8H,CAC/H;KACJ,CAAC;IAEF,MAAM,EAAE,CAAC,CAAC,MAAM,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AE,CAAC;YAC9B,MAAM,QAAQ,GACZ,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,QAAQ,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;YACpF,KAAK,CAAC,IAAI,CAAC,OAAO,GAAG,CAAC,EAAE,QAAQ,GAAG,CAAC,IAAI,GAAG,QAAQ,EAAE,CAAC,CAAC;QACzD,CAAC;QAED,KAAK,CAAC,IAAI,CACR,0FAA0F,CAC3F,CAAC;QAEF,OAAO,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC7D,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"browse-taxonomy.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/browse-taxonomy.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAc,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAEzF,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC,qBAAqB,EAAE;IAC/D,KAAK,EAAE,4BAA4B;IACnC,WAAW,EACT,s0BAAs0B;IACx0B,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;QAClB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,IAAI;KACpB;IAED,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,KAAK,EAAE,CAAC;aACL,IAAI,CAAC;YACJ,YAAY;YACZ,QAAQ;YACR,WAAW;YACX,WAAW;YACX,WAAW;YACX,aAAa;YACb,kBAAkB;SACnB,CAAC;aACD,QAAQ,CACP,0cAA0c,CAC3c;QACH,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,wXAAwX,CACzX;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CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AA4F3E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsQjC,CAAC"}
1
+ {"version":3,"file":"compare-products.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/compare-products.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AA4F3E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA0QjC,CAAC"}
@@ -259,7 +259,11 @@ export const offCompareProductsTool = tool('off_compare_products', {
259
259
  const name = p.product_name
260
260
  ? `${p.product_name}${p.brands ? ` (${p.brands})` : ''}`
261
261
  : `Barcode ${p.barcode}`;
262
- const completeness = p.completeness !== undefined ? `${Math.round(p.completeness * 100)}%` : 'N/A';
262
+ // The exact scalar rides alongside the rounded percentage: 0.7875 and 0.79 both render as
263
+ // "79%", and a text-only client has no second call that would recover the difference.
264
+ const completeness = p.completeness !== undefined
265
+ ? `${Math.round(p.completeness * 100)}% (${p.completeness})`
266
+ : 'N/A';
263
267
  lines.push(`| ${name} | ${p.barcode} | ${p.found} | ${p.nutriscore_grade ?? 'N/A'} | ${p.nova_group ?? 'N/A'} | ${p.ecoscore_grade ?? 'N/A'} | ${completeness} |`);
264
268
  }
265
269
  // Nutrition table
@@ -1 +1 @@
1
- {"version":3,"file":"compare-products.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/compare-products.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAA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,CAAC,CAAC,CAAC,YAAY,KAAK,SAAS,IAAI,CAAC,CAAC,YAAY,GAAG,GAAG,CAC5D,CAAC;QACF,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC/B,KAAK,CAAC,IAAI,CACR,gCAAgC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,iCAAiC,CACpI,CAAC;QACJ,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,gFAAgF,CAAC,CAAC;QAE7F,OAAO,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC7D,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"compare-products.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/compare-products.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,mDAAmD,CAAC;AAG5F,uEAAuE;AACvE,MAAM,cAAc,GAClB,wFAAwF,CAAC;AAoB3F,2DAA2D;AAC3D,SAAS,CAAC,CAAC,GAAgD,EAAE,GAAW;IACtE,MAAM,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;IACnB,OAAO,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC/C,CAAC;AAQD;;;;;GAKG;AACH,SAAS,eAAe,CAAC,OAAe,EAAE,KAAc;IACtD,IAAI,KAAK,YAAY,QAAQ,EAAE,CAAC;QAC9B,MAAM,MAAM,GAAG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AE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC7D,CAAC;CACF,CAAC,CAAC"}
@@ -25,11 +25,13 @@ export declare const offGetProductTool: import("@cyanheads/mcp-ts-core").ToolDef
25
25
  packaging_tags: "packaging_tags";
26
26
  product_name: "product_name";
27
27
  quantity: "quantity";
28
+ serving_quantity: "serving_quantity";
29
+ serving_quantity_unit: "serving_quantity_unit";
30
+ serving_size: "serving_size";
28
31
  }>>>;
29
32
  }, z.core.$strip>, z.ZodObject<{
30
33
  barcode: z.ZodString;
31
- found: z.ZodBoolean;
32
- product: z.ZodOptional<z.ZodObject<{
34
+ product: z.ZodObject<{
33
35
  product_name: z.ZodOptional<z.ZodString>;
34
36
  brands: z.ZodOptional<z.ZodString>;
35
37
  quantity: z.ZodOptional<z.ZodString>;
@@ -59,7 +61,18 @@ export declare const offGetProductTool: import("@cyanheads/mcp-ts-core").ToolDef
59
61
  energy_kcal_serving: z.ZodOptional<z.ZodNumber>;
60
62
  fat_serving: z.ZodOptional<z.ZodNumber>;
61
63
  sugars_serving: z.ZodOptional<z.ZodNumber>;
64
+ additional_100g: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
65
+ value: z.ZodNumber;
66
+ unit: z.ZodOptional<z.ZodString>;
67
+ }, z.core.$strip>>>;
68
+ additional_serving: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
69
+ value: z.ZodNumber;
70
+ unit: z.ZodOptional<z.ZodString>;
71
+ }, z.core.$strip>>>;
62
72
  }, z.core.$strip>>;
73
+ serving_size: z.ZodOptional<z.ZodString>;
74
+ serving_quantity: z.ZodOptional<z.ZodNumber>;
75
+ serving_quantity_unit: z.ZodOptional<z.ZodString>;
63
76
  categories_tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
64
77
  labels_tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
65
78
  packaging_tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -67,7 +80,7 @@ export declare const offGetProductTool: import("@cyanheads/mcp-ts-core").ToolDef
67
80
  image_url: z.ZodOptional<z.ZodString>;
68
81
  completeness: z.ZodOptional<z.ZodNumber>;
69
82
  data_quality_tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
70
- }, z.core.$strip>>;
83
+ }, z.core.$strip>;
71
84
  requested_fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
72
85
  }, z.core.$strip>, readonly [{
73
86
  readonly reason: "not_found";
@@ -1 +1 @@
1
- {"version":3,"file":"get-product.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-product.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAqDjE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA2Z5B,CAAC"}
1
+ {"version":3,"file":"get-product.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-product.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAmJjE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAke5B,CAAC"}