Skip to main content
Glama

Meta ads: Build campaign

meta_build_campaign

Build a whole Meta (Facebook and Instagram) campaign in one step: the campaign, one ad set (goal, daily budget, locations, ages) and 1-5 ads (text, headline, button, link, with one image, a 2-10 image carousel or a video), all running from the client's Facebook Page. Everything is created inside a PAUSED campaign, so nothing spends until it is turned on (meta_set_campaign_status). Call WITHOUT confirm first: the preview downloads and checks every image and has Meta check the campaign. Show the preview to the user; only after they approve, call again with confirm: true to create it. The tool cannot activate anything. If a step fails partway, it deletes only the objects this same call just created (never an existing campaign, ad set or ad), so no half-built campaign is left. Goals: website_leads (needs pixel_id), landing_page_views, link_clicks, calls (needs a CALL_NOW button with phone_number), reach. Instant Forms (the form inside Facebook) are not available yet: send people to the client's site.

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": {
      "ad_account_id": "<ad_account_id>",
      "page_id": "<page_id>",
      "name": "<name>",
      "goal": "<goal>",
      "daily_budget_major": "<daily_budget_major>",
      "locations": "<locations>",
      "ads": "<ads>"
    },
    "name": "meta_build_campaign"
  }
}

Input Schema

NameRequiredDescriptionDefault
adsYes
goalYes
nameYesCampaign name; the ad set and ads are named after it unless named
age_maxNo
age_minNo
confirmNoLeave false to preview: nothing changes and the preview shows exactly what would happen. Set true only after the user has agreed to this exact change.
page_idYesThe client's Facebook Page the ads run from (meta_list_pages)
end_timeNo
pixel_idNoFor website_leads: the pixel that fires a Lead event (meta_list_pixels)
locationsYesWhere the ads show: the area the client serves
start_timeNoISO date-time to start, e.g. 2026-11-10T08:00:00-0800
ad_account_idYes'act_...' from meta_list_accounts
daily_budget_majorYesThe ad set's daily budget in real currency (25 means $25.00/day)
special_ad_categoriesNoRequired by Meta. Empty for ordinary home-service ads; HOUSING is for selling or renting homes, mortgages and home insurance

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations say only non-read-only, non-destructive, open-world and non-idempotent; the description adds the facts that actually matter: everything is created PAUSED so nothing spends, the tool can never activate anything, the preview downloads and validates every image and has Meta check the campaign, and a partial failure deletes only objects created by this same call, never pre-existing ones. It also flags an explicit capability gap (Instant Forms unavailable) so the agent does not promise it.

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?

It is a dense paragraph rather than a list, but it is front-loaded with what gets created, then the safety/preview contract, then constraints. Nearly every sentence carries a fact the agent would otherwise get wrong; only the goal enumeration slightly overlaps the enum in the schema.

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 14-parameter, 7-required multi-object creation tool with no output schema, the description covers what is built, what happens on failure, what the preview returns and what remains impossible. An agent can call this correctly and set user expectations without opening the schema.

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 coverage is 64%, and the description compensates well on the non-obvious parts: the goal-to-pixel and goal-to-call-button dependencies, the 1-image vs 2-10-image carousel vs video rule, and that the campaign name propagates to the ad set and ads. It leaves age_min/age_max, start_time/end_time and special_ad_categories to the schema, so meaning is added but not across every parameter.

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?

The opening sentence names a specific verb and resource and spells out the exact composition: one campaign, one ad set (goal, budget, locations, ages) and 1-5 ads with image, carousel or video. That scope distinguishes it clearly from the single-object siblings like meta_create_campaign and meta_create_ad_set without needing to name them.

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 preview/confirm workflow is stated explicitly: call without confirm, show the preview, then call again with confirm:true only after user approval, and it even routes activation to meta_set_campaign_status. It also tells the agent when goal-specific requirements block a call (website_leads needs pixel_id, calls needs CALL_NOW plus phone_number). It stops short of naming the alternative to use when the agent only needs a campaign or ad set alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.