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

ghl-mcp-server-v2

by zackscriven

ghl_ad_fb_page_lead_form_create

Creates or drafts a Facebook page lead generation form, then publishes it to Meta with questions, privacy policy, and thank-you page settings.

Instructions

Create page lead form Create a lead gen form. With isDraft: true the form is stored locally and returned as a draft; without it the form is published to Facebook and the Meta record is returned. The two responses share almost no fields. Publishing enforces at least one question and a complete thankYouPage (title, body, buttonText) where a draft save enforces neither. Pass draftFormId when publishing an existing draft to have it deleted afterwards — either the bare id or the draft_-prefixed form is accepted, and cleanup failures are logged rather than surfaced. Endpoint: POST /ad-publishing/facebook/page/{pageId}/forms (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": {
      "pageId": "<pageId>",
      "body": "<body>"
    },
    "name": "ghl_ad_fb_page_lead_form_create"
  }
}

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv2.1.0
    • changedInput schema / properties / body / properties / customDisclaimer / allOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "body": {
      -        "description": "Disclaimer body text",
      -        "example": "By submitting...",
      -        "type": "string"
      -      },
      -      "checkboxes": {
      -        "description": "Consent checkboxes the user must agree to before submitting the form",
      -        "example": [
      -          {
      -            "isRequired": true,
      -            "key": "terms_checkbox",
      -            "text": "I agree to the Terms & Conditions"
      -          },
      -          {
      -            "isRequired": false,
      -            "key": "marketing_optin",
      -            "text": "I would like to receive marketing emails"
      -          }
      -        ],
      -        "items": {
      -          "properties": {
      -            "isRequired": {
      -              "description": "Checkbox required flag",
      -              "example": true,
      -              "type": "boolean"
      -            },
      -            "key": {
      -              "description": "Checkbox unique key",
      -              "example": "terms_checkbox",
      -              "type": "string"
      -            },
      -            "text": {
      -              "description": "Checkbox text label",
      -              "example": "I agree to terms",
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "isRequired",
      -            "text",
      -            "key"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "title": {
      -        "description": "Disclaimer title",
      -        "example": "Terms & Conditions",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "title",
      -      "body"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "body": {
      +        "description": "Disclaimer body text",
      +        "example": "By submitting...",
      +        "type": "string"
      +      },
      +      "checkboxes": {
      +        "description": "Consent checkboxes the user must agree to before submitting the form",
      +        "example": [
      +          {
      +            "isRequired": true,
      +            "key": "terms_checkbox",
      +            "text": "I agree to the Terms & Conditions"
      +          },
      +          {
      +            "isRequired": false,
      +            "key": "marketing_optin",
      +            "text": "I would like to receive marketing emails"
      +          }
      +        ],
      +        "items": {
      +          "properties": {
      +            "isRequired": {
      +              "description": "Checkbox required flag",
      +              "example": true,
      +              "type": "boolean"
      +            },
      +            "key": {
      +              "description": "Checkbox unique key",
      +              "example": "terms_checkbox",
      +              "type": "string"
      +            },
      +            "text": {
      +              "description": "Checkbox text label",
      +              "example": "I agree to terms",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "isRequired",
      +            "text",
      +            "key"
      +          ],
      +          "title": "CustomDisclaimerCheckbox",
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "title": {
      +        "description": "Disclaimer title",
      +        "example": "Terms & Conditions",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "title",
      +      "body"
      +    ],
      +    "title": "CustomDisclaimer",
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / body / properties / greetingCard / allOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "content": {
      -        "description": "Greeting card content",
      -        "example": [
      -          "Learn more about our services"
      -        ],
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "style": {
      -        "description": "Greeting card style",
      -        "example": "LIST_STYLE",
      -        "type": "string"
      -      },
      -      "title": {
      -        "description": "Greeting card title",
      -        "example": "Welcome!",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "title",
      -      "style",
      -      "content"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "content": {
      +        "description": "Greeting card content",
      +        "example": [
      +          "Learn more about our services"
      +        ],
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "style": {
      +        "description": "Greeting card style",
      +        "enum": [
      +          "LIST_STYLE",
      +          "PARAGRAPH_STYLE"
      +        ],
      +        "example": "LIST_STYLE",
      +        "type": "string"
      +      },
      +      "title": {
      +        "description": "Greeting card title",
      +        "example": "Welcome!",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "title",
      +      "style",
      +      "content"
      +    ],
      +    "title": "GreetingCard",
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / body / properties / questions / example
      Previous value: -[
      -  {
      -    "key": "full_name",
      -    "options": [],
      -    "type": "FULL_NAME"
      -  },
      -  {
      -    "key": "email_address",
      -    "options": [],
      -    "type": "EMAIL"
      -  },
      -  {
      -    "key": "are_you_interested",
      -    "label": "Are you interested?",
      -    "options": [
      -      {
      -        "value": "Yes"
      -      },
      -      {
      -        "value": "No"
      -      }
      -    ],
      -    "type": "CUSTOM"
      -  }
      -]New value: +[
      +  {
      +    "key": "full_name",
      +    "type": "FULL_NAME"
      +  },
      +  {
      +    "key": "email_address",
      +    "type": "EMAIL"
      +  },
      +  {
      +    "key": "preferred_time",
      +    "options": [
      +      {
      +        "key": "morning",
      +        "value": "Morning"
      +      },
      +      {
      +        "key": "evening",
      +        "value": "Evening"
      +      }
      +    ],
      +    "type": "CUSTOM"
      +  },
      +  {
      +    "key": "are_you_interested",
      +    "label": "Are you interested?",
      +    "options": [
      +      {
      +        "value": "Yes"
      +      },
      +      {
      +        "value": "No"
      +      }
      +    ],
      +    "type": "CUSTOM"
      +  }
      +]
    • addedInput schema / properties / body / properties / questions / items / properties / options / items / title
      Added value: +"FormQuestionOption"
    • changedInput schema / properties / body / properties / questions / items / properties / type / description
      Previous value: -"Question input type — use a prefilled type for standard fields or CUSTOM / SHORT_ANSWER for freeform questions"New value: +"Question input type — use a prefilled type for standard fields or CUSTOM for freeform questions"
    • changedInput schema / properties / body / properties / questions / items / properties / type / enum
      Previous value: -[
      -  "CUSTOM",
      -  "CITY",
      -  "COMPANY_NAME",
      -  "COUNTRY",
      -  "DATE_OF_BIRTH",
      -  "EMAIL",
      -  "FIRST_NAME",
      -  "FULL_NAME",
      -  "GENDER",
      -  "JOB_TITLE",
      -  "LAST_NAME",
      -  "MARITIAL_STATUS",
      -  "MILITARY_STATUS",
      -  "PHONE",
      -  "POST_CODE",
      -  "RELATIONSHIP_STATUS",
      -  "STATE",
      -  "STREET_ADDRESS",
      -  "WORK_EMAIL",
      -  "WORK_PHONE_NUMBER",
      -  "ZIP",
      -  "SHORT_ANSWER"
      -]New value: +[
      +  "CUSTOM",
      +  "CITY",
      +  "COMPANY_NAME",
      +  "COUNTRY",
      +  "DOB",
      +  "EMAIL",
      +  "GENDER",
      +  "FIRST_NAME",
      +  "FULL_NAME",
      +  "JOB_TITLE",
      +  "LAST_NAME",
      +  "MARITIAL_STATUS",
      +  "WHATSAPP_NUMBER",
      +  "EDUCATION_LEVEL",
      +  "WEBSITE",
      +  "PHONE",
      +  "PHONE_OTP",
      +  "POST_CODE",
      +  "PROVINCE",
      +  "RELATIONSHIP_STATUS",
      +  "STATE",
      +  "STREET_ADDRESS",
      +  "ZIP",
      +  "WORK_EMAIL",
      +  "MILITARY_STATUS",
      +  "WORK_PHONE_NUMBER",
      +  "LOCAL_DEALER",
      +  "SLIDER",
      +  "STORE_LOOKUP",
      +  "STORE_LOOKUP_WITH_TYPEAHEAD",
      +  "DATE_TIME",
      +  "ID_CPF",
      +  "ID_AR_DNI",
      +  "ID_CL_RUT",
      +  "ID_CO_CC",
      +  "ID_EC_CI",
      +  "ID_PE_DNI",
      +  "ID_MX_RFC",
      +  "JOIN_CODE",
      +  "USER_PROVIDED_PHONE_NUMBER",
      +  "FACEBOOK_LEAD_ID",
      +  "EMAIL_ALIAS",
      +  "MESSENGER",
      +  "VIN",
      +  "LICENSE_PLATE",
      +  "THREAD_LINK",
      +  "ADDRESS_LINE_TWO",
      +  "SHORT_ANSWER"
      +]
    • changedInput schema / properties / body / properties / questions / items / properties / type / example
      Previous value: -"SHORT_ANSWER"New value: +"CUSTOM"
    • addedInput schema / properties / body / properties / questions / items / title
      Added value: +"FormQuestion"
    • changedInput schema / properties / body / properties / thankYouPage / allOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "body": {
      -        "description": "Thank you page body",
      -        "example": "We will contact you soon",
      -        "type": "string"
      -      },
      -      "businessPhone": {
      -        "description": "Business phone number",
      -        "example": "+1234567890",
      -        "type": "string"
      -      },
      -      "buttonLink": {
      -        "description": "Button destination link",
      -        "example": "https://example.com",
      -        "type": "string"
      -      },
      -      "buttonText": {
      -        "description": "Button text label",
      -        "example": "Visit Website",
      -        "type": "string"
      -      },
      -      "buttonType": {
      -        "description": "Button action type",
      -        "example": "VIEW_WEBSITE",
      -        "type": "string"
      -      },
      -      "countryCode": {
      -        "description": "Phone country code",
      -        "example": "US",
      -        "type": "string"
      -      },
      -      "title": {
      -        "description": "Thank you page title",
      -        "example": "Thank You!",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "title",
      -      "body",
      -      "buttonText",
      -      "buttonType"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "body": {
      +        "description": "Thank you page body",
      +        "example": "We will contact you soon",
      +        "type": "string"
      +      },
      +      "businessPhone": {
      +        "description": "Business phone number",
      +        "example": "+1234567890",
      +        "type": "string"
      +      },
      +      "buttonLink": {
      +        "description": "Button destination link",
      +        "example": "https://example.com",
      +        "type": "string"
      +      },
      +      "buttonText": {
      +        "description": "Button text label",
      +        "example": "Visit Website",
      +        "type": "string"
      +      },
      +      "buttonType": {
      +        "description": "Thank-you-page button action. `VIEW_WEBSITE` and `DOWNLOAD` use `buttonLink`; `CALL_BUSINESS` uses the business phone number.",
      +        "enum": [
      +          "VIEW_WEBSITE",
      +          "CALL_BUSINESS",
      +          "DOWNLOAD"
      +        ],
      +        "example": "VIEW_WEBSITE",
      +        "type": "string"
      +      },
      +      "countryCode": {
      +        "description": "Phone country code",
      +        "example": "US",
      +        "type": "string"
      +      },
      +      "title": {
      +        "description": "Thank you page title",
      +        "example": "Thank You!",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "title",
      +      "body",
      +      "buttonText",
      +      "buttonType"
      +    ],
      +    "title": "ThankYouPage",
      +    "type": "object"
      +  }
      +]
    • addedInput schema / properties / body / title
      Added value: +"CreateLeadFormDTO"
  2. First observedv2.0.0

TDQS

A4.5/5.0
Behavior5/5

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

Goes well past the annotations (readOnly=false, openWorld=true, idempotent=false, destructive=false) by disclosing that drafts are local-only while publishing creates a Meta record, that the two responses share almost no fields, that publishing enforces questions plus a complete thankYouPage, and that draftFormId cleanup failures are only logged and not surfaced. That last point is a real, non-obvious side effect an agent needs before choosing to pass draftFormId.

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?

Front-loads the draft/publish distinction, which is the highest-value information, and each subsequent sentence carries a distinct constraint. The trailing Endpoint/Version/OAuth lines are boilerplate but short and operationally useful; the opening line duplicates the tool title slightly.

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?

With no output schema, the description carries the return-value burden and does note that draft and published responses differ substantially, though it does not describe any of the returned fields. Calling semantics are fully covered; only the response shape remains underspecified.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3; the description earns extra by clarifying that `draftFormId` accepts either the bare id or the `draft_`-prefixed form and by explaining the conditional validation rules on `questions` and `thankYouPage` per mode. It adds meaning beyond the schema's terse 'Draft form ID' and per-field descriptions.

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

Purpose5/5

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

States a specific verb and resource ('Create a lead gen form') and the endpoint pins it to a Facebook Page, which separates it from the sibling LinkedIn lead form tool and from the read-side ghl_ad_fb_page_lead_form_list. An agent can identify the action and the object without opening the schema.

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?

The draft-vs-publish fork is spelled out explicitly ('With `isDraft: true` the form is stored locally... without it the form is published to Facebook'), which is the main decision an agent must make. It does not, however, say when to pick this tool over ghl_ad_fb_conversation_form_create or when a draft should be preferred over direct publishing.

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