@loopops/mcp-server 2.0.3 → 2.1.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.
@@ -107,6 +107,50 @@ export function registerConfigTools(server, allowed) {
107
107
  branch,
108
108
  })));
109
109
  }
110
+ if (allowed.has("compare_scenarios")) {
111
+ server.tool("compare_scenarios", "Run the Plan capacity model for two scenarios and render a side-by-side comparison per measure. For each (territory × measure) cell, shows A vs B capacity, target, gap, and the delta (B−A). Use when evaluating a stretch / conservative / hiring-delay scenario against `base` before deciding whether to promote. No writes — neither scenario's `active` status changes.", {
112
+ scenarioA: z
113
+ .string()
114
+ .describe("First scenario id (e.g. 'base'). Must exist in config/plan/scenarios/ and be complete."),
115
+ scenarioB: z
116
+ .string()
117
+ .describe("Second scenario id to compare against A (e.g. 'stretch'). Must exist and be complete."),
118
+ planYear: z
119
+ .number()
120
+ .int()
121
+ .optional()
122
+ .describe("Override the configured plan year for both runs. Defaults to capacity_config.planning.plan_year."),
123
+ measureIds: z
124
+ .array(z.string())
125
+ .optional()
126
+ .describe("Filter both reports to a subset of measures. Default: all target_settable measures."),
127
+ branch: z
128
+ .string()
129
+ .optional()
130
+ .describe("Git branch to read configs from. Default: main."),
131
+ }, safeTool(async ({ scenarioA, scenarioB, planYear, measureIds, branch }) => trpcMutation("mcp.compareScenarios", {
132
+ scenarioA,
133
+ scenarioB,
134
+ planYear,
135
+ measureIds,
136
+ branch,
137
+ })));
138
+ }
139
+ if (allowed.has("promote_scenario")) {
140
+ server.tool("promote_scenario", "Promote a scenario to active by editing `active_scenario` in config/plan/capacity_config.yaml. Fails hard if the scenario doesn't resolve (missing or dangling components) — won't promote a broken plan. Dry-run by default — returns the diff; pass dryRun:false to commit the change.", {
141
+ scenarioId: z
142
+ .string()
143
+ .describe("Scenario id to promote (e.g. 'stretch'). Must exist in config/plan/scenarios/ and be complete."),
144
+ dryRun: z
145
+ .boolean()
146
+ .default(true)
147
+ .describe("When true (default), return the diff without writing. Pass dryRun:false to commit."),
148
+ branch: z
149
+ .string()
150
+ .optional()
151
+ .describe("Git branch to read from and write back to. Default: main. Writing to main = live promotion."),
152
+ }, safeTool(async ({ scenarioId, dryRun, branch }) => trpcMutation("mcp.promoteScenario", { scenarioId, dryRun, branch })));
153
+ }
110
154
  if (allowed.has("preview_routing")) {
111
155
  server.tool("preview_routing", "Simulate Route loop resolution for a hypothetical lead. Walks config/route/rules.yaml, dispatches to territory/pool/queue/user/target_account handler, and returns the resolved owner + audit trail. Useful for testing rule changes before merging. Requires at least billing geography or email.", {
112
156
  email: z.string().optional().describe("Lead email — also extracts the domain for target_account lookup."),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loopops/mcp-server",
3
- "version": "2.0.3",
3
+ "version": "2.1.0",
4
4
  "description": "Loop Operations MCP Server — AI skills for RevOps",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",