@firstdistro/mcp 1.2.1 → 1.2.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/server.js +9 -6
  2. package/package.json +1 -1
package/dist/server.js CHANGED
@@ -641,14 +641,16 @@ Unique users (24h): ${data.uniqueUsersLast24h ?? "N/A"}${topEventsText}`
641
641
  const rawData = await response.json();
642
642
  const data = unwrapApiResponse(rawData);
643
643
  const health = data.health || {};
644
+ const scoreText = typeof health.score === "number" ? `${health.score}/100` : "No score yet";
645
+ const riskText = health.riskLevel === "no-data" ? "No score yet" : health.riskLevel || "Unknown";
644
646
  return {
645
647
  content: [
646
648
  {
647
649
  type: "text",
648
650
  text: `Customer: ${data.account?.name || accountId}
649
651
 
650
- Health Score: ${health.score ?? "N/A"}/100
651
- Risk Level: ${health.riskLevel || "Unknown"}
652
+ Health Score: ${scoreText}
653
+ Risk Level: ${riskText}
652
654
  Trend: ${health.trend || "Unknown"}
653
655
  Last Seen: ${data.account?.lastSeenAt || "Unknown"}`
654
656
  }
@@ -852,7 +854,7 @@ Summary: ${summary.criticalCount ?? 0} critical, ${summary.atRiskCount ?? 0} at-
852
854
  };
853
855
  }
854
856
  const accountList = accounts.slice(0, 15).map(
855
- (a) => `- ${a.name || a.accountId}: Score ${a.healthScore}/100 (${a.riskLevel}) ${a.trend === "declining" ? "\u{1F4C9}" : a.trend === "improving" ? "\u{1F4C8}" : ""}`
857
+ (a) => `- ${a.name || a.accountId}: Score ${typeof a.healthScore === "number" ? `${a.healthScore}/100` : "No score yet"} (${a.riskLevel}) ${a.trend === "declining" ? "\u{1F4C9}" : a.trend === "improving" ? "\u{1F4C8}" : ""}`
856
858
  ).join("\n");
857
859
  return {
858
860
  content: [
@@ -1121,8 +1123,8 @@ After creation, help the user add the returned tracking events to their code.`,
1121
1123
  text: `Experience "${data.experience?.name || name}" created successfully!
1122
1124
 
1123
1125
  **Event names to track:**
1124
- - Start: \`${events.start}\`
1125
- - Success: \`${events.success}\`
1126
+ - Start: \`${events.start || "N/A"}\`
1127
+ - Success: \`${events.success || "N/A"}\`
1126
1128
 
1127
1129
  **Add to your code:**
1128
1130
  ${integrationHint}
@@ -1175,7 +1177,8 @@ Then restart your IDE to use FirstDistro tools.`;
1175
1177
  { name: "get_stuck_customers", description: "Find customers who stopped progressing in a journey" },
1176
1178
  { name: "list_at_risk_accounts", description: "List at-risk customer accounts" },
1177
1179
  { name: "get_sdk_config", description: "Get your installation token and SDK setup code" },
1178
- { name: "setup_sdk", description: "Generate files to set up FirstDistro SDK in your project" }
1180
+ { name: "setup_sdk", description: "Generate files to set up FirstDistro SDK in your project" },
1181
+ { name: "create_experience", description: "Create a new experience to track customer journeys and find stuck users" }
1179
1182
  ];
1180
1183
  for (const tool of placeholderTools) {
1181
1184
  server.tool(tool.name, tool.description, async () => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firstdistro/mcp",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "MCP server for customer success — monitor health scores, detect churn risks, and manage customer journeys from Claude, Cursor, and other AI tools",
5
5
  "type": "module",
6
6
  "bin": {