Skip to main content
Glama
ghl-mcp-server-v2

ghl-mcp-server-v2

by zackscriven

ghl_email_schedule_campaign

Schedule or start an existing draft, cancelled, or paused email campaign by defining send type, recipients, timing, and tracking options.

Instructions

Schedule Campaign Schedule or start an email campaign. The campaign must be in draft, cancelled, or paused status. Endpoint: POST /emails/locations/{locationId}/campaigns/emails/{campaignId}/schedule (Version header: v3; source: v3/emails-v3.json) Requires a Sub-Account (location) token. OAuth scopes: emails/campaigns.write

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "locationId": "<locationId>",
      "campaignId": "<campaignId>",
      "body": "<body>"
    },
    "name": "ghl_email_schedule_campaign"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesRequest body (schema carried verbatim from the official OpenAPI spec).
campaignIdYesCampaign ID
locationIdYesLocation ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv2.1.0
    • changedInput schema / properties / body / properties / abTestConfig / allOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "testDuration": {
      -        "description": "Seconds to run the test before picking a winner",
      -        "example": 3600,
      -        "type": "number"
      -      },
      -      "testSize": {
      -        "description": "Percentage of contacts in the test group (0-100)",
      -        "example": 30,
      -        "type": "number"
      -      },
      -      "testType": {
      -        "description": "What is being tested",
      -        "enum": [
      -          "emailContent",
      -          "subjectLine"
      -        ],
      -        "example": "subjectLine",
      -        "type": "string"
      -      },
      -      "variationCount": {
      -        "description": "Number of variations",
      -        "example": 2,
      -        "type": "number"
      -      },
      -      "variations": {
      -        "description": "A/B test variations",
      -        "example": [
      -          {
      -            "subject": "Subject A"
      -          },
      -          {
      -            "subject": "Subject B"
      -          }
      -        ],
      -        "items": {
      -          "properties": {
      -            "documentId": {
      -              "description": "Template/document ID for this variation",
      -              "example": "507f1f77bcf86cd799439011",
      -              "type": "string"
      -            },
      -            "subject": {
      -              "description": "Subject line for this variation",
      -              "example": "Subject A",
      -              "type": "string"
      -            }
      -          },
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "winningCriteria": {
      -        "description": "How to pick the winner",
      -        "enum": [
      -          "openRate",
      -          "clickRate"
      -        ],
      -        "example": "openRate",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "testType",
      -      "testDuration",
      -      "variationCount",
      -      "testSize",
      -      "winningCriteria",
      -      "variations"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "testDuration": {
      +        "description": "Seconds to run the test before picking a winner",
      +        "example": 3600,
      +        "type": "number"
      +      },
      +      "testSize": {
      +        "description": "Percentage of contacts in the test group (0-100)",
      +        "example": 30,
      +        "type": "number"
      +      },
      +      "testType": {
      +        "description": "What is being tested",
      +        "enum": [
      +          "emailContent",
      +          "subjectLine"
      +        ],
      +        "example": "subjectLine",
      +        "type": "string"
      +      },
      +      "variationCount": {
      +        "description": "Number of variations",
      +        "example": 2,
      +        "type": "number"
      +      },
      +      "variations": {
      +        "description": "A/B test variations",
      +        "example": [
      +          {
      +            "subject": "Subject A"
      +          },
      +          {
      +            "subject": "Subject B"
      +          }
      +        ],
      +        "items": {
      +          "properties": {
      +            "documentId": {
      +              "description": "Template/document ID for this variation",
      +              "example": "507f1f77bcf86cd799439011",
      +              "type": "string"
      +            },
      +            "subject": {
      +              "description": "Subject line for this variation",
      +              "example": "Subject A",
      +              "type": "string"
      +            }
      +          },
      +          "title": "ScheduleCampaignABTestVariationPublicV2Dto",
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "winningCriteria": {
      +        "description": "How to pick the winner",
      +        "enum": [
      +          "openRate",
      +          "clickRate"
      +        ],
      +        "example": "openRate",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "testType",
      +      "testDuration",
      +      "variationCount",
      +      "testSize",
      +      "winningCriteria",
      +      "variations"
      +    ],
      +    "title": "ScheduleCampaignABTestConfigPublicV2Dto",
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / body / properties / emailMeta / allOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "attachments": {
      -        "description": "Attachment download URLs",
      -        "example": [
      -          "https://example.com/file.pdf"
      -        ],
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "fromEmail": {
      -        "description": "Sender email address",
      -        "example": "john@example.com",
      -        "type": "string"
      -      },
      -      "fromName": {
      -        "description": "Sender display name",
      -        "example": "John Doe",
      -        "type": "string"
      -      },
      -      "previewText": {
      -        "description": "Preview text shown in inbox after subject",
      -        "example": "Check out our latest news",
      -        "type": "string"
      -      },
      -      "replyToAddress": {
      -        "description": "Reply-to email address",
      -        "example": "reply@example.com",
      -        "type": "string"
      -      },
      -      "subject": {
      -        "description": "Email subject line",
      -        "example": "Our February Newsletter",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "subject",
      -      "fromName",
      -      "fromEmail"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "attachments": {
      +        "description": "Attachment download URLs",
      +        "example": [
      +          "https://example.com/file.pdf"
      +        ],
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "fromEmail": {
      +        "description": "Sender email address",
      +        "example": "john@example.com",
      +        "type": "string"
      +      },
      +      "fromName": {
      +        "description": "Sender display name",
      +        "example": "John Doe",
      +        "type": "string"
      +      },
      +      "previewText": {
      +        "description": "Preview text shown in inbox after subject",
      +        "example": "Check out our latest news",
      +        "type": "string"
      +      },
      +      "replyToAddress": {
      +        "description": "Reply-to email address",
      +        "example": "reply@example.com",
      +        "type": "string"
      +      },
      +      "subject": {
      +        "description": "Email subject line",
      +        "example": "Our February Newsletter",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "subject",
      +      "fromName",
      +      "fromEmail"
      +    ],
      +    "title": "ScheduleCampaignEmailMetaPublicV2Dto",
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / body / properties / recipients / allOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "contactIds": {
      -        "description": "Contact IDs to send to. Required when type is contact.",
      -        "example": [
      -          "contactId1",
      -          "contactId2"
      -        ],
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "freezeList": {
      -        "default": true,
      -        "description": "Freeze the contact list at schedule time — new matching contacts will not be added later",
      -        "example": true,
      -        "type": "boolean"
      -      },
      -      "segment": {
      -        "description": "Segment type for pre-built segments. Required when type is segment.",
      -        "enum": [
      -          "engaged_last_7_days",
      -          "engaged_last_30_days",
      -          "engaged_last_60_days",
      -          "engaged_last_5_campaigns",
      -          "unengaged_last_5_campaigns"
      -        ],
      -        "example": "engaged_last_7_days",
      -        "type": "string"
      -      },
      -      "tagIds": {
      -        "description": "Tag IDs to filter recipients by. Required when type is tag.",
      -        "example": [
      -          "tagId1",
      -          "tagId2"
      -        ],
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "type": {
      -        "description": "Recipient selection type",
      -        "enum": [
      -          "contact",
      -          "tag",
      -          "segment"
      -        ],
      -        "example": "contact",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "contactIds": {
      +        "description": "Contact IDs to send to. Required when type is contact.",
      +        "example": [
      +          "contactId1",
      +          "contactId2"
      +        ],
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "freezeList": {
      +        "default": true,
      +        "description": "Freeze the contact list at schedule time — new matching contacts will not be added later",
      +        "example": true,
      +        "type": "boolean"
      +      },
      +      "segment": {
      +        "description": "Segment type for pre-built segments. Required when type is segment.",
      +        "enum": [
      +          "engaged_last_7_days",
      +          "engaged_last_30_days",
      +          "engaged_last_60_days",
      +          "engaged_last_5_campaigns",
      +          "unengaged_last_5_campaigns"
      +        ],
      +        "example": "engaged_last_7_days",
      +        "type": "string"
      +      },
      +      "tagIds": {
      +        "description": "Tag IDs to filter recipients by. Required when type is tag.",
      +        "example": [
      +          "tagId1",
      +          "tagId2"
      +        ],
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "type": {
      +        "description": "Recipient selection type",
      +        "enum": [
      +          "contact",
      +          "tag",
      +          "segment"
      +        ],
      +        "example": "contact",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type"
      +    ],
      +    "title": "ScheduleCampaignRecipientsPublicV2Dto",
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / body / properties / rssConfig / allOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "firstExecutionDate": {
      -        "description": "Override first execution date/time",
      -        "example": "2026-04-01 10:00:00",
      -        "type": "string"
      -      },
      -      "name": {
      -        "description": "RSS schedule name",
      -        "example": "Weekly Digest",
      -        "type": "string"
      -      },
      -      "repeatAfter": {
      -        "description": "How often to check the feed",
      -        "enum": [
      -          "every_day",
      -          "every_week",
      -          "every_month"
      -        ],
      -        "example": "every_day",
      -        "type": "string"
      -      },
      -      "repeatAfterTime": {
      -        "description": "Time of day to execute",
      -        "example": "09:00 AM",
      -        "type": "string"
      -      },
      -      "rssFeedLimit": {
      -        "description": "Max number of RSS items per email",
      -        "example": 10,
      -        "type": "number"
      -      },
      -      "rssFeedURL": {
      -        "description": "RSS feed URL",
      -        "example": "https://example.com/rss",
      -        "type": "string"
      -      },
      -      "startAtDay": {
      -        "description": "Day of week for weekly RSS",
      -        "enum": [
      -          "Monday",
      -          "Tuesday",
      -          "Wednesday",
      -          "Thursday",
      -          "Friday",
      -          "Saturday",
      -          "Sunday"
      -        ],
      -        "example": "Monday",
      -        "type": "string"
      -      },
      -      "startAtMonthDay": {
      -        "description": "Day of month for monthly RSS",
      -        "example": "15",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "name",
      -      "rssFeedURL",
      -      "repeatAfter",
      -      "repeatAfterTime"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "firstExecutionDate": {
      +        "description": "Override first execution date/time",
      +        "example": "2026-04-01 10:00:00",
      +        "type": "string"
      +      },
      +      "name": {
      +        "description": "RSS schedule name",
      +        "example": "Weekly Digest",
      +        "type": "string"
      +      },
      +      "repeatAfter": {
      +        "description": "How often to check the feed",
      +        "enum": [
      +          "every_day",
      +          "every_week",
      +          "every_month"
      +        ],
      +        "example": "every_day",
      +        "type": "string"
      +      },
      +      "repeatAfterTime": {
      +        "description": "Time of day to execute",
      +        "example": "09:00 AM",
      +        "type": "string"
      +      },
      +      "rssFeedLimit": {
      +        "description": "Max number of RSS items per email",
      +        "example": 10,
      +        "type": "number"
      +      },
      +      "rssFeedURL": {
      +        "description": "RSS feed URL",
      +        "example": "https://example.com/rss",
      +        "type": "string"
      +      },
      +      "startAtDay": {
      +        "description": "Day of week for weekly RSS",
      +        "enum": [
      +          "Monday",
      +          "Tuesday",
      +          "Wednesday",
      +          "Thursday",
      +          "Friday",
      +          "Saturday",
      +          "Sunday"
      +        ],
      +        "example": "Monday",
      +        "type": "string"
      +      },
      +      "startAtMonthDay": {
      +        "description": "Day of month for monthly RSS",
      +        "example": "15",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "rssFeedURL",
      +      "repeatAfter",
      +      "repeatAfterTime"
      +    ],
      +    "title": "ScheduleCampaignRssConfigPublicV2Dto",
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / body / properties / scheduleConfig / allOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "batch": {
      -        "allOf": [
      -          {
      -            "properties": {
      -              "batchSize": {
      -                "description": "Number of contacts to process per batch",
      -                "example": 100,
      -                "type": "number"
      -              },
      -              "interval": {
      -                "description": "Delay between batches",
      -                "example": 2,
      -                "type": "number"
      -              },
      -              "intervalUnit": {
      -                "description": "Unit for the interval",
      -                "enum": [
      -                  "minutes",
      -                  "hours",
      -                  "days"
      -                ],
      -                "example": "hours",
      -                "type": "string"
      -              },
      -              "skipDays": {
      -                "description": "Days to skip sending",
      -                "example": [
      -                  "Sat",
      -                  "Sun"
      -                ],
      -                "items": {
      -                  "enum": [
      -                    "Mon",
      -                    "Tue",
      -                    "Wed",
      -                    "Thu",
      -                    "Fri",
      -                    "Sat",
      -                    "Sun"
      -                  ],
      -                  "type": "string"
      -                },
      -                "type": "array"
      -              },
      -              "windowEnd": {
      -                "description": "Latest time to send batches",
      -                "example": "05:00 PM",
      -                "type": "string"
      -              },
      -              "windowStart": {
      -                "description": "Earliest time to send batches",
      -                "example": "09:00 AM",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "batchSize",
      -              "interval",
      -              "intervalUnit"
      -            ],
      -            "type": "object"
      -          }
      -        ],
      -        "description": "Batch/drip configuration. Required when scheduleType is batch. Ignored otherwise.",
      -        "example": {
      -          "batchSize": 100,
      -          "interval": 2,
      -          "intervalUnit": "hours"
      -        }
      -      },
      -      "emailPreferenceId": {
      -        "description": "Email preference type ID for categorizing this campaign",
      -        "example": "preference-type-id",
      -        "type": "string"
      -      },
      -      "resend": {
      -        "allOf": [
      -          {
      -            "properties": {
      -              "enabled": {
      -                "description": "Enable resend to contacts who did not open",
      -                "example": false,
      -                "type": "boolean"
      -              },
      -              "subject": {
      -                "description": "Override subject line for the resend email",
      -                "example": "Did you miss this?",
      -                "type": "string"
      -              },
      -              "waitHours": {
      -                "description": "Hours to wait before resending. Required when enabled is true.",
      -                "example": 12,
      -                "type": "number"
      -              }
      -            },
      -            "type": "object"
      -          }
      -        ],
      -        "description": "Auto-resend to contacts who did not open",
      -        "example": {
      -          "enabled": false
      -        }
      -      },
      -      "sendAt": {
      -        "description": "Date/time to send. Required for scheduled, batch, and smart_send. Ignored for immediate.",
      -        "example": "2026-04-01 09:00 AM",
      -        "type": "string"
      -      },
      -      "tracking": {
      -        "allOf": [
      -          {
      -            "properties": {
      -              "clickTracking": {
      -                "description": "Enable click tracking on links",
      -                "example": true,
      -                "type": "boolean"
      -              },
      -              "utmTracking": {
      -                "description": "Enable UTM parameters on links",
      -                "example": false,
      -                "type": "boolean"
      -              }
      -            },
      -            "type": "object"
      -          }
      -        ],
      -        "description": "Click and UTM tracking options",
      -        "example": {
      -          "clickTracking": true,
      -          "utmTracking": false
      -        }
      -      }
      -    },
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "batch": {
      +        "allOf": [
      +          {
      +            "properties": {
      +              "batchSize": {
      +                "description": "Number of contacts to process per batch",
      +                "example": 100,
      +                "type": "number"
      +              },
      +              "interval": {
      +                "description": "Delay between batches",
      +                "example": 2,
      +                "type": "number"
      +              },
      +              "intervalUnit": {
      +                "description": "Unit for the interval",
      +                "enum": [
      +                  "minutes",
      +                  "hours",
      +                  "days"
      +                ],
      +                "example": "hours",
      +                "type": "string"
      +              },
      +              "skipDays": {
      +                "description": "Days to skip sending",
      +                "example": [
      +                  "Sat",
      +                  "Sun"
      +                ],
      +                "items": {
      +                  "enum": [
      +                    "Mon",
      +                    "Tue",
      +                    "Wed",
      +                    "Thu",
      +                    "Fri",
      +                    "Sat",
      +                    "Sun"
      +                  ],
      +                  "type": "string"
      +                },
      +                "type": "array"
      +              },
      +              "windowEnd": {
      +                "description": "Latest time to send batches",
      +                "example": "05:00 PM",
      +                "type": "string"
      +              },
      +              "windowStart": {
      +                "description": "Earliest time to send batches",
      +                "example": "09:00 AM",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "batchSize",
      +              "interval",
      +              "intervalUnit"
      +            ],
      +            "title": "ScheduleCampaignBatchConfigPublicV2Dto",
      +            "type": "object"
      +          }
      +        ],
      +        "description": "Batch/drip configuration. Required when scheduleType is batch. Ignored otherwise.",
      +        "example": {
      +          "batchSize": 100,
      +          "interval": 2,
      +          "intervalUnit": "hours"
      +        }
      +      },
      +      "emailPreferenceId": {
      +        "description": "Email preference type ID for categorizing this campaign",
      +        "example": "preference-type-id",
      +        "type": "string"
      +      },
      +      "resend": {
      +        "allOf": [
      +          {
      +            "properties": {
      +              "enabled": {
      +                "description": "Enable resend to contacts who did not open",
      +                "example": false,
      +                "type": "boolean"
      +              },
      +              "subject": {
      +                "description": "Override subject line for the resend email",
      +                "example": "Did you miss this?",
      +                "type": "string"
      +              },
      +              "waitHours": {
      +                "description": "Hours to wait before resending. Required when enabled is true.",
      +                "example": 12,
      +                "type": "number"
      +              }
      +            },
      +            "title": "ScheduleCampaignResendPublicV2Dto",
      +            "type": "object"
      +          }
      +        ],
      +        "description": "Auto-resend to contacts who did not open",
      +        "example": {
      +          "enabled": false
      +        }
      +      },
      +      "sendAt": {
      +        "description": "Date/time to send. Required for scheduled, batch, and smart_send. Ignored for immediate.",
      +        "example": "2026-04-01 09:00 AM",
      +        "type": "string"
      +      },
      +      "tracking": {
      +        "allOf": [
      +          {
      +            "properties": {
      +              "clickTracking": {
      +                "description": "Enable click tracking on links",
      +                "example": true,
      +                "type": "boolean"
      +              },
      +              "utmTracking": {
      +                "description": "Enable UTM parameters on links",
      +                "example": false,
      +                "type": "boolean"
      +              }
      +            },
      +            "title": "ScheduleCampaignTrackingPublicV2Dto",
      +            "type": "object"
      +          }
      +        ],
      +        "description": "Click and UTM tracking options",
      +        "example": {
      +          "clickTracking": true,
      +          "utmTracking": false
      +        }
      +      }
      +    },
      +    "title": "ScheduleCampaignScheduleConfigPublicV2Dto",
      +    "type": "object"
      +  }
      +]
    • addedInput schema / properties / body / title
      Added value: +"ScheduleCampaignPublicV2BodyDto"
  2. First observedv2.0.0

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=false and destructiveHint=false, so the safety frame is given. The description adds genuinely useful context beyond them: a Sub-Account (location) token is required, the OAuth scope is emails/campaigns.write, and the campaign status gate. It does not state that 'immediate' scheduleType will actually dispatch email, nor what happens to an already-sent campaign — the highest-risk behavior for a non-idempotent tool is left implicit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The action and its precondition are front-loaded in the first two lines, with auth/scope metadata after. The endpoint, version header, and source-file line are somewhat noisy but plausibly useful for an API-driving agent.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with a deeply nested body, no output schema, and full schema description, the description covers the essentials: what it does, the required state, auth, and scope. The main remaining gap is the consequence of each scheduleType, which the agent must infer from the schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the nested body documents conditional requirements (rssConfig for rss, scheduleConfig for non-rss, batch sendAt) itself. The description adds nothing about the three top-level parameters or the scheduleType semantics, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb+resource ('Schedule or start an email campaign') and pins it to a concrete endpoint, so it is distinguishable from ghl_email_create_campaign / ghl_email_update_campaign at a glance. It stops short of explicitly naming those siblings as alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a real precondition — the campaign must be in draft, cancelled, or paused status — which tells the agent when this call will succeed. It offers no exclusions or explicit sibling routing, so it falls short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools