@loopops/mcp-server 3.10.0 → 3.12.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
File without changes
package/dist/tools/crm.js CHANGED
@@ -1,49 +1,25 @@
1
1
  import { z } from "zod";
2
- import { trpcQuery, trpcMutation } from "../api-client.js";
2
+ import { trpcMutation } from "../api-client.js";
3
3
  import { safeTool } from "./_helpers.js";
4
- import { leadStatusSchema, opportunityStageSchema, pipelineSortSchema, quarterSchema, rangeSchema, salesforceLeadIdSchema, salesforceOpportunityIdSchema, targetAccountTierSchema, } from "./_schemas.js";
4
+ import { leadStatusSchema, salesforceLeadIdSchema, salesforceOpportunityIdSchema, targetAccountTierSchema, } from "./_schemas.js";
5
5
  export function registerCrmTools(server, allowed) {
6
- if (allowed.has("my_pipeline")) {
7
- server.tool("my_pipeline", "List open Salesforce opportunities (deals with forecasts). Reps see their own, managers see their team's, leadership sees all. For new leads that haven't converted yet, use 'my_leads' instead.", {
8
- stage: opportunityStageSchema
9
- .optional()
10
- .describe("Filter by Salesforce stage. Omit to see all open opportunities."),
11
- sort: pipelineSortSchema
12
- .optional()
13
- .describe("Sort order. Default: close_date ascending."),
14
- }, safeTool(async ({ stage, sort }) => trpcQuery("mcp.myPipeline", { stage, sort })));
15
- }
16
- if (allowed.has("my_leads")) {
17
- server.tool("my_leads", "List Salesforce leads assigned to you (or your team if you're a manager) that were created in the given time window. For open opportunities with forecasts, use 'my_pipeline' instead.", {
18
- status: leadStatusSchema
19
- .optional()
20
- .describe("Filter by Salesforce Lead status. E.g., 'Open - Not Contacted'. Omit for any status."),
21
- range: rangeSchema
22
- .optional()
23
- .describe("Time window for lead creation date. E.g., '7d' = last 7 days, '30d' = default, '90d' = last quarter."),
24
- }, safeTool(async ({ status, range }) => trpcQuery("mcp.myLeads", { status, range })));
25
- }
26
- if (allowed.has("pipeline_health")) {
27
- server.tool("pipeline_health", "Pipeline health summary: deals by stage, win rate, average deal size, pipeline velocity.", {
28
- range: rangeSchema
29
- .optional()
30
- .describe("Time window for closed-deal analysis. Longer ranges (30d, 90d, 180d, 1y) give more stable metrics. Default: 90d."),
31
- }, safeTool(async ({ range }) => trpcQuery("mcp.pipelineHealth", { range })));
32
- }
33
- if (allowed.has("rep_performance")) {
34
- server.tool("rep_performance", "Compare rep performance: open pipeline, activities, lead count, win rate.", {
35
- range: rangeSchema
36
- .optional()
37
- .describe("Time window for closed deals and activity. Default: 30d."),
38
- }, safeTool(async ({ range }) => trpcQuery("mcp.repPerformance", { range })));
39
- }
40
- if (allowed.has("forecast")) {
41
- server.tool("forecast", "Pipeline forecast: weighted pipeline by close date, comparison to target.", {
42
- quarter: quarterSchema
43
- .optional()
44
- .describe("Quarter to forecast. Default: current quarter."),
45
- }, safeTool(async ({ quarter }) => trpcQuery("mcp.forecast", { quarter })));
46
- }
6
+ // my_pipeline retired 2026-05-06 — replaced by ClickHouse parameterized
7
+ // view analytics.my_pipeline. Row policies on salesforce.opportunity
8
+ // enforce per-user scoping (rep: own; manager: team; leadership/ops/eng:
9
+ // all). Query via the Cloud Remote MCP server (mcp.clickhouse.cloud/mcp).
10
+ // See docs/CH-ANALYTICS-VIEWS.md.
11
+ // my_leads retired 2026-05-06 — replaced by ClickHouse view
12
+ // analytics.my_leads. Row policies on salesforce.lead enforce per-user
13
+ // scoping. Filter by created_date in the caller. See docs/CH-ANALYTICS-VIEWS.md.
14
+ // pipeline_health retired 2026-05-06 replaced by ClickHouse views
15
+ // analytics.pipeline_by_stage + analytics.win_rate(range_days). Query via
16
+ // the Cloud Remote MCP server (mcp.clickhouse.cloud/mcp). Row policies on
17
+ // salesforce.opportunity enforce per-user scoping. See docs/CH-ANALYTICS-VIEWS.md.
18
+ // rep_performance retired 2026-05-06 — replaced by ClickHouse view
19
+ // analytics.rep_performance(range_days). See docs/CH-ANALYTICS-VIEWS.md.
20
+ // forecast retired 2026-05-06 replaced by ClickHouse view
21
+ // analytics.forecast(quarter_start, quarter_end). Caller computes the
22
+ // quarter window. See docs/CH-ANALYTICS-VIEWS.md.
47
23
  if (allowed.has("update_opportunity")) {
48
24
  server.tool("update_opportunity", "Update an opportunity's close date, next step, or description. You can identify the deal by Salesforce Opportunity ID or exact opportunity name. Reps can only update their own deals. Requires a reason for the change.", {
49
25
  opportunityId: salesforceOpportunityIdSchema
@@ -1,31 +1,14 @@
1
1
  import { trpcQuery } from "../api-client.js";
2
2
  import { safeTool } from "./_helpers.js";
3
- import { loopNameSchema, rangeSchema, salesforceLeadIdSchema, } from "./_schemas.js";
3
+ import { rangeSchema, salesforceLeadIdSchema, } from "./_schemas.js";
4
4
  export function registerReportingTools(server, allowed) {
5
- if (allowed.has("loop_health")) {
6
- server.tool("loop_health", "Query loop execution health: counts, success rate, latency, errors. Filter by loop name and time range.", {
7
- loop: loopNameSchema
8
- .optional()
9
- .describe("Filter to a specific loop. Omit for all loops."),
10
- range: rangeSchema
11
- .optional()
12
- .describe("Time window. Short ranges (1h, 6h, 24h) are most useful. Default: 24h."),
13
- }, safeTool(async ({ loop, range }) => trpcQuery("mcp.loopHealth", { loop, range })));
14
- }
15
- if (allowed.has("scoring_distribution")) {
16
- server.tool("scoring_distribution", "Analyze lead scoring distribution: score histogram, grade breakdown, average score by factor.", {
17
- range: rangeSchema
18
- .optional()
19
- .describe("Time window. Default: 7d."),
20
- }, safeTool(async ({ range }) => trpcQuery("mcp.scoringDistribution", { range })));
21
- }
22
- if (allowed.has("routing_report")) {
23
- server.tool("routing_report", "Analyze routing decisions: rule match rates, queue distribution, agent fallback percentage.", {
24
- range: rangeSchema
25
- .optional()
26
- .describe("Time window. Default: 7d."),
27
- }, safeTool(async ({ range }) => trpcQuery("mcp.routingReport", { range })));
28
- }
5
+ // loop_health retired 2026-05-06 — replaced by ClickHouse parameterized
6
+ // view analytics.loop_health(range_days). Query via the Cloud Remote MCP
7
+ // server (mcp.clickhouse.cloud/mcp). See docs/CH-ANALYTICS-VIEWS.md.
8
+ // scoring_distribution retired 2026-05-06 — replaced by ClickHouse view
9
+ // analytics.scoring_distribution(range_days). See docs/CH-ANALYTICS-VIEWS.md.
10
+ // routing_report retired 2026-05-06 — replaced by ClickHouse view
11
+ // analytics.routing_report(range_days). See docs/CH-ANALYTICS-VIEWS.md.
29
12
  if (allowed.has("enrichment_coverage")) {
30
13
  server.tool("enrichment_coverage", "Analyze lead enrichment coverage: enrichment rate, top industries, headcount distribution.", {
31
14
  range: rangeSchema
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loopops/mcp-server",
3
- "version": "3.10.0",
3
+ "version": "3.12.0",
4
4
  "description": "Loop Operations MCP Server — AI skills for RevOps",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -20,12 +20,6 @@
20
20
  "publishConfig": {
21
21
  "access": "public"
22
22
  },
23
- "scripts": {
24
- "build": "tsc",
25
- "dev": "tsx src/index.ts",
26
- "start": "node dist/index.js",
27
- "prepublishOnly": "pnpm build"
28
- },
29
23
  "dependencies": {
30
24
  "@modelcontextprotocol/sdk": "^1.12.1",
31
25
  "zod": "^3.24.4"
@@ -34,5 +28,10 @@
34
28
  "@types/node": "^22.15.21",
35
29
  "tsx": "^4.19.4",
36
30
  "typescript": "^5.8.3"
31
+ },
32
+ "scripts": {
33
+ "build": "tsc",
34
+ "dev": "tsx src/index.ts",
35
+ "start": "node dist/index.js"
37
36
  }
38
- }
37
+ }