Skip to main content
Glama

meta_ads_creatives_create_lead

Creates a Meta Lead Ad creative linked to an Instant Form and returns the creative ID and object_story_id for lead-generation campaigns.

Instructions

Creates a Lead Ad AdCreative attached to a Meta Instant Form. Returns the new creative's id and object_story_id. Mutating — not automatically reversible; record before-state with mureo_state_action_log_append if you may need to roll back. Use under a campaign with objective=OUTCOME_LEADS and an ad set with optimization_goal=LEAD_GENERATION. Pre-requisite: the lead form must exist (create via meta_ads_lead_forms_create) and belong to the same Facebook Page. link_url is the fallback landing page for placements where the in-app form cannot render; it must be HTTPS and domain-verified on the ad account.

Input Schema

NameRequiredDescriptionDefault
nameYesCreative name shown in Ads Manager. Internal label — not visible to end users.
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.
form_idYesLead Form ID returned by meta_ads_lead_forms_create or listed via meta_ads_lead_forms_list. The form must belong to the supplied page_id.
messageNoPrimary ad body text shown above the creative. Plain text, emoji allowed. ≤125 characters fits most placements without truncation.
page_idYesFacebook Page ID that the ad will be published as. Must be a page the authenticated user has permission to post from. Required by Meta for every creative — ads cannot run without a page identity.
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.
headlineNoHeadline shown with the creative. ~40 characters fits most placements. Mapped to link_data.name in image mode and video_data.title in video mode.
link_urlYesFallback destination URL for placements where the in-app form cannot render. Must be HTTPS and domain-verified on the ad account.
video_idNoPre-uploaded video ID from meta_ads_videos_upload / meta_ads_videos_upload_file. When supplied, the creative becomes a video Lead Ad — object_story_spec.video_data is used (not link_data) and lead_gen_form_id is nested under call_to_action.value. image_url is rejected in video mode; supply image_hash directly as the thumbnail.
image_urlNoPublic HTTPS image URL. Auto-uploaded to image_hash. Mutually exclusive with image_hash.
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.
image_hashNoPre-uploaded image hash from meta_ads_creatives_upload_image / meta_ads_images_upload_file. Mutually exclusive with image_url. In video mode (when video_id is set), used as the video thumbnail.
decision_idNoA proposed decision this change carries out.
descriptionNoLink-caption text shown below the headline. Optional; not all placements render it.
call_to_actionNoCTA button label. SIGN_UP is the canonical Lead Ad CTA and the default. Choose the one that matches the form's purpose.

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.10.37
    • addedInput schema / additionalProperties
      Added value: +false
  6. Addedv0.9.17

TDQS

A4.7/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden and does: it declares the call mutating, states it is 'not automatically reversible', names the rollback recipe (mureo_state_action_log_append before-state), and adds a hard constraint on link_url (HTTPS + domain-verified on the ad account) that is not derivable from the schema. Return values are disclosed. Only idempotency/error semantics are unstated, which is minor here.

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?

Front-loaded with purpose and return value, then mutation risk, then placement conditions, then prerequisites, then the one non-obvious URL constraint. Five dense sentences with no filler and no repetition of the tool name.

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 16-parameter, nested-object, no-output-schema mutation, the description covers purpose, return shape, irreversibility, rollback path, prerequisite tooling, and placement constraints. The nested approval/expected objects are fully documented in the schema, so nothing an agent needs to invoke correctly is missing.

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%, so the schema already documents all 16 parameters including the video-mode branching and CTA default. The description mostly restates what the schema says (link_url as fallback, HTTPS/domain-verification) 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.

Purpose5/5

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

States a specific verb plus a specific resource subtype: 'Creates a Lead Ad AdCreative attached to a Meta Instant Form'. That distinguishes it from the generic meta_ads_creatives_create and the dynamic/carousel/collection siblings without the agent needing to open a schema. It also names the immediate output (id, object_story_id).

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

Usage Guidelines5/5

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

Explicit placement conditions ('campaign with objective=OUTCOME_LEADS and an ad set with optimization_goal=LEAD_GENERATION') and an explicit prerequisite chain that routes to the sibling meta_ads_lead_forms_create plus the requirement that the form belong to the same Page. Alternatives and when-not-to-use conditions are effectively covered by these prerequisites.

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