MCP tools

Attach lead form

Attach a Meta instant lead form to a lead-generation ad set so the campaign can launch.

Tool name: attach-lead-form.

Attach a Meta instant lead form to a lead-generation ad set so the campaign can launch. Turns on instant forms and sets the chosen form on the ad set. Get the leadFormId from listLeadForms (never invent one). Works on DRAFT ad sets, a live ad set returns a 409 (live entities are edited in Meta Ads Manager). Use this instead of telling the user to attach the form themselves.

When to use

Attach a chosen Meta lead form to a lead-gen ad set (enables instant forms + sets the form). Use the leadFormId from listLeadForms. Drafts only, 409 on a live ad set.

Access

PropertyValue
Required scopewrite
PublishesNo
Read-onlyNo
DestructiveYes
IdempotentYes
Open worldYes

Input

FieldTypeRequiredDescription
campaignLaunchIdstringYesCampaign launch ID (a.k.a. batch ID). Read it from the Current Context block when one is in scope, or resolve it from a mention via listAccountCampaigns / the campaign tree when the user @-mentioned a different launch.
adsetNodeIdstringYesKoast adset node id to attach the lead form to.
leadFormIdstringYesMeta lead form id from listLeadForms.
leadFormNamestringNoOptional human name of the lead form (from listLeadForms).

Output

The tool catalog does not declare an output schema for this tool.

REST equivalent

POST /v1/brands/{brandId}/launches/{launchId}/ad-sets/{adsetNodeId}/lead-form, Attach lead form. CLI: koast attach-lead-form.

On this page