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

ghl-mcp-server-v2

by zackscriven

ghl_ad_fb_campaign_upsert

Idempotent

Create or update a Facebook ad campaign for a GoHighLevel location, setting budget, objective, bid strategy, and special ad categories through the ad publishing API.

Instructions

Upsert campaign Create or update a Facebook campaign Endpoint: PUT /ad-publishing/facebook/campaigns (Version header: v3; source: v3/ad-publishing-v3.json) OAuth scopes: adPublishing.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": {
      "body": "<body>"
    },
    "name": "ghl_ad_fb_campaign_upsert"
  }
}

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv2.1.0
    • addedInput schema / properties / body / properties / adsetBudgetSharing
      Added value: +{
      +  "description": "Ad set budget sharing: Meta may move up to 20% of an ad set budget to sibling ad sets. Mutually exclusive with isCampaignBudget.",
      +  "example": false,
      +  "type": "boolean"
      +}
    • addedInput schema / properties / body / properties / bidAmount
      Added value: +{
      +  "description": "Default bid cap / cost-per-result goal in account currency for every ad set; an ad set's own bidAmount wins. Only with isCampaignBudget or adsetBudgetSharing.",
      +  "example": 2.5,
      +  "type": "number"
      +}
    • addedInput schema / properties / body / properties / bidStrategy
      Added value: +{
      +  "description": "Campaign-level bid strategy. Only with isCampaignBudget.",
      +  "enum": [
      +    "LOWEST_COST_WITHOUT_CAP",
      +    "LOWEST_COST_WITH_BID_CAP",
      +    "COST_CAP"
      +  ],
      +  "example": "LOWEST_COST_WITHOUT_CAP",
      +  "type": "string"
      +}
    • addedInput schema / properties / body / properties / budget
      Added value: +{
      +  "allOf": [
      +    {
      +      "properties": {
      +        "amount": {
      +          "description": "Budget amount in account currency, greater than zero",
      +          "example": 1000,
      +          "type": "number"
      +        },
      +        "budgetType": {
      +          "description": "Budget type",
      +          "enum": [
      +            "DAILY",
      +            "LIFETIME"
      +          ],
      +          "example": "DAILY",
      +          "type": "string"
      +        },
      +        "scheduleEndDate": {
      +          "description": "Schedule end date",
      +          "example": "2024-01-31",
      +          "type": "string"
      +        },
      +        "scheduleStartDate": {
      +          "description": "Schedule start date",
      +          "example": "2024-01-01",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "budgetType",
      +        "amount"
      +      ],
      +      "title": "Budget",
      +      "type": "object"
      +    }
      +  ],
      +  "description": "Campaign-level budget (Advantage campaign budget). Requires isCampaignBudget.",
      +  "example": {
      +    "amount": 1000,
      +    "budgetType": "DAILY"
      +  }
      +}
    • addedInput schema / properties / body / properties / customValueMappings
      Added value: +{
      +  "description": "User-provided overrides for custom_values merge tags used in ad copy",
      +  "example": {
      +    "{{ custom_values.pet_name }}": "Fluffy"
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / body / properties / isCampaignBudget
      Added value: +{
      +  "description": "Advantage campaign budget. When true the campaign carries `budget` and `bidStrategy`, and ad sets carry no budget of their own.",
      +  "example": false,
      +  "type": "boolean"
      +}
    • changedInput schema / properties / body / properties / objective / example
      Previous value: -"LEAD_GENERATION"New value: +"OUTCOME_LEADS"
    • addedInput schema / properties / body / title
      Added value: +"UpsertCampaignDTO"
  2. First observedv2.0.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, openWorldHint=true, and destructiveHint=false, so safety is largely covered. The description adds genuinely useful context beyond annotations — the required adPublishing.write scope and the API version header — but never explains upsert behavior itself (what identifying key causes an update vs. a create, or what happens to fields omitted on update).

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?

Four short lines, purpose front-loaded first, with no filler. The title line 'Upsert campaign' is redundant with the following sentence, and the 'source: v3/ad-publishing-v3.json' provenance is of marginal use to an agent, but nothing is padded.

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

Completeness3/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 deep nested body, the description defers almost entirely to the schema and annotations, which is acceptable given 100% param coverage and existing hints. The gap is that the defining trait of an upsert — how the optional `id` field switches between create and update, and whether omitted fields are cleared — is never addressed.

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 single body parameter, including its nested budget/bidding fields and mutual-exclusion notes, is fully documented in the schema. The description adds nothing about parameters, 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 names a specific verb and resource ('Create or update a Facebook campaign') and the endpoint makes clear it is the Facebook campaign write surface, distinguishing it from ghl_ad_fb_campaign_publish, _duplicate, _pause, and _get. It stops short of explicitly contrasting with those siblings, but the purpose is unambiguous.

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

Usage Guidelines3/5

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

'Upsert' plus 'Create or update' implies the create-or-modify usage, but there is no statement of when to prefer this over the dedicated publish/duplicate/pause siblings, nor any precondition such as needing an existing campaign id to update. The only explicit constraint offered is the OAuth scope 'adPublishing.write'.

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