@cyanheads/cpsc-recalls-mcp-server 0.1.4 → 0.1.6

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 (26) hide show
  1. package/AGENTS.md +40 -18
  2. package/CLAUDE.md +40 -18
  3. package/Dockerfile +11 -7
  4. package/README.md +23 -11
  5. package/changelog/0.1.x/0.1.5.md +52 -0
  6. package/changelog/0.1.x/0.1.6.md +29 -0
  7. package/changelog/template.md +5 -3
  8. package/dist/mcp-server/tools/definitions/cpsc-get-recall.tool.d.ts +10 -2
  9. package/dist/mcp-server/tools/definitions/cpsc-get-recall.tool.d.ts.map +1 -1
  10. package/dist/mcp-server/tools/definitions/cpsc-get-recall.tool.js +128 -36
  11. package/dist/mcp-server/tools/definitions/cpsc-get-recall.tool.js.map +1 -1
  12. package/dist/mcp-server/tools/definitions/cpsc-get-recent.tool.d.ts +12 -1
  13. package/dist/mcp-server/tools/definitions/cpsc-get-recent.tool.d.ts.map +1 -1
  14. package/dist/mcp-server/tools/definitions/cpsc-get-recent.tool.js +95 -20
  15. package/dist/mcp-server/tools/definitions/cpsc-get-recent.tool.js.map +1 -1
  16. package/dist/mcp-server/tools/definitions/cpsc-search-recalls.tool.d.ts +27 -5
  17. package/dist/mcp-server/tools/definitions/cpsc-search-recalls.tool.d.ts.map +1 -1
  18. package/dist/mcp-server/tools/definitions/cpsc-search-recalls.tool.js +204 -59
  19. package/dist/mcp-server/tools/definitions/cpsc-search-recalls.tool.js.map +1 -1
  20. package/dist/services/cpsc-recall/cpsc-recall-service.d.ts.map +1 -1
  21. package/dist/services/cpsc-recall/cpsc-recall-service.js +31 -0
  22. package/dist/services/cpsc-recall/cpsc-recall-service.js.map +1 -1
  23. package/dist/services/cpsc-recall/types.d.ts +25 -2
  24. package/dist/services/cpsc-recall/types.d.ts.map +1 -1
  25. package/package.json +12 -11
  26. package/server.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"cpsc-get-recall.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/cpsc-get-recall.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAQjE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA8RxB,CAAC"}
1
+ {"version":3,"file":"cpsc-get-recall.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/cpsc-get-recall.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AAmC3E,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA0XxB,CAAC"}
@@ -3,11 +3,34 @@
3
3
  * @module mcp-server/tools/definitions/cpsc-get-recall
4
4
  */
5
5
  import { tool, z } from '@cyanheads/mcp-ts-core';
6
- import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
6
+ import { JsonRpcErrorCode, McpError } from '@cyanheads/mcp-ts-core/errors';
7
7
  import { getCpscRecallService } from '../../../services/cpsc-recall/cpsc-recall-service.js';
8
8
  /** Static jurisdiction note included in every response. */
9
9
  const JURISDICTION = 'CPSC covers consumer products — toys, electronics, furniture, appliances, tools, clothing. ' +
10
10
  'Does NOT cover: food/drugs (FDA), motor vehicles/tires (NHTSA), boats (USCG), pesticides (EPA), firearms (ATF).';
11
+ /** Static provenance caveat included in every response. */
12
+ const SOURCE_NOTE = 'Recall fields are relayed verbatim from the CPSC record and are neither edited nor verified by this server. ' +
13
+ 'CPSC records occasionally carry missing or inconsistent text. ' +
14
+ 'Check cpsc_url before acting on a recall for a consumer-facing decision.';
15
+ /** Rendered in place of an upstream narrative field CPSC left null or empty. */
16
+ const ABSENT_TEXT = '_Not provided by CPSC._';
17
+ /** Absence placeholder for fields a consumer can still resolve on the CPSC page. */
18
+ const ABSENT_TEXT_SEE_PAGE = '_Not provided by CPSC. See the CPSC recall page._';
19
+ /**
20
+ * Renders relayed CPSC text as a markdown blockquote, so upstream narrative is visually
21
+ * distinct from the server's own guidance. Prefixes every line — CPSC descriptions and
22
+ * remedy instructions are frequently multi-line.
23
+ *
24
+ * Callers must leave a blank line after the returned block. Markdown lazy continuation
25
+ * pulls an unseparated following line into the quote, which would render server-authored
26
+ * guidance as CPSC source text — the exact opposite of the framing.
27
+ */
28
+ function asSourceText(text) {
29
+ return text
30
+ .split('\n')
31
+ .map((line) => `> ${line}`)
32
+ .join('\n');
33
+ }
11
34
  export const cpscGetRecall = tool('cpsc_get_recall', {
12
35
  title: 'Get CPSC Recall Detail',
13
36
  description: 'Full detail for a single CPSC recall by recall number. ' +
@@ -31,8 +54,10 @@ export const cpscGetRecall = tool('cpsc_get_recall', {
31
54
  title: z.string().describe('Official recall title.'),
32
55
  description: z
33
56
  .string()
57
+ .nullable()
34
58
  .describe('Full recall description including product identification details. ' +
35
- 'Model numbers are typically embedded here, not in a structured field.'),
59
+ 'Model numbers are typically embedded here, not in a structured field. ' +
60
+ 'Null when CPSC published the record without a description — rare, but a genuine record can still be complete otherwise.'),
36
61
  cpsc_url: z
37
62
  .string()
38
63
  .describe('Official CPSC recall page — authoritative source for consumers.'),
@@ -47,7 +72,9 @@ export const cpscGetRecall = tool('cpsc_get_recall', {
47
72
  .describe('Hazards — read this first.'),
48
73
  remedy_options: z
49
74
  .array(z.string().describe('Remedy type.'))
50
- .describe('Remedy types available: Refund, Repair, Replace, Dispose, Label, New Instructions.'),
75
+ .describe('Remedy types available: Refund, Repair, Replace, New Instructions, Dispose, Label, No Remedy Available, Inspect. ' +
76
+ 'Often empty — CPSC classified the remedy on fewer than half its records. Read remedy_instructions when this is empty, ' +
77
+ 'and fall back to cpsc_url when that is empty too, rather than reporting that no remedy exists.'),
51
78
  remedy_instructions: z
52
79
  .string()
53
80
  .describe('Full remedy instructions — exactly what a consumer should do and how to claim.'),
@@ -94,10 +121,17 @@ export const cpscGetRecall = tool('cpsc_get_recall', {
94
121
  coordinated_recalls: z
95
122
  .array(z.string().describe('URL of coordinated recall by another agency.'))
96
123
  .describe('URLs of coordinated recalls by other agencies (e.g., Canada Health).'),
124
+ data_quality_notes: z
125
+ .array(z.string().describe('One gap found in the upstream record.'))
126
+ .describe('Gaps this server observed in the upstream CPSC record — absent description, absent hazard text, absent product entries. ' +
127
+ 'Derived from which fields CPSC left empty, not from any judgement about the recall itself. Empty when nothing is missing.'),
97
128
  cpsc_jurisdiction: z
98
129
  .string()
99
130
  .describe('CPSC covers consumer products — toys, electronics, furniture, appliances, tools, clothing. ' +
100
131
  'Does NOT cover: food/drugs (FDA), motor vehicles/tires (NHTSA), boats (USCG), pesticides (EPA), firearms (ATF).'),
132
+ source_note: z
133
+ .string()
134
+ .describe('Provenance caveat: recall fields are relayed from CPSC unedited and unverified; check cpsc_url before a consumer-facing decision.'),
101
135
  }),
102
136
  errors: [
103
137
  {
@@ -109,10 +143,17 @@ export const cpscGetRecall = tool('cpsc_get_recall', {
109
143
  {
110
144
  reason: 'upstream_error',
111
145
  code: JsonRpcErrorCode.ServiceUnavailable,
112
- when: 'The saferproducts.gov API returned an error or timed out',
146
+ when: 'The saferproducts.gov API returned a transient error or timed out',
113
147
  recovery: 'The CPSC API is occasionally unavailable. Retry in a few seconds.',
114
148
  retryable: true,
115
149
  },
150
+ {
151
+ reason: 'upstream_rejected',
152
+ code: JsonRpcErrorCode.ServiceUnavailable,
153
+ when: 'The saferproducts.gov API answered with an error row instead of a recall record, which the same request will always produce',
154
+ recovery: 'Do not retry this request unchanged — it fails deterministically. Read the message for what CPSC rejected, then confirm the recall number with cpsc_search_recalls.',
155
+ retryable: false,
156
+ },
116
157
  ],
117
158
  async handler(input, ctx) {
118
159
  ctx.log.info('Fetching CPSC recall detail', { recall_number: input.recall_number });
@@ -122,13 +163,32 @@ export const cpscGetRecall = tool('cpsc_get_recall', {
122
163
  raw = await svc.getByNumber(input.recall_number, ctx);
123
164
  }
124
165
  catch (err) {
125
- throw ctx.fail('upstream_error', 'CPSC API request failed.', { ...ctx.recoveryFor('upstream_error') }, { cause: err });
166
+ const detail = err instanceof Error ? err.message : String(err);
167
+ if (err instanceof McpError && err.data?.retryable === false) {
168
+ throw ctx.fail('upstream_rejected', detail, { ...ctx.recoveryFor('upstream_rejected') }, { cause: err });
169
+ }
170
+ throw ctx.fail('upstream_error', `CPSC API request failed: ${detail}`, { ...ctx.recoveryFor('upstream_error') }, { cause: err });
126
171
  }
127
172
  if (!raw) {
128
173
  throw ctx.fail('not_found', `No CPSC recall found with number "${input.recall_number}".`, {
129
174
  ...ctx.recoveryFor('not_found'),
130
175
  });
131
176
  }
177
+ const hazards = raw.Hazards.filter((h) => h.Name).map((h) => ({ description: h.Name }));
178
+ const products = raw.Products.map((p) => ({
179
+ name: p.Name,
180
+ units_recalled: p.NumberOfUnits ?? '',
181
+ }));
182
+ const data_quality_notes = [];
183
+ if (!raw.Description?.trim()) {
184
+ data_quality_notes.push('CPSC published no description text for this recall, so product identification details (including model numbers) are unavailable here.');
185
+ }
186
+ if (hazards.length === 0) {
187
+ data_quality_notes.push('CPSC listed no hazard description for this recall.');
188
+ }
189
+ if (products.length === 0) {
190
+ data_quality_notes.push('CPSC listed no product entries for this recall.');
191
+ }
132
192
  return {
133
193
  recall_number: raw.RecallNumber,
134
194
  recall_date: raw.RecallDate.slice(0, 10),
@@ -137,15 +197,12 @@ export const cpscGetRecall = tool('cpsc_get_recall', {
137
197
  description: raw.Description,
138
198
  cpsc_url: raw.URL,
139
199
  consumer_contact: raw.ConsumerContact,
140
- hazards: raw.Hazards.filter((h) => h.Name).map((h) => ({ description: h.Name })),
200
+ hazards,
141
201
  remedy_options: raw.RemedyOptions.map((o) => o.Option).filter(Boolean),
142
202
  remedy_instructions: raw.Remedies.map((r) => r.Name)
143
203
  .filter(Boolean)
144
204
  .join(' '),
145
- products: raw.Products.map((p) => ({
146
- name: p.Name,
147
- units_recalled: p.NumberOfUnits ?? '',
148
- })),
205
+ products,
149
206
  upcs: raw.ProductUPCs.map((u) => u.UPC).filter(Boolean),
150
207
  injuries: raw.Injuries.map((i) => i.Name)
151
208
  .filter(Boolean)
@@ -157,57 +214,83 @@ export const cpscGetRecall = tool('cpsc_get_recall', {
157
214
  manufacturer_countries: raw.ManufacturerCountries.map((c) => c.Country).filter(Boolean),
158
215
  images: raw.Images.map((img) => ({ url: img.URL, caption: img.Caption })),
159
216
  coordinated_recalls: raw.Inconjunctions.map((inj) => inj.URL).filter(Boolean),
217
+ data_quality_notes,
160
218
  cpsc_jurisdiction: JURISDICTION,
219
+ source_note: SOURCE_NOTE,
161
220
  };
162
221
  },
222
+ /**
223
+ * Relayed CPSC text is rendered as blockquotes under "(CPSC source text)" headings;
224
+ * everything outside a blockquote is this server's own guidance.
225
+ */
163
226
  format(result) {
164
227
  const lines = [];
165
228
  lines.push(`# [${result.recall_number}] — ${result.title}`);
166
229
  lines.push(`Issued: ${result.recall_date} | Last updated: ${result.last_updated}`);
230
+ lines.push('Quoted blocks below are CPSC source text, relayed unedited.');
231
+ lines.push('');
232
+ lines.push('**⚠️ Hazard (CPSC source text):**');
233
+ lines.push(result.hazards.length > 0
234
+ ? asSourceText(result.hazards.map((h) => h.description).join('; '))
235
+ : ABSENT_TEXT);
167
236
  lines.push('');
168
- const hazardText = result.hazards.length > 0
169
- ? result.hazards.map((h) => h.description).join('; ')
170
- : 'Not specified';
171
- lines.push(`**⚠️ Hazard:** ${hazardText}`);
172
237
  const remedyTypes = result.remedy_options.length > 0 ? result.remedy_options.join(', ') : 'Not specified';
173
- const remedyText = result.remedy_instructions || 'See CPSC recall page.';
174
- lines.push(`**✅ Remedy:** ${remedyTypes} — ${remedyText}`);
175
- const contact = result.consumer_contact ?? 'See CPSC recall page.';
176
- lines.push(`**Contact:** ${contact}`);
238
+ lines.push(`**✅ Remedy:** ${remedyTypes} — instructions from CPSC:`);
239
+ lines.push(result.remedy_instructions ? asSourceText(result.remedy_instructions) : ABSENT_TEXT_SEE_PAGE);
177
240
  lines.push('');
178
- lines.push('## Products Affected');
241
+ lines.push('**Contact (CPSC source text):**');
242
+ lines.push(result.consumer_contact ? asSourceText(result.consumer_contact) : ABSENT_TEXT_SEE_PAGE);
243
+ lines.push('');
244
+ lines.push('## Products Affected (CPSC source text)');
179
245
  for (const p of result.products) {
180
- lines.push(`- ${p.name} — ${p.units_recalled || 'units not specified'}`);
246
+ lines.push(`> - ${p.name} — ${p.units_recalled || 'units not specified'}`);
247
+ }
248
+ if (result.products.length === 0) {
249
+ lines.push(ABSENT_TEXT);
181
250
  }
182
- lines.push('**Note:** Model numbers are in the description text below if not listed here.');
183
251
  if (result.upcs.length > 0) {
184
- lines.push(`**UPCs (recall-level):** ${result.upcs.join(', ')} — applies to this recall as a whole`);
252
+ // A bare '>' keeps the UPC line a sibling block inside the quote, not a list continuation.
253
+ if (result.products.length > 0) {
254
+ lines.push('>');
255
+ }
256
+ lines.push(`> UPCs (recall-level): ${result.upcs.join(', ')}`);
185
257
  }
186
258
  lines.push('');
187
- lines.push('## Description');
188
- lines.push(result.description);
259
+ lines.push('Model numbers are in the description below if not listed here.');
260
+ lines.push('UPCs are recorded per recall, not per product, and apply to the recall as a whole.');
189
261
  lines.push('');
190
- lines.push('## Incidents / Injuries');
191
- lines.push(result.injuries || 'None reported');
262
+ lines.push('## Description (CPSC source text)');
263
+ lines.push(result.description?.trim() ? asSourceText(result.description) : ABSENT_TEXT);
264
+ lines.push('');
265
+ lines.push('## Incidents / Injuries (CPSC source text)');
266
+ lines.push(result.injuries ? asSourceText(result.injuries) : ABSENT_TEXT);
192
267
  lines.push('');
193
268
  if (result.retailers.length > 0) {
194
- lines.push('## Sold By');
269
+ lines.push('## Sold By (CPSC source text)');
195
270
  for (const r of result.retailers) {
196
- lines.push(`- ${r}`);
271
+ lines.push(`> - ${r}`);
197
272
  }
198
273
  lines.push('');
199
274
  }
200
- const orgs = [...result.manufacturers, ...result.importers];
201
- if (orgs.length > 0) {
202
- lines.push('## Manufactured By / Imported By');
203
- for (const org of orgs) {
275
+ /** Manufacturer and importer are distinct roles — each gets its own heading. */
276
+ if (result.manufacturers.length > 0) {
277
+ lines.push('## Manufactured By');
278
+ for (const org of result.manufacturers) {
279
+ lines.push(`- ${org}`);
280
+ }
281
+ }
282
+ if (result.importers.length > 0) {
283
+ lines.push('## Imported By');
284
+ for (const org of result.importers) {
204
285
  lines.push(`- ${org}`);
205
286
  }
206
287
  }
207
288
  if (result.manufacturer_countries.length > 0) {
208
289
  lines.push(`Country of origin: ${result.manufacturer_countries.join(', ')}`);
209
290
  }
210
- if (orgs.length > 0 || result.manufacturer_countries.length > 0) {
291
+ if (result.manufacturers.length > 0 ||
292
+ result.importers.length > 0 ||
293
+ result.manufacturer_countries.length > 0) {
211
294
  lines.push('');
212
295
  }
213
296
  if (result.distributors.length > 0) {
@@ -218,11 +301,12 @@ export const cpscGetRecall = tool('cpsc_get_recall', {
218
301
  lines.push('');
219
302
  }
220
303
  if (result.images.length > 0) {
221
- lines.push(`## Images (${result.images.length})`);
304
+ lines.push(`## Images (${result.images.length}) — captions are CPSC source text`);
222
305
  for (const img of result.images) {
223
- lines.push(`- ${img.caption} — ${img.url}`);
306
+ lines.push(`- ${img.url}`);
307
+ lines.push(asSourceText(img.caption));
308
+ lines.push('');
224
309
  }
225
- lines.push('');
226
310
  }
227
311
  if (result.coordinated_recalls.length > 0) {
228
312
  lines.push('## Coordinated Recalls');
@@ -231,7 +315,15 @@ export const cpscGetRecall = tool('cpsc_get_recall', {
231
315
  }
232
316
  lines.push('');
233
317
  }
318
+ if (result.data_quality_notes.length > 0) {
319
+ lines.push('## Data quality (server-assessed)');
320
+ for (const note of result.data_quality_notes) {
321
+ lines.push(`- ${note}`);
322
+ }
323
+ lines.push('');
324
+ }
234
325
  lines.push(`[View official CPSC recall page](${result.cpsc_url})`);
326
+ lines.push(`Source: ${result.source_note}`);
235
327
  lines.push(`CPSC jurisdiction: ${result.cpsc_jurisdiction}`);
236
328
  return [{ type: 'text', text: lines.join('\n') }];
237
329
  },
@@ -1 +1 @@
1
- {"version":3,"file":"cpsc-get-recall.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/cpsc-get-recall.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAErF,2DAA2D;AAC3D,MAAM,YAAY,GAChB,6FAA6F;IAC7F,iHAAiH,CAAC;AAEpH,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,iBAAiB,EAAE;IACnD,KAAK,EAAE,wBAAwB;IAC/B,WAAW,EACT,yDAAyD;QACzD,8FAA8F;QAC9F,0EAA0E;QAC1E,iGAAiG;QACjG,kHAAkH;IACpH,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE;IAEzD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,aAAa,EAAE,CAAC;aACb,MAAM,EAAE;aACR,KAAK,CAAC,iBAAiB,CAAC;aACxB,QAAQ,CACP,uFAAuF;YACrF,iFAAiF;YACjF,0CAA0C,CAC7C;KACJ,CAAC;IAEF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC;QACxD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QAC1D,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gCAAgC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C,EAAE,CAAC,CAAC;QACjB,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,oCAAoC,MAAM,CAAC,QAAQ,GAAG,CAAC,CAAC;QACnE,KAAK,CAAC,IAAI,CAAC,WAAW,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;QAC5C,KAAK,CAAC,IAAI,CAAC,sBAAsB,MAAM,CAAC,iBAAiB,EAAE,CAAC,CAAC;QAE7D,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -8,6 +8,7 @@ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
8
8
  export declare const cpscGetRecent: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
9
9
  days: z.ZodDefault<z.ZodNumber>;
10
10
  limit: z.ZodDefault<z.ZodNumber>;
11
+ offset: z.ZodDefault<z.ZodNumber>;
11
12
  }, z.core.$strip>, z.ZodObject<{
12
13
  recalls: z.ZodArray<z.ZodObject<{
13
14
  recall_number: z.ZodString;
@@ -17,6 +18,7 @@ export declare const cpscGetRecent: import("@cyanheads/mcp-ts-core").ToolDefinit
17
18
  remedy_options: z.ZodArray<z.ZodString>;
18
19
  products: z.ZodArray<z.ZodString>;
19
20
  cpsc_url: z.ZodString;
21
+ data_quality_notes: z.ZodArray<z.ZodString>;
20
22
  }, z.core.$strip>>;
21
23
  period: z.ZodObject<{
22
24
  start: z.ZodString;
@@ -25,12 +27,21 @@ export declare const cpscGetRecent: import("@cyanheads/mcp-ts-core").ToolDefinit
25
27
  }, z.core.$strip>;
26
28
  total_found: z.ZodNumber;
27
29
  truncated: z.ZodBoolean;
30
+ offset: z.ZodNumber;
31
+ has_more: z.ZodBoolean;
28
32
  cpsc_jurisdiction: z.ZodString;
33
+ source_note: z.ZodString;
29
34
  }, z.core.$strip>, readonly [{
30
35
  readonly reason: "upstream_error";
31
36
  readonly code: JsonRpcErrorCode.ServiceUnavailable;
32
- readonly when: "The saferproducts.gov API returned an error or timed out";
37
+ readonly when: "The saferproducts.gov API returned a transient error or timed out";
33
38
  readonly recovery: "The CPSC API is occasionally unavailable. Retry in a few seconds.";
34
39
  readonly retryable: true;
40
+ }, {
41
+ readonly reason: "upstream_rejected";
42
+ readonly code: JsonRpcErrorCode.ServiceUnavailable;
43
+ readonly when: "The saferproducts.gov API answered with an error row instead of recall records, which the same request will always produce";
44
+ readonly recovery: "Do not retry this request unchanged — it fails deterministically. Read the message for what CPSC rejected, then try a different days window.";
45
+ readonly retryable: false;
35
46
  }], undefined>;
36
47
  //# sourceMappingURL=cpsc-get-recent.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cpsc-get-recent.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/cpsc-get-recent.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAajE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;cAmKxB,CAAC"}
1
+ {"version":3,"file":"cpsc-get-recent.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/cpsc-get-recent.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AAmB3E,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6PxB,CAAC"}
@@ -4,11 +4,15 @@
4
4
  * @module mcp-server/tools/definitions/cpsc-get-recent
5
5
  */
6
6
  import { tool, z } from '@cyanheads/mcp-ts-core';
7
- import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
7
+ import { JsonRpcErrorCode, McpError } from '@cyanheads/mcp-ts-core/errors';
8
8
  import { getCpscRecallService } from '../../../services/cpsc-recall/cpsc-recall-service.js';
9
9
  /** Static jurisdiction note included in every response. */
10
10
  const JURISDICTION = 'CPSC covers consumer products — toys, electronics, furniture, appliances, tools, clothing. ' +
11
11
  'Does NOT cover: food/drugs (FDA), motor vehicles/tires (NHTSA), boats (USCG), pesticides (EPA), firearms (ATF).';
12
+ /** Static provenance caveat included in every response. */
13
+ const SOURCE_NOTE = 'Recall fields are relayed verbatim from the CPSC record and are neither edited nor verified by this server. ' +
14
+ 'CPSC records occasionally carry missing or inconsistent text. ' +
15
+ 'Check cpsc_url before acting on a recall for a consumer-facing decision.';
12
16
  /** Format a Date as "YYYY-MM-DD". */
13
17
  function toIsoDate(d) {
14
18
  return d.toISOString().slice(0, 10);
@@ -18,6 +22,7 @@ export const cpscGetRecent = tool('cpsc_get_recent', {
18
22
  description: 'Fetch the most recent CPSC consumer product recalls, ordered newest-first. ' +
19
23
  'Use for "what\'s been recalled lately?" or a product safety feed. ' +
20
24
  'Always applies a date window (default: last 30 days) — without a date filter the API returns all 9,800+ records. ' +
25
+ 'Page past limit with offset: narrowing days cannot page, because the window is anchored to today and shrinking it drops the oldest records rather than advancing past the newest. ' +
21
26
  'CPSC jurisdiction: consumer products only — food, vehicles, drugs, and pesticides are covered by other agencies.',
22
27
  annotations: { readOnlyHint: true },
23
28
  input: z.object({
@@ -35,6 +40,13 @@ export const cpscGetRecent = tool('cpsc_get_recent', {
35
40
  .max(100)
36
41
  .default(20)
37
42
  .describe('Maximum number of recalls to return. Defaults to 20.'),
43
+ offset: z
44
+ .number()
45
+ .int()
46
+ .min(0)
47
+ .default(0)
48
+ .describe('Skip this many recalls in the window before returning results. Combine with limit to page through total_found — e.g. limit 20 with offset 0, 20, 40. ' +
49
+ 'An offset at or past total_found returns an empty result set rather than an error.'),
38
50
  }),
39
51
  output: z.object({
40
52
  recalls: z
@@ -48,11 +60,19 @@ export const cpscGetRecent = tool('cpsc_get_recent', {
48
60
  hazards: z
49
61
  .array(z.string().describe('Hazard description.'))
50
62
  .describe('What is dangerous.'),
51
- remedy_options: z.array(z.string().describe('Remedy type.')).describe('Remedy types.'),
63
+ remedy_options: z
64
+ .array(z.string().describe('Remedy type.'))
65
+ .describe('Remedy types: Refund, Repair, Replace, New Instructions, Dispose, Label, No Remedy Available, Inspect. ' +
66
+ 'Multiple may apply. Often empty — CPSC classified the remedy on fewer than half its records; ' +
67
+ 'call cpsc_get_recall for the remedy narrative when this is empty.'),
52
68
  products: z
53
69
  .array(z.string().describe('Product name.'))
54
70
  .describe('Product names recalled.'),
55
71
  cpsc_url: z.string().describe('Official CPSC recall page URL.'),
72
+ data_quality_notes: z
73
+ .array(z.string().describe('One gap found in the upstream record.'))
74
+ .describe('Gaps this server observed in the upstream CPSC record — absent hazard text, absent product entries. ' +
75
+ 'Derived from which fields CPSC left empty, not from any judgement about the recall itself. Empty when nothing is missing.'),
56
76
  })
57
77
  .describe('A recent CPSC recall.'))
58
78
  .describe('Recent recalls, newest-first.'),
@@ -63,21 +83,39 @@ export const cpscGetRecent = tool('cpsc_get_recent', {
63
83
  days: z.number().describe('Window length in days.'),
64
84
  })
65
85
  .describe('Date range queried.'),
66
- total_found: z.number().describe('Total recalls in this period before the limit was applied.'),
67
- truncated: z.boolean().describe('True when total_found exceeds the limit.'),
86
+ total_found: z
87
+ .number()
88
+ .describe('Total recalls in this period, counted before offset and limit narrow the window.'),
89
+ truncated: z
90
+ .boolean()
91
+ .describe('True when total_found exceeds the limit. Independent of offset.'),
92
+ offset: z.number().describe('Number of recalls skipped before this window.'),
93
+ has_more: z
94
+ .boolean()
95
+ .describe('True when recalls remain past this window — call again with offset raised by the number of recalls returned.'),
68
96
  cpsc_jurisdiction: z
69
97
  .string()
70
98
  .describe('CPSC covers consumer products — toys, electronics, furniture, appliances, tools, clothing. ' +
71
99
  'Does NOT cover: food/drugs (FDA), motor vehicles/tires (NHTSA), boats (USCG), pesticides (EPA), firearms (ATF).'),
100
+ source_note: z
101
+ .string()
102
+ .describe('Provenance caveat: recall fields are relayed from CPSC unedited and unverified; check cpsc_url before a consumer-facing decision.'),
72
103
  }),
73
104
  errors: [
74
105
  {
75
106
  reason: 'upstream_error',
76
107
  code: JsonRpcErrorCode.ServiceUnavailable,
77
- when: 'The saferproducts.gov API returned an error or timed out',
108
+ when: 'The saferproducts.gov API returned a transient error or timed out',
78
109
  recovery: 'The CPSC API is occasionally unavailable. Retry in a few seconds.',
79
110
  retryable: true,
80
111
  },
112
+ {
113
+ reason: 'upstream_rejected',
114
+ code: JsonRpcErrorCode.ServiceUnavailable,
115
+ when: 'The saferproducts.gov API answered with an error row instead of recall records, which the same request will always produce',
116
+ recovery: 'Do not retry this request unchanged — it fails deterministically. Read the message for what CPSC rejected, then try a different days window.',
117
+ retryable: false,
118
+ },
81
119
  ],
82
120
  async handler(input, ctx) {
83
121
  const endDate = new Date();
@@ -90,6 +128,7 @@ export const cpscGetRecent = tool('cpsc_get_recent', {
90
128
  date_start: dateStart,
91
129
  date_end: dateEnd,
92
130
  limit: input.limit,
131
+ offset: input.offset,
93
132
  });
94
133
  const svc = getCpscRecallService();
95
134
  let raw;
@@ -97,37 +136,68 @@ export const cpscGetRecent = tool('cpsc_get_recent', {
97
136
  raw = await svc.getRecent(dateStart, dateEnd, ctx);
98
137
  }
99
138
  catch (err) {
100
- throw ctx.fail('upstream_error', 'CPSC API request failed.', { ...ctx.recoveryFor('upstream_error') }, { cause: err });
139
+ const detail = err instanceof Error ? err.message : String(err);
140
+ if (err instanceof McpError && err.data?.retryable === false) {
141
+ throw ctx.fail('upstream_rejected', detail, { ...ctx.recoveryFor('upstream_rejected') }, { cause: err });
142
+ }
143
+ throw ctx.fail('upstream_error', `CPSC API request failed: ${detail}`, { ...ctx.recoveryFor('upstream_error') }, { cause: err });
101
144
  }
102
145
  const total_found = raw.length;
103
- const slice = raw.slice(0, input.limit);
104
146
  const truncated = total_found > input.limit;
105
- const recalls = slice.map((r) => ({
106
- recall_number: r.RecallNumber,
107
- recall_date: r.RecallDate.slice(0, 10),
108
- title: r.Title,
109
- hazards: r.Hazards.map((h) => h.Name).filter(Boolean),
110
- remedy_options: r.RemedyOptions.map((o) => o.Option).filter(Boolean),
111
- products: r.Products.map((p) => p.Name).filter(Boolean),
112
- cpsc_url: r.URL,
113
- }));
114
- ctx.log.info('Recent recalls fetched', { total_found, returned: recalls.length, truncated });
147
+ // An offset at or past total_found is a valid empty page, not an error.
148
+ const slice = raw.slice(input.offset, input.offset + input.limit);
149
+ const has_more = input.offset + slice.length < total_found;
150
+ const recalls = slice.map((r) => {
151
+ const hazards = r.Hazards.map((h) => h.Name).filter(Boolean);
152
+ const products = r.Products.map((p) => p.Name).filter(Boolean);
153
+ const data_quality_notes = [];
154
+ if (hazards.length === 0) {
155
+ data_quality_notes.push('CPSC listed no hazard description for this recall.');
156
+ }
157
+ if (products.length === 0) {
158
+ data_quality_notes.push('CPSC listed no product entries for this recall.');
159
+ }
160
+ return {
161
+ recall_number: r.RecallNumber,
162
+ recall_date: r.RecallDate.slice(0, 10),
163
+ title: r.Title,
164
+ hazards,
165
+ remedy_options: r.RemedyOptions.map((o) => o.Option).filter(Boolean),
166
+ products,
167
+ cpsc_url: r.URL,
168
+ data_quality_notes,
169
+ };
170
+ });
171
+ ctx.log.info('Recent recalls fetched', {
172
+ total_found,
173
+ returned: recalls.length,
174
+ offset: input.offset,
175
+ truncated,
176
+ has_more,
177
+ });
115
178
  return {
116
179
  recalls,
117
180
  period: { start: dateStart, end: dateEnd, days: input.days },
118
181
  total_found,
119
182
  truncated,
183
+ offset: input.offset,
184
+ has_more,
120
185
  cpsc_jurisdiction: JURISDICTION,
186
+ source_note: SOURCE_NOTE,
121
187
  };
122
188
  },
123
189
  format(result) {
124
190
  const lines = [];
125
191
  lines.push(`# Recent CPSC Recalls — ${result.period.start} to ${result.period.end} (${result.period.days} days)`);
126
192
  lines.push('');
127
- const truncNote = result.truncated
128
- ? `, showing first ${result.recalls.length} (truncated)`
193
+ const truncNote = result.truncated ? ' (truncated by limit)' : '';
194
+ const windowNote = result.truncated || result.offset > 0
195
+ ? `, showing ${result.recalls.length} from offset ${result.offset}${truncNote}`
129
196
  : '';
130
- lines.push(`Found ${result.total_found} recall${result.total_found !== 1 ? 's' : ''}${truncNote}.`);
197
+ lines.push(`Found ${result.total_found} recall${result.total_found !== 1 ? 's' : ''}${windowNote}.`);
198
+ if (result.has_more) {
199
+ lines.push(`More available — repeat with offset ${result.offset + result.recalls.length}.`);
200
+ }
131
201
  lines.push('');
132
202
  lines.push('---');
133
203
  for (const r of result.recalls) {
@@ -135,11 +205,16 @@ export const cpscGetRecent = tool('cpsc_get_recent', {
135
205
  const remedyText = r.remedy_options.length > 0 ? r.remedy_options.join(', ') : 'Not specified';
136
206
  const productText = r.products.length > 0 ? r.products.join(', ') : 'Not specified';
137
207
  lines.push(`**${r.recall_date}** — [${r.recall_number}] ${r.title}`);
208
+ lines.push('CPSC source fields:');
138
209
  lines.push(`Hazard: ${hazardText} | Remedy: ${remedyText}`);
139
210
  lines.push(`Products: ${productText}`);
140
211
  lines.push(`[CPSC page](${r.cpsc_url})`);
212
+ if (r.data_quality_notes.length > 0) {
213
+ lines.push(`**Data quality (server-assessed):** ${r.data_quality_notes.join(' ')}`);
214
+ }
141
215
  lines.push('---');
142
216
  }
217
+ lines.push(`Source: ${result.source_note}`);
143
218
  lines.push(`CPSC jurisdiction: ${result.cpsc_jurisdiction}`);
144
219
  return [{ type: 'text', text: lines.join('\n') }];
145
220
  },