notifyme-csm-mcp 1.0.6 → 1.0.7

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 +61 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -388,6 +388,47 @@ const TOOLS = [
388
388
  required: ["domain"],
389
389
  },
390
390
  },
391
+ {
392
+ name: "get_funnel_entities",
393
+ description: "List the actual companies behind a Reports funnel stage count — e.g. which agencies were 'Approached' in the last 7 days (the number you see on Reports → Funnel View). 'Approached' = received an email, LinkedIn outreach, Gmail thread, or note in the window. Returns each company's name, id, and type, and the total count (which matches the funnel).",
394
+ inputSchema: {
395
+ type: "object",
396
+ properties: {
397
+ entityType: {
398
+ type: "string",
399
+ enum: ["agency", "merchant", "both"],
400
+ description: "Which entities to include (default: agency).",
401
+ },
402
+ timeframe: {
403
+ type: "string",
404
+ enum: ["last7days", "last30days", "last90days", "mtd", "qtd", "ytd"],
405
+ description: "Reporting window (default: last7days).",
406
+ },
407
+ stage: {
408
+ type: "string",
409
+ description: "Funnel stage / pipeline column name (default: 'approached'). e.g. 'approached', 'meeting scheduled', 'meeting attended', 'qualified', 'won'.",
410
+ },
411
+ },
412
+ },
413
+ },
414
+ {
415
+ name: "link_merchant_to_agency",
416
+ description: "Link a merchant to an agency (create the agency→merchant 'manages' pair) so the merchant rolls up under that agency in Agency Analytics. Look up both ids first with search_companies / list_companies. Idempotent; a merchant's existing managing-agency link is replaced. An agency only appears in analytics once it manages at least one merchant.",
417
+ inputSchema: {
418
+ type: "object",
419
+ properties: {
420
+ agencyCompanyId: {
421
+ type: "number",
422
+ description: "companies.id of the agency (its type must be 'agency').",
423
+ },
424
+ merchantCompanyId: {
425
+ type: "number",
426
+ description: "companies.id of the merchant (its type must be 'merchant').",
427
+ },
428
+ },
429
+ required: ["agencyCompanyId", "merchantCompanyId"],
430
+ },
431
+ },
391
432
  // ── Kanban ────────────────────────────────────────────────────────────────
392
433
  {
393
434
  name: "list_kanban_columns",
@@ -579,6 +620,26 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
579
620
  data = await api("GET", `/storeleads?${new URLSearchParams({ domain })}`);
580
621
  break;
581
622
  }
623
+ case "get_funnel_entities": {
624
+ const a = args;
625
+ const qs = new URLSearchParams();
626
+ if (a.entityType)
627
+ qs.set("entityType", String(a.entityType));
628
+ if (a.timeframe)
629
+ qs.set("timeframe", String(a.timeframe));
630
+ if (a.stage)
631
+ qs.set("stage", String(a.stage));
632
+ data = await api("GET", `/funnel-entities?${qs.toString()}`);
633
+ break;
634
+ }
635
+ case "link_merchant_to_agency": {
636
+ const a = args;
637
+ data = await api("POST", "/agencies/link-merchant", {
638
+ agencyCompanyId: a.agencyCompanyId,
639
+ merchantCompanyId: a.merchantCompanyId,
640
+ });
641
+ break;
642
+ }
582
643
  // ── Kanban ─────────────────────────────────────────────────────────────
583
644
  case "list_kanban_columns": {
584
645
  data = await api("GET", "/kanban/columns");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notifyme-csm-mcp",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
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",