byclaw-mcp 0.4.1 → 0.4.2
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/dist/index.js +38 -25
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -188,31 +188,44 @@ 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
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
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
|
+
}, null, 2) });
|
|
228
|
+
}
|
|
216
229
|
// Add alternative images
|
|
217
230
|
allImages.slice(1).forEach((img) => {
|
|
218
231
|
if (img)
|
package/package.json
CHANGED