run_connectors
Fetch fresh price data for products across multiple retailers by executing all available connectors with a barcode and country code.
Instructions
Run all price data connectors (Open Food Facts, Kroger, Walmart, REWE, Migros, A101) to fetch fresh prices for a product in a specific country. Saves results to the database.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| barcode | Yes | Product barcode (8-14 digits) | |
| country_code | Yes | 2-letter country code |
Implementation Reference
- src/index.ts:164-180 (handler)The 'run_connectors' tool is registered and its logic is implemented directly within the server.tool handler in src/index.ts. It calls the /api/connectors/run endpoint.
server.tool( 'run_connectors', 'Run all price data connectors (Open Food Facts, Kroger, Walmart, REWE, Migros, A101) to fetch fresh prices for a product in a specific country. Saves results to the database.', { barcode: z.string().describe('Product barcode (8-14 digits)'), country_code: z.string().length(2).describe('2-letter country code'), }, async ({ barcode, country_code }) => { try { const result = await api('/api/connectors/run', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ barcode, country_code }), }); return text(result); } catch (e) { return errorResult(`Run connectors failed: ${(e as Error).message}`);