@easyfunnel/mcp 0.1.3 → 0.1.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/dist/index.js +15 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -662,8 +662,11 @@ var getFunnelHealthDefinition = {
|
|
|
662
662
|
required: ["project_id"]
|
|
663
663
|
}
|
|
664
664
|
};
|
|
665
|
-
function formatFunnelHealth(data) {
|
|
666
|
-
let output = `Funnel: ${data.funnel_name}
|
|
665
|
+
function formatFunnelHealth(data, funnelId) {
|
|
666
|
+
let output = `Funnel: ${data.funnel_name}`;
|
|
667
|
+
if (funnelId) output += `
|
|
668
|
+
ID: ${funnelId}`;
|
|
669
|
+
output += `
|
|
667
670
|
Time range: ${data.time_range}
|
|
668
671
|
|
|
669
672
|
`;
|
|
@@ -705,7 +708,7 @@ async function getFunnelHealth(client2, args) {
|
|
|
705
708
|
for (const funnel of funnels) {
|
|
706
709
|
try {
|
|
707
710
|
const data2 = await client2.getFunnelHealth(args.project_id, funnel.id, timeRange);
|
|
708
|
-
output += formatFunnelHealth(data2) + "\n---\n\n";
|
|
711
|
+
output += formatFunnelHealth(data2, funnel.id) + "\n---\n\n";
|
|
709
712
|
if (worstFunnel === null || data2.overall_conversion < worstFunnel.conversion) {
|
|
710
713
|
worstFunnel = { name: data2.funnel_name, conversion: data2.overall_conversion };
|
|
711
714
|
}
|
|
@@ -728,7 +731,7 @@ Worst-performing funnel: ${worstFunnel.name} (${worstFunnel.conversion}% convers
|
|
|
728
731
|
}
|
|
729
732
|
const data = await client2.getFunnelHealth(args.project_id, args.funnel_id, timeRange);
|
|
730
733
|
return {
|
|
731
|
-
content: [{ type: "text", text: formatFunnelHealth(data) }]
|
|
734
|
+
content: [{ type: "text", text: formatFunnelHealth(data, args.funnel_id) }]
|
|
732
735
|
};
|
|
733
736
|
}
|
|
734
737
|
|
|
@@ -1492,18 +1495,18 @@ Next: I can set up the SDK in your project, or suggest conversion funnels based
|
|
|
1492
1495
|
const scanData = {
|
|
1493
1496
|
framework,
|
|
1494
1497
|
router,
|
|
1495
|
-
routes,
|
|
1498
|
+
routes: routes.slice(0, 50),
|
|
1499
|
+
routes_total: routes.length,
|
|
1496
1500
|
product_type: productType.type,
|
|
1497
1501
|
product_confidence: productType.confidence,
|
|
1498
1502
|
detection_categories: categories,
|
|
1499
1503
|
detection_count: detections.length,
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
}))
|
|
1504
|
+
detections_by_category: Object.fromEntries(
|
|
1505
|
+
categories.map((cat) => [
|
|
1506
|
+
cat,
|
|
1507
|
+
byCategory[cat].slice(0, 5).map((d) => d.signal)
|
|
1508
|
+
])
|
|
1509
|
+
)
|
|
1507
1510
|
};
|
|
1508
1511
|
return {
|
|
1509
1512
|
content: [
|