@elitedcs/ghl-mcp 3.34.10 → 3.35.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/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.35.0 — `create_social_post` is now draft-first (closes the silent "everything published at once" trap)
4
+
5
+ **Behavior change.** `create_social_post` no longer defers go-live to GoHighLevel's
6
+ server-side default. Before, when `status` was omitted the field was dropped from the
7
+ request and GHL decided whether the post went live — an undocumented default that, in
8
+ a loop, is exactly the "all posts fired at once, no error, no warning" failure operators
9
+ hit. The most expensive failures are the silent ones, so the tool now takes a defensive
10
+ stance by default.
11
+
12
+ - **Draft-first default.** Omit `status` and the post is created as a `draft` (editable,
13
+ never live). Going live is now an explicit choice (`status:"published"`).
14
+ - **Scheduling is coupled to status.** Pass `scheduledAt` with no `status` and it
15
+ auto-resolves to `"scheduled"`. Pass `scheduledAt` alongside any *other* status, or
16
+ `status:"scheduled"` with no `scheduledAt`, and the call is rejected with an actionable
17
+ error instead of silently publishing now or falling back to the server default. This
18
+ kills the "I thought it was scheduled" class of failure (CHANGELOG 3.18.0 always
19
+ required both fields; nothing enforced the pairing until now).
20
+ - Logic extracted to the pure, tested `resolvePostStatus(status, scheduledAt)` helper;
21
+ tool and field descriptions updated to document the contract. 5 regression tests added.
22
+ - **Migration:** any caller that relied on an un-statused post going live must now pass
23
+ `status:"published"` explicitly. No other tool is affected.
24
+
3
25
  ## 3.34.10 — `get_free_slots` accepts ISO dates; `update_form` name fallback for fresh forms
4
26
 
5
27
  Two small fixes that close rough edges found while live-verifying v3.34.9 through
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.34.10",
34
+ version: "3.35.0",
35
35
  mcpName: "io.github.drjerryrelth/ghl-command",
36
36
  description: "GoHighLevel MCP Server for Claude. 218 tools \u2014 full CRM, automation, marketing control, account-wide workflow audit, and the only programmatic GHL workflow builder, now multi-tenant across client accounts.",
37
37
  main: "dist/index.js",
@@ -4054,6 +4054,21 @@ function registerMediaTools(server2, client) {
4054
4054
 
4055
4055
  // src/tools/social-planner.ts
4056
4056
  var import_zod21 = require("zod");
4057
+ function resolvePostStatus(status, scheduledAt) {
4058
+ if (scheduledAt !== void 0 && status !== void 0 && status !== "scheduled") {
4059
+ throw new Error(
4060
+ `create_social_post: scheduledAt was provided but status is "${status}". A scheduled post requires status:"scheduled" (or omit status to auto-schedule).`
4061
+ );
4062
+ }
4063
+ if (status === "scheduled" && scheduledAt === void 0) {
4064
+ throw new Error(
4065
+ 'create_social_post: status:"scheduled" requires scheduledAt (an ISO publish time).'
4066
+ );
4067
+ }
4068
+ if (status !== void 0) return status;
4069
+ if (scheduledAt !== void 0) return "scheduled";
4070
+ return "draft";
4071
+ }
4057
4072
  function registerSocialPlannerTools(server2, client) {
4058
4073
  safeTool(
4059
4074
  server2,
@@ -4125,7 +4140,7 @@ function registerSocialPlannerTools(server2, client) {
4125
4140
  safeTool(
4126
4141
  server2,
4127
4142
  "create_social_post",
4128
- "Create a new social media post",
4143
+ 'Create a social media post. Defaults to a draft (never publishes live) unless you pass status explicitly. To schedule, pass scheduledAt and the status auto-resolves to "scheduled". To post immediately, pass status:"published".',
4129
4144
  {
4130
4145
  locationId: import_zod21.z.string().optional().describe("GHL Location ID (optional if GHL_LOCATION_ID is set)"),
4131
4146
  accountIds: import_zod21.z.array(import_zod21.z.string()).describe("Array of social account IDs to post to"),
@@ -4133,8 +4148,12 @@ function registerSocialPlannerTools(server2, client) {
4133
4148
  summary: import_zod21.z.string().optional().describe("The post text/caption"),
4134
4149
  media: import_zod21.z.array(import_zod21.z.string()).optional().describe("Array of media URLs to attach"),
4135
4150
  type: import_zod21.z.enum(["post", "story", "reel"]).optional().describe("Post type (default post)"),
4136
- status: import_zod21.z.enum(["in_review", "scheduled", "draft", "published"]).optional().describe("Post status"),
4137
- scheduledAt: import_zod21.z.string().optional().describe("Scheduled publish time (ISO string)"),
4151
+ status: import_zod21.z.enum(["in_review", "scheduled", "draft", "published"]).optional().describe(
4152
+ 'Post status. Omit to default to "draft" (safe \u2014 never goes live). Use "published" to post immediately, "scheduled" (with scheduledAt) to schedule, or "in_review" for an approval queue.'
4153
+ ),
4154
+ scheduledAt: import_zod21.z.string().optional().describe(
4155
+ 'Scheduled publish time (ISO string). When set, status auto-resolves to "scheduled" if you omit it; passing any other status alongside scheduledAt is rejected.'
4156
+ ),
4138
4157
  tags: import_zod21.z.array(import_zod21.z.string()).optional().describe("Tags for the post"),
4139
4158
  ogData: import_zod21.z.object({
4140
4159
  title: import_zod21.z.string().optional(),
@@ -4172,7 +4191,7 @@ function registerSocialPlannerTools(server2, client) {
4172
4191
  };
4173
4192
  body.media = media.map((url) => ({ url, type: mimeFor(url) }));
4174
4193
  }
4175
- if (status !== void 0) body.status = status;
4194
+ body.status = resolvePostStatus(status, scheduledAt);
4176
4195
  if (scheduledAt !== void 0) body.scheduleDate = scheduledAt;
4177
4196
  if (tags !== void 0) body.tags = tags;
4178
4197
  if (ogData !== void 0) body.ogData = ogData;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elitedcs/ghl-mcp",
3
- "version": "3.34.10",
3
+ "version": "3.35.0",
4
4
  "mcpName": "io.github.drjerryrelth/ghl-command",
5
5
  "description": "GoHighLevel MCP Server for Claude. 218 tools — full CRM, automation, marketing control, account-wide workflow audit, and the only programmatic GHL workflow builder, now multi-tenant across client accounts.",
6
6
  "main": "dist/index.js",