Skip to main content
Glama

Google Ads & Meta Ads

Meta: Create A/B Test

meta_create_ab_test
Destructive

Start a Meta A/B (split) test between 2 to 5 existing campaigns or ad sets in your ad account: Meta splits the audience evenly so each one reaches different people for duration_days, then names a winner on cost per result. To test creatives, put each in its own ad set. The tested objects keep their own budgets and status; active ones keep spending. Change it with meta_update_ab_test, stop it with meta_end_ab_test.

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": {
      "name": "<name>",
      "level": "<level>",
      "object_ids": "<object_ids>",
      "duration_days": "<duration_days>"
    },
    "name": "meta_create_ab_test"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesTest name.
levelYesWhether the ids are CAMPAIGN or ADSET ids.
object_idsYes2 to 5 campaign or ad set ids, one per test cell.
start_timeNoOptional start, ISO 8601 with offset. Default: now.
descriptionNoOptional description, e.g. the hypothesis.
ad_account_idNoMeta ad account to change: act_ id or exact account name. Required when you have several ad accounts — the stored default is never used for a change then.
duration_daysYesHow long the test runs, 1 to 30 days.

Output Schema

NameRequiredDescriptionDefault
cellsYesNumber of test cells.
endTimeYesEnd, Unix seconds.
studyIdYesId of the A/B test.
startTimeYesStart, Unix seconds.
businessIdYesBusiness the test belongs to.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already flag write, destructive, non-idempotent, open-world; the description adds the behavior that matters on top of that — even audience split, winner chosen on cost per result, and the warning that active tested objects keep their budgets and status and keep spending. That side-effect disclosure (continued spend) is exactly the context annotations cannot convey.

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?

Three sentences, all front-loaded: what it creates, how it behaves, and where to go instead. No restatement of the title or filler.

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 destructive, multi-parameter creation tool with annotations and an output schema already present, the description covers scope, constraints, spend consequences, and sibling routing. Nothing needed to call it correctly is missing.

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 100%, so the baseline is 3; the prose adds meaning by explaining that each id becomes a test cell, that level must match the id type, and that ad-set-level placement is how you test creatives. It does not add format or default detail for start_time/duration_days beyond the schema.

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 and resource ('Start a Meta A/B (split) test between 2 to 5 existing campaigns or ad sets') and immediately scopes it to the ad account. It also distinguishes itself from the siblings that mutate the same object by naming meta_update_ab_test and meta_end_ab_test.

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?

Gives the operative condition (2–5 existing campaigns/ad sets), a concrete usage recipe ('To test creatives, put each in its own ad set'), and routes change/stop actions to the explicit alternatives. An agent knows both when to call this and when to call something else.

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