@loopops/mcp-server 3.23.0 → 3.24.0

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 CHANGED
@@ -13,6 +13,7 @@ import { registerDeployTools } from "./tools/deploy.js";
13
13
  import { registerEngTools } from "./tools/eng.js";
14
14
  import { registerCrmTools } from "./tools/crm.js";
15
15
  import { registerEngageTools } from "./tools/engage.js";
16
+ import { registerPursueTools } from "./tools/pursue.js";
16
17
  import { registerAccountMasterTools } from "./tools/account-master.js";
17
18
  import { registerPeopleMasterTools } from "./tools/people-master.js";
18
19
  import { registerScoringTools } from "./tools/scoring.js";
@@ -59,6 +60,7 @@ registerConfigTools(server, allowedSkills);
59
60
  registerEngTools(server, allowedSkills);
60
61
  registerCrmTools(server, allowedSkills);
61
62
  registerEngageTools(server, allowedSkills);
63
+ registerPursueTools(server, allowedSkills);
62
64
  registerAccountMasterTools(server, allowedSkills);
63
65
  registerPeopleMasterTools(server, allowedSkills);
64
66
  registerDeployTools(server, allowedSkills);
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Pursue-loop hybrid analysis tools.
3
+ *
4
+ * Home for hybrid-tools-pattern (docs/HYBRID-TOOLS.md) tools that operate
5
+ * on the deal-progression / pipeline-health surface — composing CH +
6
+ * Salesforce + Postgres reads to deliver deterministic structured analysis
7
+ * an operator can act on. By rule, these tools are read-only; they emit
8
+ * recommendations + copy-pasteable salesforce-hosted commands. The
9
+ * operator runs the actual writes through `salesforce-hosted`.
10
+ *
11
+ * First instance: review_stale_pipeline. As more hybrid pursue tools land
12
+ * (forecast_risk_review, manager_coaching_brief, etc.), they go here.
13
+ */
14
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
15
+ export declare function registerPursueTools(server: McpServer, allowed: Set<string>): void;
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Pursue-loop hybrid analysis tools.
3
+ *
4
+ * Home for hybrid-tools-pattern (docs/HYBRID-TOOLS.md) tools that operate
5
+ * on the deal-progression / pipeline-health surface — composing CH +
6
+ * Salesforce + Postgres reads to deliver deterministic structured analysis
7
+ * an operator can act on. By rule, these tools are read-only; they emit
8
+ * recommendations + copy-pasteable salesforce-hosted commands. The
9
+ * operator runs the actual writes through `salesforce-hosted`.
10
+ *
11
+ * First instance: review_stale_pipeline. As more hybrid pursue tools land
12
+ * (forecast_risk_review, manager_coaching_brief, etc.), they go here.
13
+ */
14
+ import { z } from "zod";
15
+ import { trpcQuery } from "../api-client.js";
16
+ import { safeTool } from "./_helpers.js";
17
+ export function registerPursueTools(server, allowed) {
18
+ if (allowed.has("review_stale_pipeline")) {
19
+ server.tool("review_stale_pipeline", [
20
+ "Deterministic stale-pipeline review. Composes ClickHouse reads (salesforce.opportunity + user + account) against a per-caller scope.",
21
+ "Default scope: rep → own opps; manager+ → recursive reporting subtree (any depth). Manager+ can pass {repId} or {managerId} for nodes within their subtree.",
22
+ "Returns Markdown — table of stale opps with classifier-driven recommended actions, plus copy-pasteable commands you run via the salesforce-hosted MCP under your real user identity.",
23
+ "Read-only. Recommends; does not execute writes.",
24
+ ].join(" "), {
25
+ scope: z
26
+ .union([
27
+ z.literal("me"),
28
+ z.literal("my_team"),
29
+ z.literal("subtree"),
30
+ z.object({ repId: z.string().min(1) }),
31
+ z.object({ managerId: z.string().min(1) }),
32
+ ])
33
+ .optional()
34
+ .describe("Optional scope override. Default: rep → 'me'; manager+ → 'subtree'. " +
35
+ "Reps cannot escalate. Managers can scope to {repId} or {managerId} within their subtree only."),
36
+ staleness_days: z
37
+ .number()
38
+ .int()
39
+ .min(1)
40
+ .max(365)
41
+ .optional()
42
+ .describe("Days since LastActivityDate (or LastModifiedDate if no activity logged) threshold. Default 14."),
43
+ stage_filter: z
44
+ .array(z.string())
45
+ .optional()
46
+ .describe("Optional list of stage names to restrict the review (e.g. ['Negotiation/Review','Proposal/Price Quote']). Default: all open stages."),
47
+ min_amount: z
48
+ .number()
49
+ .min(0)
50
+ .optional()
51
+ .describe("Minimum opp amount in dollars. Default 0 (no filter)."),
52
+ }, safeTool(async ({ scope, staleness_days, stage_filter, min_amount }) => trpcQuery("mcp.reviewStalePipeline", {
53
+ scope,
54
+ staleness_days,
55
+ stage_filter,
56
+ min_amount,
57
+ })));
58
+ }
59
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loopops/mcp-server",
3
- "version": "3.23.0",
3
+ "version": "3.24.0",
4
4
  "description": "Loop Operations MCP Server — AI skills for RevOps",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",