@cyanheads/openfoodfacts-mcp-server 0.3.4 → 0.3.5
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.
- package/AGENTS.md +8 -6
- package/CLAUDE.md +8 -6
- package/README.md +4 -4
- package/changelog/0.3.x/0.3.5.md +24 -0
- package/changelog/template.md +7 -7
- package/dist/mcp-server/tools/definitions/browse-taxonomy.tool.d.ts +0 -1
- package/dist/mcp-server/tools/definitions/browse-taxonomy.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/browse-taxonomy.tool.js +2 -7
- package/dist/mcp-server/tools/definitions/browse-taxonomy.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/compare-products.tool.d.ts +2 -2
- package/dist/mcp-server/tools/definitions/compare-products.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/compare-products.tool.js +4 -4
- package/dist/mcp-server/tools/definitions/compare-products.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-product.tool.d.ts +21 -2
- package/dist/mcp-server/tools/definitions/get-product.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-product.tool.js +108 -51
- package/dist/mcp-server/tools/definitions/get-product.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/index.d.ts +33 -8
- package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-products.tool.d.ts +10 -3
- package/dist/mcp-server/tools/definitions/search-products.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-products.tool.js +12 -5
- package/dist/mcp-server/tools/definitions/search-products.tool.js.map +1 -1
- package/dist/services/openfoodfacts/openfoodfacts-service.d.ts +7 -0
- package/dist/services/openfoodfacts/openfoodfacts-service.d.ts.map +1 -1
- package/dist/services/openfoodfacts/openfoodfacts-service.js +41 -35
- package/dist/services/openfoodfacts/openfoodfacts-service.js.map +1 -1
- package/dist/services/openfoodfacts/types.d.ts +7 -1
- package/dist/services/openfoodfacts/types.d.ts.map +1 -1
- package/dist/services/openfoodfacts/types.js.map +1 -1
- package/dist/services/taxonomy/taxonomy-service.d.ts +0 -1
- package/dist/services/taxonomy/taxonomy-service.d.ts.map +1 -1
- package/dist/services/taxonomy/taxonomy-service.js +31 -6
- package/dist/services/taxonomy/taxonomy-service.js.map +1 -1
- package/package.json +5 -5
- package/server.json +3 -3
package/AGENTS.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** openfoodfacts-mcp-server
|
|
4
|
-
**Version:** 0.3.
|
|
5
|
-
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.
|
|
4
|
+
**Version:** 0.3.5
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.6`
|
|
6
6
|
**Engines:** Bun ≥1.4.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/server` ^2.0.0
|
|
8
8
|
**Zod:** ^4.6.5
|
|
@@ -42,7 +42,7 @@ export const offGetProduct = tool('off_get_product', {
|
|
|
42
42
|
.describe('Subset of fields to return. Omitting returns all standard fields.'),
|
|
43
43
|
}),
|
|
44
44
|
output: z.object({
|
|
45
|
-
barcode: z.string().describe('
|
|
45
|
+
barcode: z.string().describe('The input barcode, echoed back unchanged.'),
|
|
46
46
|
// No `found` flag: a missing record is the thrown not_found error, so a boolean here could
|
|
47
47
|
// only ever be true. Don't advertise a state the handler cannot return — a caller that
|
|
48
48
|
// branches on it never handles the path that actually fires.
|
|
@@ -60,7 +60,9 @@ export const offGetProduct = tool('off_get_product', {
|
|
|
60
60
|
async handler(input, ctx) {
|
|
61
61
|
const svc = getOpenFoodFactsService();
|
|
62
62
|
const product = await svc.getProduct(input.barcode, ctx);
|
|
63
|
-
if (!product)
|
|
63
|
+
if (!product) {
|
|
64
|
+
throw ctx.fail('not_found', `Barcode ${input.barcode} not found`, ctx.recoveryFor('not_found'));
|
|
65
|
+
}
|
|
64
66
|
return { barcode: input.barcode, product };
|
|
65
67
|
},
|
|
66
68
|
|
|
@@ -143,7 +145,7 @@ Handlers receive a unified `ctx` object. Key properties:
|
|
|
143
145
|
|
|
144
146
|
Handlers throw — the framework catches, classifies, and formats.
|
|
145
147
|
|
|
146
|
-
**Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. Pass `ctx.recoveryFor('reason')` as the throw's data to put it on the wire (`data.recovery.hint`, mirrored into `content[]` text); override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`, `RequestCancelled`) bubble freely and don't need declaring.
|
|
148
|
+
**Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable?, severity?, thrownBy? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. Pass `ctx.recoveryFor('reason')` as the throw's data to put it on the wire (`data.recovery.hint`, mirrored into `content[]` text unless the message already contains it verbatim); override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Forwarding it is lint-enforced per throw site (`error-contract-recovery-unforwarded`). Mark an entry the service layer throws with `thrownBy: 'service'` so `error-contract-unthrown` skips it — lint-only metadata, nothing at runtime reads it. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`, `RequestCancelled`) bubble freely and don't need declaring.
|
|
147
149
|
|
|
148
150
|
```ts
|
|
149
151
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
@@ -244,7 +246,7 @@ Available skills:
|
|
|
244
246
|
| `code-simplifier` | Post-session cleanup against `git diff` — modernize syntax, consolidate duplication, align with the codebase |
|
|
245
247
|
| `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
|
|
246
248
|
| `git-wrapup` | Land working-tree changes as a commit stack — version bump, changelog, verify, commit by concern, release commit on top. No tag, no push to main; opens the release PR when the project declares release PR mode |
|
|
247
|
-
| `release-pr-review` | Review pass on an open release PR — simplifier + correctness review,
|
|
249
|
+
| `release-pr-review` | Review pass on an open release PR — simplifier + correctness review, fixes as ordinary commits on top of the stack, PR body kept in sync. Release PR mode only |
|
|
248
250
|
| `release-and-publish` | Fast-forward merge (release PR mode) + tag + push + npm + MCP Registry + GH Release + Docker. Picks up from `git-wrapup` |
|
|
249
251
|
| `maintenance` | Investigate changelogs, adopt upstream changes, sync skills to agent dirs |
|
|
250
252
|
| `orchestrations` | Chain task skills into a gated multi-phase pipeline — build-out, QA-fix, update-ship — when you can spawn sub-agents |
|
package/CLAUDE.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** openfoodfacts-mcp-server
|
|
4
|
-
**Version:** 0.3.
|
|
5
|
-
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.
|
|
4
|
+
**Version:** 0.3.5
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.6`
|
|
6
6
|
**Engines:** Bun ≥1.4.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/server` ^2.0.0
|
|
8
8
|
**Zod:** ^4.6.5
|
|
@@ -42,7 +42,7 @@ export const offGetProduct = tool('off_get_product', {
|
|
|
42
42
|
.describe('Subset of fields to return. Omitting returns all standard fields.'),
|
|
43
43
|
}),
|
|
44
44
|
output: z.object({
|
|
45
|
-
barcode: z.string().describe('
|
|
45
|
+
barcode: z.string().describe('The input barcode, echoed back unchanged.'),
|
|
46
46
|
// No `found` flag: a missing record is the thrown not_found error, so a boolean here could
|
|
47
47
|
// only ever be true. Don't advertise a state the handler cannot return — a caller that
|
|
48
48
|
// branches on it never handles the path that actually fires.
|
|
@@ -60,7 +60,9 @@ export const offGetProduct = tool('off_get_product', {
|
|
|
60
60
|
async handler(input, ctx) {
|
|
61
61
|
const svc = getOpenFoodFactsService();
|
|
62
62
|
const product = await svc.getProduct(input.barcode, ctx);
|
|
63
|
-
if (!product)
|
|
63
|
+
if (!product) {
|
|
64
|
+
throw ctx.fail('not_found', `Barcode ${input.barcode} not found`, ctx.recoveryFor('not_found'));
|
|
65
|
+
}
|
|
64
66
|
return { barcode: input.barcode, product };
|
|
65
67
|
},
|
|
66
68
|
|
|
@@ -143,7 +145,7 @@ Handlers receive a unified `ctx` object. Key properties:
|
|
|
143
145
|
|
|
144
146
|
Handlers throw — the framework catches, classifies, and formats.
|
|
145
147
|
|
|
146
|
-
**Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. Pass `ctx.recoveryFor('reason')` as the throw's data to put it on the wire (`data.recovery.hint`, mirrored into `content[]` text); override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`, `RequestCancelled`) bubble freely and don't need declaring.
|
|
148
|
+
**Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable?, severity?, thrownBy? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. Pass `ctx.recoveryFor('reason')` as the throw's data to put it on the wire (`data.recovery.hint`, mirrored into `content[]` text unless the message already contains it verbatim); override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Forwarding it is lint-enforced per throw site (`error-contract-recovery-unforwarded`). Mark an entry the service layer throws with `thrownBy: 'service'` so `error-contract-unthrown` skips it — lint-only metadata, nothing at runtime reads it. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`, `RequestCancelled`) bubble freely and don't need declaring.
|
|
147
149
|
|
|
148
150
|
```ts
|
|
149
151
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
@@ -244,7 +246,7 @@ Available skills:
|
|
|
244
246
|
| `code-simplifier` | Post-session cleanup against `git diff` — modernize syntax, consolidate duplication, align with the codebase |
|
|
245
247
|
| `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
|
|
246
248
|
| `git-wrapup` | Land working-tree changes as a commit stack — version bump, changelog, verify, commit by concern, release commit on top. No tag, no push to main; opens the release PR when the project declares release PR mode |
|
|
247
|
-
| `release-pr-review` | Review pass on an open release PR — simplifier + correctness review,
|
|
249
|
+
| `release-pr-review` | Review pass on an open release PR — simplifier + correctness review, fixes as ordinary commits on top of the stack, PR body kept in sync. Release PR mode only |
|
|
248
250
|
| `release-and-publish` | Fast-forward merge (release PR mode) + tag + push + npm + MCP Registry + GH Release + Docker. Picks up from `git-wrapup` |
|
|
249
251
|
| `maintenance` | Investigate changelogs, adopt upstream changes, sync skills to agent dirs |
|
|
250
252
|
| `orchestrations` | Chain task skills into a gated multi-phase pipeline — build-out, QA-fix, update-ship — when you can spawn sub-agents |
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<div align="center">
|
|
9
9
|
|
|
10
|
-
[](./CHANGELOG.md) [](./LICENSE) [](https://github.com/users/cyanheads/packages/container/package/openfoodfacts-mcp-server) [](https://modelcontextprotocol.io/) [](https://www.npmjs.com/package/@cyanheads/openfoodfacts-mcp-server) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -45,7 +45,7 @@ Food product data from Open Food Facts, a crowd-sourced database of 3M+ packaged
|
|
|
45
45
|
### `off_get_product` <sub>tool</sub>
|
|
46
46
|
|
|
47
47
|
- Accepts 8–14 digit barcodes (EAN-13, EAN-8, UPC-A, UPC-E)
|
|
48
|
-
- 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
|
|
48
|
+
- Returns ingredients (raw text and parsed list with percent estimates, vegan/vegetarian flags, and each entry's sub-ingredients nested under it — wheat flour under "cereal", palm oil under "vegetable oils" — up to three levels deep), all 14 major allergens as tag IDs, E-number additives, Nutri-Score (`a`–`e`, `unknown`, `not-applicable`), NOVA 1–4, Green-Score (`a-plus`, `a`–`f`, `unknown`, `not-applicable`), 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/countries of sale as canonical tag IDs, front image URL, and data completeness score (0–1)
|
|
49
49
|
- `traces_tags` carries the "may contain" allergen warning separately from the declared `allergens_tags`; `["en:none"]` is the label stating no traces, while an empty array means not yet entered — never trace-free
|
|
50
50
|
- `ingredients_analysis_tags` carries the vegan, vegetarian, and palm-oil verdicts Open Food Facts computes itself, including its "maybe" states, rather than leaving the per-ingredient flags to be aggregated by the caller
|
|
51
51
|
- Optional `fields` parameter restricts the response to a subset (e.g., scores only, or nutrition only); a field that cannot be read on its own arrives with what it depends on — `nutriments` brings the serving size its per-serving figures are measured against — and `requested_fields` echoes the full set that was fetched
|
|
@@ -80,7 +80,7 @@ Food product data from Open Food Facts, a crowd-sourced database of 3M+ packaged
|
|
|
80
80
|
|
|
81
81
|
### `off_browse_taxonomy` <sub>tool</sub>
|
|
82
82
|
|
|
83
|
-
- Facets `categories`, `labels`, `allergens`, `additives`, `countries` resolve live against the Open Food Facts taxonomy (case-insensitive substring match on tag ID, display name, or a common synonym — "shellfish" resolves to `en:crustaceans`); upstream tags are often plural, so pass the returned `id` through unchanged
|
|
83
|
+
- Facets `categories`, `labels`, `allergens`, `additives`, `countries` resolve live against the Open Food Facts taxonomy (case-insensitive substring match on tag ID, display name, or a common synonym — "shellfish" resolves to `en:crustaceans`); upstream tags are often plural, so pass the returned `id` through unchanged. Among the live matches, the tag spelling the term itself ranks first (`lentil` → `en:lentils` ahead of `en:lentil-soups`), so a small `limit` does not cut it
|
|
84
84
|
- `nova_groups` and `nutrition_grades` are closed vocabularies, returned complete, with bare `"1"`–`"4"` / `"a"`–`"e"` ids
|
|
85
85
|
- Live lookups fall back to a small in-process sample when Open Food Facts is unreachable or the budget is spent, and say so rather than failing; omitting `search` returns only that sample, since Open Food Facts can't enumerate a full facet — no `total_in_facet` is reported for the open facets
|
|
86
86
|
- `limit` controls results (1–100, default 20); there is no offset or page — narrow the search term instead
|
|
@@ -94,7 +94,7 @@ Open Food Facts-specific:
|
|
|
94
94
|
|
|
95
95
|
- No API key required — the identifying `User-Agent` header (required by OFF terms) is baked into the service layer
|
|
96
96
|
- Token-bucket rate limiting per endpoint class: product reads (~15/min), search (~10/min), taxonomy resolution (~10/min). The product and search defaults are the per-IP ceilings Open Food Facts publishes; lower them on a shared outbound IP. Budgets count upstream requests, so a retried request spends its own slot and a budget exhausted mid-retry surfaces as `rate_limited` rather than sending. A local refusal says so — it never reports itself as an Open Food Facts rate limit
|
|
97
|
-
- Automatic retry (4 attempts, 500ms base) for transient failures only — 5xx, timeouts, and 429 (honoring `Retry-After`), with HTML error page detection for 503 during high load.
|
|
97
|
+
- Automatic retry (4 attempts, 500ms base) for transient failures only — 5xx other than 501, timeouts, and 429 (honoring `Retry-After`), with HTML error page detection for 503 during high load. The HTTP status decides: a 4xx or a 501 is sent once and never retried, and the upstream's own explanation is surfaced instead — a rendered error page served with a refusal is reported as a refusal, not as load
|
|
98
98
|
- 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)
|
|
99
99
|
- 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
|
|
100
100
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "The HTTP status now decides retryability, off_get_product carries nested sub-ingredients up to three levels, off_browse_taxonomy ranks the exact-term tag first, and four output descriptions are corrected."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.3.5 — 2026-09-22
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- **`off_browse_taxonomy` ranks the exact-term tag first** — among live suggestions, the tag spelling the search term itself (`en:lentils` for "lentil") now sorts ahead of compounds instead of being cut by a small `limit`; the live pool is requested in full to make the ranking possible (#42).
|
|
12
|
+
|
|
13
|
+
## Fixed
|
|
14
|
+
|
|
15
|
+
- **The HTTP status decides retryability, not the body** — a 501 is now rejected once as `upstream_rejected` instead of retried four times, and an HTML-bodied 4xx is described as a refusal rather than blamed on load shedding (#37).
|
|
16
|
+
- **`off_get_product` parsed ingredients keep their sub-ingredients** — nested entries (wheat flour under "cereal", milk under cheddar) are now carried under their parent up to three levels deep instead of being dropped; an entry nested deeper upstream is listed at the third level, directly after its ancestor (#40).
|
|
17
|
+
- **Output descriptions corrected** — `off_get_product`'s `barcode` now describes the echoed input rather than "returned by the API"; the Nutri-Score and Green-Score descriptions name their full grade vocabularies (`unknown`, `not-applicable`, `a-plus`); `off_browse_taxonomy` no longer advertises a `tags[].products` count no backend ever supplies (#43).
|
|
18
|
+
|
|
19
|
+
## Dependencies
|
|
20
|
+
|
|
21
|
+
- `@cyanheads/mcp-ts-core` ^0.13.3 → ^0.13.6
|
|
22
|
+
- `@biomejs/biome` ^2.5.13 → ^2.5.14
|
|
23
|
+
- `@types/node` ^26.2.0 → ^26.6.2
|
|
24
|
+
- `vitest` ^4.1.11 → ^5.0.1
|
package/changelog/template.md
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
# Required. One-line GitHub Release-style headline. 350 character cap — a
|
|
8
8
|
# ceiling, not a target. Default short and scannable. Don't pad, don't stitch
|
|
9
|
-
# unrelated changes with commas/semicolons into an inventory — pick the
|
|
10
|
-
# headline
|
|
9
|
+
# unrelated changes with commas/semicolons into an inventory — pick the one
|
|
10
|
+
# headline the release is about. Quotes required: unquoted YAML treats
|
|
11
11
|
# `: ` inside the value as a key separator and fails GitHub's strict parser.
|
|
12
12
|
summary: ""
|
|
13
13
|
|
|
@@ -119,11 +119,11 @@ security: false
|
|
|
119
119
|
TAG ANNOTATIONS — the annotated tag body renders as the GitHub Release body
|
|
120
120
|
via `gh release create --notes-from-tag`. It is a condensed digest of this
|
|
121
121
|
entry, never a copy, and its format is owned by the `release-and-publish`
|
|
122
|
-
skill (step 4, "Create the annotated tag"):
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
122
|
+
skill (step 4, "Create the annotated tag"): a short subject line without the
|
|
123
|
+
version, flat headline bullets — no Keep-a-Changelog section headers, no
|
|
124
|
+
gates line — at most one deps line, issue backlinks, and the changelog link
|
|
125
|
+
last. In release-PR mode the `git-wrapup` skill authors those bullets as the
|
|
126
|
+
PR body's `## Changes` and the tag copies them.
|
|
127
127
|
-->
|
|
128
128
|
|
|
129
129
|
## Added
|
|
@@ -20,7 +20,6 @@ export declare const offBrowseTaxonomyTool: import("@cyanheads/mcp-ts-core").Too
|
|
|
20
20
|
tags: z.ZodArray<z.ZodObject<{
|
|
21
21
|
id: z.ZodString;
|
|
22
22
|
name: z.ZodString;
|
|
23
|
-
products: z.ZodOptional<z.ZodNumber>;
|
|
24
23
|
}, z.core.$strip>>;
|
|
25
24
|
total_in_facet: z.ZodOptional<z.ZodNumber>;
|
|
26
25
|
}, z.core.$strip>, undefined, {
|
|
@@ -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;AAIjD,eAAO,MAAM,qBAAqB
|
|
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;AAIjD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;EA2IhC,CAAC"}
|
|
@@ -35,7 +35,7 @@ export const offBrowseTaxonomyTool = tool('off_browse_taxonomy', {
|
|
|
35
35
|
.min(1)
|
|
36
36
|
.max(100)
|
|
37
37
|
.default(20)
|
|
38
|
-
.describe('Maximum entries to return (1–100, default 20). There is no offset or page input: Open Food Facts
|
|
38
|
+
.describe('Maximum entries to return (1–100, default 20). There is no offset or page input: Open Food Facts offers no cursor for this lookup, so narrow the search term rather than paging. The tag spelling the term itself (e.g. "lentil" → en:lentils) is listed first among the live matches, so it is not the one a small limit cuts.'),
|
|
39
39
|
}),
|
|
40
40
|
output: z.object({
|
|
41
41
|
facet: z.string().describe('The facet name that was queried (echoes the input).'),
|
|
@@ -46,10 +46,6 @@ export const offBrowseTaxonomyTool = tool('off_browse_taxonomy', {
|
|
|
46
46
|
.string()
|
|
47
47
|
.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.'),
|
|
48
48
|
name: z.string().describe('Human-readable display name (e.g. "Organic").'),
|
|
49
|
-
products: z
|
|
50
|
-
.number()
|
|
51
|
-
.optional()
|
|
52
|
-
.describe('Approximate count of products with this tag. Not available for all facets.'),
|
|
53
49
|
})
|
|
54
50
|
.describe('A single taxonomy tag entry with its canonical ID and display name.'))
|
|
55
51
|
.describe('Matching tag entries.'),
|
|
@@ -113,10 +109,9 @@ export const offBrowseTaxonomyTool = tool('off_browse_taxonomy', {
|
|
|
113
109
|
return [{ type: 'text', text: lines.join('\n') }];
|
|
114
110
|
}
|
|
115
111
|
for (const tag of result.tags) {
|
|
116
|
-
const products = tag.products !== undefined ? ` (~${tag.products.toLocaleString()} products)` : '';
|
|
117
112
|
// A backtick in a tag ID would close a single-backtick span and render the rest of the ID as
|
|
118
113
|
// prose, so the span's delimiter is sized past whatever the ID carries.
|
|
119
|
-
lines.push(`- ${mdInlineCode(tag.id)} — ${mdInline(tag.name)}
|
|
114
|
+
lines.push(`- ${mdInlineCode(tag.id)} — ${mdInline(tag.name)}`);
|
|
120
115
|
}
|
|
121
116
|
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.*');
|
|
122
117
|
return [{ type: 'text', text: lines.join('\n') }];
|
|
@@ -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;AACzF,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC,qBAAqB,EAAE;IAC/D,KAAK,EAAE,4BAA4B;IACnC,WAAW,EACT,6yBAA6yB;IAC/yB,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,gbAAgb,CACjb;QACH,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,4ZAA4Z,CAC7Z;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,
|
|
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;AACzF,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC,qBAAqB,EAAE;IAC/D,KAAK,EAAE,4BAA4B;IACnC,WAAW,EACT,6yBAA6yB;IAC/yB,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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|
readonly code: JsonRpcErrorCode.ServiceUnavailable;
|
|
37
|
-
readonly when: "Open Food Facts returns 5xx, serves an HTML error page, or is unreachable — surfaced per barcode in failed[]";
|
|
37
|
+
readonly when: "Open Food Facts returns a 5xx other than 501, serves an HTML error page with a 2xx or 5xx status, or is unreachable — surfaced per barcode in failed[]";
|
|
38
38
|
readonly retryable: true;
|
|
39
39
|
readonly recovery: "Retry the barcodes listed in failed after a brief pause. Rows that already resolved are kept, so only the failures need repeating.";
|
|
40
40
|
}, {
|
|
@@ -46,7 +46,7 @@ export declare const offCompareProductsTool: import("@cyanheads/mcp-ts-core").To
|
|
|
46
46
|
}, {
|
|
47
47
|
readonly reason: "upstream_rejected";
|
|
48
48
|
readonly code: JsonRpcErrorCode.InvalidParams;
|
|
49
|
-
readonly when: "Open Food Facts answers 4xx for a barcode — surfaced per barcode in failed[]";
|
|
49
|
+
readonly when: "Open Food Facts answers 4xx or 501 Not Implemented for a barcode — surfaced per barcode in failed[]";
|
|
50
50
|
readonly retryable: false;
|
|
51
51
|
readonly recovery: "Do not retry unchanged. Check the digits of the barcodes listed in failed, then look them up individually with off_get_product.";
|
|
52
52
|
}, {
|
|
@@ -1 +1 @@
|
|
|
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;AAkI3E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
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;AAkI3E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAqRjC,CAAC"}
|
|
@@ -134,7 +134,7 @@ export const offCompareProductsTool = tool('off_compare_products', {
|
|
|
134
134
|
nutriscore_grade: z
|
|
135
135
|
.string()
|
|
136
136
|
.optional()
|
|
137
|
-
.describe('Nutri-Score
|
|
137
|
+
.describe('Nutri-Score grade: "a" through "e", "unknown" when the nutrition data entered is not enough to compute it, or "not-applicable" for product categories the score does not cover. Absent when Open Food Facts sent none.'),
|
|
138
138
|
nova_group: z
|
|
139
139
|
.number()
|
|
140
140
|
.optional()
|
|
@@ -142,7 +142,7 @@ export const offCompareProductsTool = tool('off_compare_products', {
|
|
|
142
142
|
ecoscore_grade: z
|
|
143
143
|
.string()
|
|
144
144
|
.optional()
|
|
145
|
-
.describe('Green-Score
|
|
145
|
+
.describe('Green-Score (formerly Eco-Score) environmental impact grade: "a-plus" (lowest impact), then "a" through "f"; "unknown" when the data it needs is missing, or "not-applicable" for product categories the score does not cover. Often absent.'),
|
|
146
146
|
energy_kcal_100g: z
|
|
147
147
|
.number()
|
|
148
148
|
.optional()
|
|
@@ -199,7 +199,7 @@ export const offCompareProductsTool = tool('off_compare_products', {
|
|
|
199
199
|
{
|
|
200
200
|
reason: 'upstream_error',
|
|
201
201
|
code: JsonRpcErrorCode.ServiceUnavailable,
|
|
202
|
-
when: 'Open Food Facts returns 5xx, serves an HTML error page, or is unreachable — surfaced per barcode in failed[]',
|
|
202
|
+
when: 'Open Food Facts returns a 5xx other than 501, serves an HTML error page with a 2xx or 5xx status, or is unreachable — surfaced per barcode in failed[]',
|
|
203
203
|
retryable: true,
|
|
204
204
|
recovery: 'Retry the barcodes listed in failed after a brief pause. Rows that already resolved are kept, so only the failures need repeating.',
|
|
205
205
|
},
|
|
@@ -213,7 +213,7 @@ export const offCompareProductsTool = tool('off_compare_products', {
|
|
|
213
213
|
{
|
|
214
214
|
reason: 'upstream_rejected',
|
|
215
215
|
code: JsonRpcErrorCode.InvalidParams,
|
|
216
|
-
when: 'Open Food Facts answers 4xx for a barcode — surfaced per barcode in failed[]',
|
|
216
|
+
when: 'Open Food Facts answers 4xx or 501 Not Implemented for a barcode — surfaced per barcode in failed[]',
|
|
217
217
|
retryable: false,
|
|
218
218
|
recovery: 'Do not retry unchanged. Check the digits of the barcodes listed in failed, then look them up individually with off_get_product.',
|
|
219
219
|
},
|
|
@@ -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,gBAAgB,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,mDAAmD,CAAC;AAE5F,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAE5D,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,OAAO,KAAK,CAAC,IAAI,EAAE,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CA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CAAC,CAAC,CAAC,kBAAkB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAC9L,CAAC;QACJ,CAAC;QAED,uBAAuB;QACvB,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAClC,CAAC,CAAC,EAAE,EAAE,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,QAAQ,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,iCAAiC,CAC9I,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"}
|
|
@@ -45,6 +45,20 @@ export declare const offGetProductTool: import("@cyanheads/mcp-ts-core").ToolDef
|
|
|
45
45
|
percent_estimate: z.ZodOptional<z.ZodNumber>;
|
|
46
46
|
vegan: z.ZodOptional<z.ZodString>;
|
|
47
47
|
vegetarian: z.ZodOptional<z.ZodString>;
|
|
48
|
+
ingredients: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
49
|
+
id: z.ZodOptional<z.ZodString>;
|
|
50
|
+
text: z.ZodString;
|
|
51
|
+
percent_estimate: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
vegan: z.ZodOptional<z.ZodString>;
|
|
53
|
+
vegetarian: z.ZodOptional<z.ZodString>;
|
|
54
|
+
ingredients: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
55
|
+
id: z.ZodOptional<z.ZodString>;
|
|
56
|
+
text: z.ZodString;
|
|
57
|
+
percent_estimate: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
vegan: z.ZodOptional<z.ZodString>;
|
|
59
|
+
vegetarian: z.ZodOptional<z.ZodString>;
|
|
60
|
+
}, z.core.$strip>>>;
|
|
61
|
+
}, z.core.$strip>>>;
|
|
48
62
|
}, z.core.$strip>>>;
|
|
49
63
|
allergens_tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
50
64
|
traces_tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -92,30 +106,35 @@ export declare const offGetProductTool: import("@cyanheads/mcp-ts-core").ToolDef
|
|
|
92
106
|
readonly reason: "not_found";
|
|
93
107
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
94
108
|
readonly when: "Barcode status:0 — not present in any contributor record";
|
|
109
|
+
readonly severity: "notice";
|
|
95
110
|
readonly recovery: "Try off_search_products with the product name or brand to find the correct barcode, or check that the barcode digits are correct.";
|
|
96
111
|
}, {
|
|
97
112
|
readonly reason: "upstream_error";
|
|
98
113
|
readonly code: JsonRpcErrorCode.ServiceUnavailable;
|
|
99
|
-
readonly when: "Open Food Facts returns 5xx, serves an HTML error page, or is unreachable";
|
|
114
|
+
readonly when: "Open Food Facts returns a 5xx other than 501, serves an HTML error page with a 2xx or 5xx status, or is unreachable";
|
|
100
115
|
readonly retryable: true;
|
|
116
|
+
readonly thrownBy: "service";
|
|
101
117
|
readonly recovery: "Retry after a brief pause. If it keeps failing, Open Food Facts is degraded — check the barcode again later.";
|
|
102
118
|
}, {
|
|
103
119
|
readonly reason: "upstream_timeout";
|
|
104
120
|
readonly code: JsonRpcErrorCode.Timeout;
|
|
105
121
|
readonly when: "Open Food Facts did not answer within the request deadline";
|
|
106
122
|
readonly retryable: true;
|
|
123
|
+
readonly thrownBy: "service";
|
|
107
124
|
readonly recovery: "Retry once. If it times out again, pass a narrower fields subset so Open Food Facts assembles less per request.";
|
|
108
125
|
}, {
|
|
109
126
|
readonly reason: "upstream_rejected";
|
|
110
127
|
readonly code: JsonRpcErrorCode.InvalidParams;
|
|
111
|
-
readonly when: "Open Food Facts answers 4xx for something other than a missing barcode";
|
|
128
|
+
readonly when: "Open Food Facts answers 4xx for something other than a missing barcode, or 501 Not Implemented";
|
|
112
129
|
readonly retryable: false;
|
|
130
|
+
readonly thrownBy: "service";
|
|
113
131
|
readonly recovery: "Do not retry — the request will be refused again. Read data.status and the upstream explanation in the message, then correct the request.";
|
|
114
132
|
}, {
|
|
115
133
|
readonly reason: "rate_limited";
|
|
116
134
|
readonly code: JsonRpcErrorCode.RateLimited;
|
|
117
135
|
readonly when: "This server's own per-minute request budget is spent, or Open Food Facts answers 429";
|
|
118
136
|
readonly retryable: true;
|
|
137
|
+
readonly thrownBy: "service";
|
|
119
138
|
readonly recovery: "Wait the seconds given in data.retryAfter, then retry. Spread lookups out rather than issuing them in a burst.";
|
|
120
139
|
}], undefined>;
|
|
121
140
|
//# sourceMappingURL=get-product.tool.d.ts.map
|
|
@@ -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;
|
|
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;AAoSjE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6gB5B,CAAC"}
|