Skip to main content
Glama

Create a campaign from a Page post

ads_create_campaign

Turn an existing Page post into a new engagement campaign, ad set and ad targeting the US, created PAUSED, and return a preview. For any other objective, targeting, a new image, video or carousel ad, or an Instagram post, use ads_create_meta_campaign. Nothing spends until ads_set_status sets it ACTIVE. Reuse the same idempotencyKey when retrying: a repeated key returns the first result instead of creating a second campaign. dailyBudget is in whole currency units.

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": {
      "adAccountId": "<adAccountId>",
      "pagePostId": "<pagePostId>",
      "dailyBudget": "<dailyBudget>",
      "startDate": "<startDate>",
      "endDate": "<endDate>",
      "campaignName": "<campaignName>",
      "idempotencyKey": "<idempotencyKey>"
    },
    "name": "ads_create_campaign"
  }
}

Input Schema

NameRequiredDescriptionDefault
endDateYes
accountIdNoThe Facebook accountId from list_accounts. Without it, pass profileId to use that profile's Facebook connection.
profileIdNoA profileId from list_profiles. Optional when accountId is given, which names its profile; if both are given they must agree.
startDateYes
pagePostIdYes
adAccountIdYes
dailyBudgetYes
campaignNameYes
idempotencyKeyYesA unique value per intended campaign, such as a UUID. Sent as the Idempotency-Key header.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / accountId / description
      Previous value: -"The Facebook accountId from list_accounts. Defaults to the profile's Facebook connection."New value: +"The Facebook accountId from list_accounts. Without it, pass profileId to use that profile's Facebook connection."
    • changedInput schema / properties / profileId / description
      Previous value: -"Defaults to the profile your API key is bound to."New value: +"A profileId from list_profiles. Optional when accountId is given, which names its profile; if both are given they must agree."
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations it discloses the key non-obvious behaviors: the campaign is created PAUSED, no spend occurs until an external status change, a preview is returned, and retries with the same idempotencyKey are deduplicated rather than creating a second campaign. These are exactly the traits an agent needs before calling a mutating, open-world tool.

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 tight sentences, each doing distinct work: what it builds, when to use the alternative, spend gating, retry semantics and budget units. Scope is front-loaded and nothing repeats the annotations or schema verbatim.

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?

For a 9-parameter mutation with no output schema, the description covers the return (a preview), safety gating and retry behavior. The remaining gap is parameter coverage: the date fields and adAccountId format are left entirely to the schema, so a low-coverage schema still leaves some holes.

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 only 33%, so the description carries real weight and delivers on the two hardest parameters: idempotencyKey is defined as a per-intended-campaign value whose repeat returns the first result, and dailyBudget is stated to be in whole currency units. It adds no meaning for startDate, endDate, campaignName, pagePostId or adAccountId, leaving several required params to bare patterns.

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 description gives a specific verb and resource chain: turn an existing Page post into an engagement campaign, ad set and US-targeted ad. It also names the sibling (ads_create_meta_campaign) that handles everything else, so an agent can route without opening either schema.

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 exclusions are listed for other objectives, targeting, new image/video/carousel ads, and Instagram posts, each routed to a named alternative. The life-cycle condition (nothing spends until ads_set_status sets it ACTIVE) tells the agent what the follow-up call is.

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.

Resources