notifyme-csm-mcp 1.0.12 → 1.0.14

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 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -465,6 +465,7 @@ const TOOLS = [
465
465
  endDate: { type: "string", description: "YYYY-MM-DD inclusive; passing dates implies timeframe=custom (server-TZ)." },
466
466
  channel: { type: "string", enum: ["email", "linkedin", "call", "whatsapp", "other"], description: "Narrow approached+replied to one channel." },
467
467
  tags: { type: "array", items: { type: "string" }, description: "Only companies carrying ALL of these tags." },
468
+ targetUniverseSize: { type: "number", description: "Optional: size of the addressable target universe (e.g. Shopify Plus stores). When provided, totalCoverage.generationCoveragePct = totalLeadsGenerated / targetUniverseSize." },
468
469
  },
469
470
  },
470
471
  },
@@ -486,6 +487,32 @@ const TOOLS = [
486
487
  required: ["agencyCompanyId", "merchantCompanyId"],
487
488
  },
488
489
  },
490
+ {
491
+ name: "merge_companies",
492
+ description: "Merge a duplicate company into its canonical record. EVERYTHING moves to the target — notes, meetings, emails, reminders, Kanban cards (deduped to the furthest-along), activity, Gmail threads — and the source's primary contact plus any previously merged contacts are preserved on the target's Contacts block with provenance. An audit note is written on the target, then the source record is deleted (its full history now lives on the target; nothing is stranded). IRREVERSIBLE — double-check ids with get_company first.",
493
+ inputSchema: {
494
+ type: "object",
495
+ properties: {
496
+ sourceCompanyId: { type: "number", description: "companies.id of the DUPLICATE to merge away" },
497
+ targetCompanyId: { type: "number", description: "companies.id of the CANONICAL record that keeps everything" },
498
+ },
499
+ required: ["sourceCompanyId", "targetCompanyId"],
500
+ },
501
+ },
502
+ {
503
+ name: "add_contact",
504
+ description: "Append a secondary contact to a company's Contacts block (structured — shows on the company page). Deduped against the primary contact and existing entries. Use update_company for the PRIMARY contact slot; use this for additional people.",
505
+ inputSchema: {
506
+ type: "object",
507
+ properties: {
508
+ companyId: { type: "number", description: "Company id" },
509
+ email: { type: "string", description: "Contact email (required, the dedupe key)" },
510
+ name: { type: "string", description: "Full name" },
511
+ phone: { type: "string", description: "Phone" },
512
+ },
513
+ required: ["companyId", "email"],
514
+ },
515
+ },
489
516
  {
490
517
  name: "log_outreach",
491
518
  description: "Log an outbound touch to a company — the SOURCE OF TRUTH for outreach with no dedicated integration (phone calls, WhatsApp, in-person). The 'Approached' reporting stage counts these alongside CSM emails, LinkedIn outreach logs, and Gmail threads. Notes do NOT count as outreach — log real touches here instead. Use search_companies first to get the companyId.",
@@ -742,6 +769,8 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
742
769
  qs.set("channel", String(a.channel));
743
770
  if (a.tags?.length)
744
771
  qs.set("tags", a.tags.join(","));
772
+ if (a.targetUniverseSize)
773
+ qs.set("targetUniverseSize", String(a.targetUniverseSize));
745
774
  data = await api("GET", `/funnel-rates?${qs.toString()}`);
746
775
  break;
747
776
  }
@@ -753,6 +782,16 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
753
782
  });
754
783
  break;
755
784
  }
785
+ case "merge_companies": {
786
+ const a = args;
787
+ data = await api("POST", "/companies/merge", a);
788
+ break;
789
+ }
790
+ case "add_contact": {
791
+ const { companyId, ...body } = args;
792
+ data = await api("POST", `/companies/${companyId}/contacts`, body);
793
+ break;
794
+ }
756
795
  case "log_outreach": {
757
796
  const a = args;
758
797
  data = await api("POST", "/outreach", a);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notifyme-csm-mcp",
3
- "version": "1.0.12",
3
+ "version": "1.0.14",
4
4
  "description": "NotifyMe CSM — MCP server for LLM integrations (Claude Code, Cursor, etc.)",
5
5
  "_versionPolicy": "The version field above is a placeholder and is NEVER updated in git. The real published version lives only on npm — run `npm view notifyme-csm-mcp version` to check. To publish a new release, use the GitHub workflow `Publish MCP` (Actions tab → Publish notifyme-csm-mcp → Run workflow). This prevents recurring merge conflicts across feature/dev/main branches that used to plague every PR.",
6
6
  "type": "module",