Skip to main content
Glama

meta_ads_lead_forms_create

Creates a lead form on a Facebook Page with ordered questions, privacy-policy URL, and follow-up URL, returning the new form ID for capturing ad leads.

Instructions

Creates a new lead form on a Facebook Page. Returns the new form_id. Mutating — not automatically reversible; record before-state with mureo_state_action_log_append if you may need to roll back. Questions is an ordered list of standard Meta types (FULL_NAME, EMAIL, PHONE_NUMBER, COMPANY_NAME, JOB_TITLE, CITY, STATE, ZIP_CODE, COUNTRY, DATE_OF_BIRTH) or CUSTOM (requires key, label, and options for dropdowns). Meta requires both privacy_policy_url and follow_up_action_url.

Input Schema

NameRequiredDescriptionDefault
nameYesForm name shown in Ads Manager and Page Lead Center.
localeNoOptional form locale (e.g. ``ja_JP``). Defaults to the Page's primary locale.
reasonNoWhy this change is being made: one or two sentences naming the evidence and the expected effect. Stored in the journal and on the action_log entry this call produces, for the operator and the next session.
page_idYesFacebook Page ID that will own the form.
approvalNoExternal approval this change carries out (recorded and shown, never verified)
expectedNoExpected effects [{metric, direction, target?, horizon_days?, primary?}], exactly one primary:true when several; metric cpa/cpc/cpl/cpm/conversions/cvr/ctr/roas/cost/spend/clicks/impressions; direction up/down/hold.
questionsYesOrdered question list. Standard-type questions only need `type`; CUSTOM questions require `key`, `label`, and (for dropdowns) `options`.
account_idNoMeta Ads account ID in the format 'act_XXXXXXXXXX' (e.g. 'act_1234567890'). Optional — falls back to META_ADS_ACCOUNT_ID from the configured credentials. The leading 'act_' prefix is required.
decision_idNoA proposed decision this change carries out.
context_cardNoOptional intro / welcome screen shown before the form. Lifts conversion rate measurably when supplied. Expected keys: title, content, style (PARAGRAPH_STYLE or LIST_STYLE), cover_photo_id. cover_photo_id is a PAGE photo id picked from meta_ads_pages_photos_list and is write-only: Meta reads it back as context_card.cover_photo.id ({id, created_time}), and asking for context_card{cover_photo_id} is rejected.
thank_you_pageNoOptional custom completion screen with a CTA. Richer than follow_up_action_url's plain redirect, but does not replace it — Meta still requires follow_up_action_url. Expected keys: title, body, button_type (VIEW_WEBSITE / CALL_BUSINESS / MESSAGE_BUSINESS / DOWNLOAD / DOWNLOAD_APP), website_url, button_text.
is_higher_intentNoWhen true, Meta renders a 3-step form (input → review → submit) which trims junk submissions at the cost of total leads volume. Default false (single-step).
privacy_policy_urlYesHTTPS URL of the advertiser's privacy policy. Required by Meta policy — forms without one are rejected.
follow_up_action_urlYesURL the user is sent to from the completion screen (e.g. thank-you page). Required by Meta — omitting it fails with error_subcode 1892085 'Missing field(s): FollowUpActionURL'. thank_you_page adds a richer completion screen but does not replace this field.
conditional_questions_choicesNoBranching logic — given a prior question's value, choose which question to ask next. Each entry: {question: <key>, value: <choice>, next_question_key: <key>}. Meta validates the keys refer to real questions.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.33.0
    • changedInput schema / properties / expected / description
      Previous value: -"Expected effects [{metric, direction, target?, horizon_days?}]; metric cpa/cpc/cpl/cpm/conversions/cvr/ctr/roas/cost/spend/clicks/impressions; direction up/down/hold."New value: +"Expected effects [{metric, direction, target?, horizon_days?, primary?}], exactly one primary:true when several; metric cpa/cpc/cpl/cpm/conversions/cvr/ctr/roas/cost/spend/clicks/impressions; direction up/down/hold."
  2. Changed1 schema field changedv0.28.0
    • addedInput schema / properties / approval
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "External approval this change carries out (recorded and shown, never verified)",
      +  "properties": {
      +    "approved_at": {
      +      "maxLength": 64,
      +      "type": "string"
      +    },
      +    "approved_by": {
      +      "maxLength": 80,
      +      "type": "string"
      +    },
      +    "reference": {
      +      "maxLength": 128,
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "reference",
      +    "approved_by",
      +    "approved_at"
      +  ],
      +  "type": "object"
      +}
  3. Changed2 schema fields changedv0.26.0
    • addedInput schema / properties / decision_id
      Added value: +{
      +  "description": "A proposed decision this change carries out.",
      +  "maxLength": 128,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / expected
      Added value: +{
      +  "description": "Expected effects [{metric, direction, target?, horizon_days?}]; metric cpa/cpc/cpl/cpm/conversions/cvr/ctr/roas/cost/spend/clicks/impressions; direction up/down/hold.",
      +  "maxItems": 12,
      +  "type": "array"
      +}
  4. Changed1 schema field changedv0.20.0
    • addedInput schema / properties / reason
      Added value: +{
      +  "description": "Why this change is being made: one or two sentences naming the evidence and the expected effect. Stored in the journal and on the action_log entry this call produces, for the operator and the next session.",
      +  "maxLength": 500,
      +  "type": "string"
      +}
  5. Changed1 schema field changedv0.15.0
    • changedInput schema / properties / context_card / description
      Previous value: -"Optional intro / welcome screen shown before the form. Lifts conversion rate measurably when supplied. Expected keys: title, content, style (PARAGRAPH_STYLE or LIST_STYLE), cover_photo_id. cover_photo_id is a PAGE photo id from meta_ads_pages_upload_photo and is write-only: Meta reads it back as context_card.cover_photo.id ({id, created_time}), and asking for context_card{cover_photo_id} is rejected."New value: +"Optional intro / welcome screen shown before the form. Lifts conversion rate measurably when supplied. Expected keys: title, content, style (PARAGRAPH_STYLE or LIST_STYLE), cover_photo_id. cover_photo_id is a PAGE photo id picked from meta_ads_pages_photos_list and is write-only: Meta reads it back as context_card.cover_photo.id ({id, created_time}), and asking for context_card{cover_photo_id} is rejected."
  6. Changed4 schema fields changedv0.10.44
    • changedInput schema / properties / context_card / description
      Previous value: -"Optional intro / welcome screen shown before the form. Lifts conversion rate measurably when supplied. Expected keys: title, content, style (PARAGRAPH_STYLE or LIST_STYLE), cover_photo_id."New value: +"Optional intro / welcome screen shown before the form. Lifts conversion rate measurably when supplied. Expected keys: title, content, style (PARAGRAPH_STYLE or LIST_STYLE), cover_photo_id. cover_photo_id is a PAGE photo id from meta_ads_pages_upload_photo and is write-only: Meta reads it back as context_card.cover_photo.id ({id, created_time}), and asking for context_card{cover_photo_id} is rejected."
    • changedInput schema / properties / follow_up_action_url / description
      Previous value: -"Optional URL the user is redirected to after submission (e.g. thank-you page). Omit to show Meta's default confirmation only. Superseded by thank_you_page when both are supplied."New value: +"URL the user is sent to from the completion screen (e.g. thank-you page). Required by Meta — omitting it fails with error_subcode 1892085 'Missing field(s): FollowUpActionURL'. thank_you_page adds a richer completion screen but does not replace this field."
    • changedInput schema / properties / thank_you_page / description
      Previous value: -"Optional custom completion screen with a CTA. Replaces follow_up_action_url's simple redirect when supplied. Expected keys: title, body, button_type (VIEW_WEBSITE / CALL_BUSINESS / MESSAGE_BUSINESS / DOWNLOAD / DOWNLOAD_APP), website_url, button_text."New value: +"Optional custom completion screen with a CTA. Richer than follow_up_action_url's plain redirect, but does not replace it — Meta still requires follow_up_action_url. Expected keys: title, body, button_type (VIEW_WEBSITE / CALL_BUSINESS / MESSAGE_BUSINESS / DOWNLOAD / DOWNLOAD_APP), website_url, button_text."
    • changedInput schema / required
      Previous value: -[
      -  "page_id",
      -  "name",
      -  "questions",
      -  "privacy_policy_url"
      -]New value: +[
      +  "page_id",
      +  "name",
      +  "questions",
      +  "privacy_policy_url",
      +  "follow_up_action_url"
      +]
  7. Changed1 schema field changedv0.10.37
    • addedInput schema / additionalProperties
      Added value: +false
  8. Changed6 schema fields changedv0.9.17
    • addedInput schema / properties / conditional_questions_choices
      Added value: +{
      +  "description": "Branching logic — given a prior question's value, choose which question to ask next. Each entry: {question: <key>, value: <choice>, next_question_key: <key>}. Meta validates the keys refer to real questions.",
      +  "items": {
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / context_card
      Added value: +{
      +  "description": "Optional intro / welcome screen shown before the form. Lifts conversion rate measurably when supplied. Expected keys: title, content, style (PARAGRAPH_STYLE or LIST_STYLE), cover_photo_id.",
      +  "type": "object"
      +}
    • changedInput schema / properties / follow_up_action_url / description
      Previous value: -"Optional URL the user is redirected to after submission (e.g. thank-you page). Omit to show Meta's default confirmation only."New value: +"Optional URL the user is redirected to after submission (e.g. thank-you page). Omit to show Meta's default confirmation only. Superseded by thank_you_page when both are supplied."
    • addedInput schema / properties / is_higher_intent
      Added value: +{
      +  "description": "When true, Meta renders a 3-step form (input → review → submit) which trims junk submissions at the cost of total leads volume. Default false (single-step).",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / locale
      Added value: +{
      +  "description": "Optional form locale (e.g. ``ja_JP``). Defaults to the Page's primary locale.",
      +  "type": "string"
      +}
    • addedInput schema / properties / thank_you_page
      Added value: +{
      +  "description": "Optional custom completion screen with a CTA. Replaces follow_up_action_url's simple redirect when supplied. Expected keys: title, body, button_type (VIEW_WEBSITE / CALL_BUSINESS / MESSAGE_BUSINESS / DOWNLOAD / DOWNLOAD_APP), website_url, button_text.",
      +  "type": "object"
      +}
  9. Addedv0.9.12
  10. Removedv0.9.6
  11. Addedv0.9.2
  12. Removedv0.9.1
  13. Addedv1.0.5

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the burden well: it flags the operation as mutating, states it is 'not automatically reversible', names the rollback/state-log escape hatch, and discloses the returned form_id. It stops short of permissions/page-token requirements or Meta-side rate limits, which would have pushed it to a 5.

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

Conciseness5/5

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

Four sentences, front-loaded with what it does and what it returns, then the risk/rollback note, then the parameter constraints. No filler, and the mutation warning is placed before the detail so an agent cannot miss it.

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

Completeness5/5

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

For a 15-parameter nested-object mutation with no annotations and no output schema, the description covers the essentials: the effect, the return value, the irreversibility, and the hard Meta preconditions. The many optional fields are exhaustively documented in the schema, so the description need not repeat them.

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 schema already documents context_card, thank_you_page, conditional_questions_choices, is_higher_intent and the governance fields in detail. The description's parameter content (standard question types, CUSTOM requiring key/label/options, the two required URLs) restates those schema descriptions rather than adding new meaning, 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 opens with a specific verb and resource ('Creates a new lead form on a Facebook Page') and states the return ('Returns the new form_id'). The word 'new' implicitly separates it from meta_ads_lead_forms_update and _duplicate, though those siblings are never named.

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 real preconditions (Meta requires both privacy_policy_url and follow_up_action_url) and a companion action for recovery ('record before-state with mureo_state_action_log_append if you may need to roll back'). It does not explicitly say when to choose this over meta_ads_lead_forms_duplicate or _update, so routing is left partly to inference.

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