byclaw-mcp 0.4.1 → 0.4.3

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 (2) hide show
  1. package/dist/index.js +39 -25
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -188,31 +188,45 @@ server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
188
188
  if (allImages[0]) {
189
189
  content.push({ type: 'image', data: allImages[0].data, mimeType: allImages[0].mimeType });
190
190
  }
191
- // Add structured data
192
- content.push({ type: 'text', text: JSON.stringify({
193
- type: 'product_recommendation',
194
- advisor: advisorLabel,
195
- advisor_profile: d.advisor_profile || null,
196
- recommendation: {
197
- title: d.picked?.title || '',
198
- price: d.picked?.price ?? '',
199
- brand: d.picked?.brand || '',
200
- merchant: d.picked?.merchant || '',
201
- url: d.picked?.affiliate_url || '',
202
- review: d.review || d.reasoning || '',
203
- },
204
- alternatives: (d.alternatives || []).slice(0, 3).map((a) => ({
205
- title: a.title,
206
- price: a.price,
207
- brand: a.brand || '',
208
- category: a.category || '',
209
- merchant: a.merchant || '',
210
- url: a.affiliate_url || '',
211
- })),
212
- compared: d.compared || 0,
213
- reasoning: d.reasoning || '',
214
- affiliate_notice: d.disclosure || 'Affiliate disclosure: The links on this page are affiliate links. byclaw.io receives a commission from the retailer when you make a purchase. No additional cost to you.',
215
- }, null, 2) });
191
+ // Add structured data — handle no_match vs product_recommendation
192
+ if (d.type === 'no_match') {
193
+ content.push({ type: 'text', text: JSON.stringify({
194
+ type: 'no_match',
195
+ advisor: advisorLabel,
196
+ advisor_profile: d.advisor_profile || null,
197
+ message_de: 'Hab leider nichts in deinem Suchbereich gefunden. Probier es mit weniger Filtern oder anderen Begriffen.',
198
+ message_en: 'No products found for your search. Try fewer filters or different terms.',
199
+ compared: 0,
200
+ affiliate_notice: d.disclosure || 'Affiliate disclosure: The links on this page are affiliate links. byclaw.io receives a commission from the retailer when you make a purchase. No additional cost to you.',
201
+ }, null, 2) });
202
+ }
203
+ else {
204
+ content.push({ type: 'text', text: JSON.stringify({
205
+ type: 'product_recommendation',
206
+ advisor: advisorLabel,
207
+ advisor_profile: d.advisor_profile || null,
208
+ recommendation: {
209
+ title: d.picked?.title || '',
210
+ price: d.picked?.price ?? '',
211
+ brand: d.picked?.brand || '',
212
+ merchant: d.picked?.merchant || '',
213
+ url: d.picked?.affiliate_url || '',
214
+ review: d.review || d.reasoning || '',
215
+ },
216
+ alternatives: (d.alternatives || []).slice(0, 3).map((a) => ({
217
+ title: a.title,
218
+ price: a.price,
219
+ brand: a.brand || '',
220
+ category: a.category || '',
221
+ merchant: a.merchant || '',
222
+ url: a.affiliate_url || '',
223
+ })),
224
+ compared: d.compared || 0,
225
+ reasoning: d.reasoning || '',
226
+ affiliate_notice: d.disclosure || 'Affiliate disclosure: The links on this page are affiliate links. byclaw.io receives a commission from the retailer when you make a purchase. No additional cost to you.',
227
+ ...(d.note ? { note: d.note } : {}),
228
+ }, null, 2) });
229
+ }
216
230
  // Add alternative images
217
231
  allImages.slice(1).forEach((img) => {
218
232
  if (img)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "byclaw-mcp",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "description": "MCP Server for byclaw.io — Your AI shopping advisor. Connects Claude Desktop and other MCP clients to the byclaw.io product catalog.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {