@elitedcs/ghl-mcp 3.0.3 → 3.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.
Files changed (2) hide show
  1. package/dist/index.js +50 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -31,7 +31,7 @@ var require_package = __commonJS({
31
31
  "package.json"(exports2, module2) {
32
32
  module2.exports = {
33
33
  name: "@elitedcs/ghl-mcp",
34
- version: "3.0.3",
34
+ version: "3.1.0",
35
35
  description: "GoHighLevel MCP Server for Claude. 171 tools \u2014 full CRM, automation, marketing control, and the only programmatic GHL workflow builder.",
36
36
  main: "dist/index.js",
37
37
  bin: {
@@ -460,11 +460,16 @@ var PipelineStageUpdatedTriggerSchema = TriggerCommonSchema.extend({
460
460
  type: import_zod2.z.literal("pipeline_stage_updated"),
461
461
  conditions: import_zod2.z.array(PipelineStageUpdatedTriggerConditionSchema).optional()
462
462
  });
463
- var WorkflowTriggerSchema = import_zod2.z.discriminatedUnion("type", [
463
+ var UnknownTriggerSchema = TriggerCommonSchema.extend({
464
+ type: import_zod2.z.string(),
465
+ conditions: import_zod2.z.array(import_zod2.z.record(import_zod2.z.unknown())).optional()
466
+ });
467
+ var WorkflowTriggerSchema = import_zod2.z.union([
464
468
  CustomerReplyTriggerSchema,
465
469
  AppointmentTriggerSchema,
466
470
  ContactTagTriggerSchema,
467
- PipelineStageUpdatedTriggerSchema
471
+ PipelineStageUpdatedTriggerSchema,
472
+ UnknownTriggerSchema
468
473
  ]);
469
474
  var WorkflowActionSchema = import_zod2.z.custom(
470
475
  (value) => typeof value === "object" && value !== null && "type" in value
@@ -3795,11 +3800,16 @@ var PipelineStageUpdatedTriggerSchema2 = TriggerCommonSchema2.extend({
3795
3800
  id: import_zod30.z.string().optional()
3796
3801
  }).passthrough()).optional()
3797
3802
  });
3798
- var WorkflowTriggerSchema2 = import_zod30.z.discriminatedUnion("type", [
3803
+ var UnknownTriggerSchema2 = TriggerCommonSchema2.extend({
3804
+ type: import_zod30.z.string(),
3805
+ conditions: import_zod30.z.array(import_zod30.z.record(import_zod30.z.unknown())).optional()
3806
+ });
3807
+ var WorkflowTriggerSchema2 = import_zod30.z.union([
3799
3808
  CustomerReplyTriggerSchema2,
3800
3809
  AppointmentTriggerSchema2,
3801
3810
  ContactTagTriggerSchema2,
3802
- PipelineStageUpdatedTriggerSchema2
3811
+ PipelineStageUpdatedTriggerSchema2,
3812
+ UnknownTriggerSchema2
3803
3813
  ]);
3804
3814
  function linkBranchActions(actions, branchId, nextAfterMerge) {
3805
3815
  const prepared = actions.map((action) => ({
@@ -3873,6 +3883,40 @@ function registerWorkflowBuilderTools(server2, client) {
3873
3883
  }
3874
3884
  }
3875
3885
  );
3886
+ server2.tool(
3887
+ "get_trigger_registry",
3888
+ "Return GHL's marketplace catalogue of workflow triggers from 3rd-party apps (Zoom, Shopify, WooCommerce, Monday, etc.). Each app exposes one or more trigger templates with custom variable mappings. Calls /marketplace/core/search/module?type=triggers. NOTE: This is the MARKETPLACE only. GHL's NATIVE trigger types (form_submission, contact_tag, payment_received, opportunity_*, inbound_webhook, etc.) live in the workflow builder frontend bundle, not an API. For the native registry see templates/trigger-schemas.json in this repo.",
3889
+ {
3890
+ companyId: import_zod30.z.string().describe("Company ID for the location. Find it in any get_workflow_full response under the 'companyId' field."),
3891
+ limit: import_zod30.z.number().optional().describe("Max marketplace apps to return. Defaults to 200."),
3892
+ installedOnly: import_zod30.z.boolean().optional().describe("If true, returns only apps installed in this location. Defaults to false (full marketplace catalogue, ~85 apps).")
3893
+ },
3894
+ async ({ companyId, limit, installedOnly }) => {
3895
+ try {
3896
+ const headers = await client.buildHeaders();
3897
+ const params = new URLSearchParams({
3898
+ locationId: client.locationId,
3899
+ companyId,
3900
+ type: "triggers",
3901
+ skip: "0",
3902
+ limit: String(limit ?? 200)
3903
+ });
3904
+ if (installedOnly) {
3905
+ params.set("isInstalled", "true");
3906
+ }
3907
+ const url = `https://backend.leadconnectorhq.com/marketplace/core/search/module?${params.toString()}`;
3908
+ const response = await fetch(url, { headers });
3909
+ if (!response.ok) {
3910
+ const text = await response.text();
3911
+ throw new Error(`Trigger registry API error ${response.status}: ${text}`);
3912
+ }
3913
+ const data = await response.json();
3914
+ return jsonResponse(data);
3915
+ } catch (error) {
3916
+ return errorResponse(error);
3917
+ }
3918
+ }
3919
+ );
3876
3920
  server2.tool(
3877
3921
  "create_workflow",
3878
3922
  "Create a new empty workflow (starts as draft). Requires Firebase auth. Flow: 1) create_workflow \u2192 2) update_workflow_actions (add triggers + steps) \u2192 3) publish_workflow (make it live).",
@@ -3890,7 +3934,7 @@ function registerWorkflowBuilderTools(server2, client) {
3890
3934
  );
3891
3935
  server2.tool(
3892
3936
  "update_workflow_actions",
3893
- "Update a workflow's actions (steps), triggers, name, or status. IMPORTANT: Call get_workflow_full first to see the current state before updating. Handles version tracking automatically. Uses the internal builder API (requires Firebase auth). Action types: sms, email, add_contact_tag, remove_contact_tag, wait, webhook, internal_update_opportunity, custom_code, update_contact_field, add_notes, internal_notification, task_notification, remove_from_workflow, add_to_workflow, goto, transition. For if/else, call build_if_else_branch and include its returned nodes; if_else is a node discriminator, not a standalone action. Trigger types: customer_reply, appointment, contact_tag, pipeline_stage_updated.",
3937
+ "Update a workflow's actions (steps), triggers, name, or status. IMPORTANT: Call get_workflow_full first to see the current state before updating. Handles version tracking automatically. Uses the internal builder API (requires Firebase auth). Action types: sms, email, add_contact_tag, remove_contact_tag, wait, webhook, internal_update_opportunity, custom_code, update_contact_field, add_notes, internal_notification, task_notification, remove_from_workflow, add_to_workflow, goto, transition. For if/else, call build_if_else_branch and include its returned nodes; if_else is a node discriminator, not a standalone action. Trigger types: customer_reply, appointment, contact_tag, and pipeline_stage_updated have typed validation. Any other GHL trigger type (form_submitted, opportunity_created, payment_received, inbound_webhook, etc.) passes through with a permissive schema \u2014 the payload reaches GHL untouched.",
3894
3938
  {
3895
3939
  workflowId: import_zod30.z.string().describe("The workflow ID to update."),
3896
3940
  name: import_zod30.z.string().optional().describe("New workflow name."),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elitedcs/ghl-mcp",
3
- "version": "3.0.3",
3
+ "version": "3.1.0",
4
4
  "description": "GoHighLevel MCP Server for Claude. 171 tools — full CRM, automation, marketing control, and the only programmatic GHL workflow builder.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {