Skip to main content
Glama

Create an X Ads campaign

x_ads_create_campaign

Create an X Ads campaign in one call: the campaign with a daily budget (and optional total budget), one ad group (line item) with an objective, automatic bidding by default, optional location targeting (targeting values from x_ads_search_locations) and optional existing posts (post IDs) to promote. Everything is created PAUSED and spends nothing; turning it on is a separate step that needs the user's confirmation. Uses the account's active funding source. Use dry_run=true to validate without creating anything.

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>",
      "daily_budget": "<daily_budget>"
    },
    "name": "x_ads_create_campaign"
  }
}

Input Schema

NameRequiredDescriptionDefault
bidNo
nameYes
folderNoClient folder name.
accountNoX Ads account name or ID. Optional when only one is enabled.
dry_runNo
end_dateNoOptional YYYY-MM-DD.
languageNoLanguage of the card: the language the user is writing in.
post_idsNoIDs of existing posts to promote (the number at the end of the post URL).
locationsNoLocation targeting values from x_ads_search_locations.
objectiveNoDefault WEBSITE_CLICKS.
start_dateNoYYYY-MM-DD; default now.
bid_strategyNoDefault AUTO.
daily_budgetYes
total_budgetNo
ad_group_nameNoDefault: campaign name.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only say mutating, non-destructive, open-world; the description goes well beyond by disclosing that everything is created PAUSED and spends nothing, that activation requires the user's confirmation, that the account's active funding source is used, and that dry_run validates. These are exactly the side-effect and safety facts an agent needs before invoking a spend-related mutation.

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?

Three dense sentences with the composite scope front-loaded, followed by the safety-critical PAUSED/spend statement and the dry_run affordance. No filler, though the first sentence is long and packs several concepts that could be split for faster scanning.

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 15-parameter, multi-object mutation with no output schema, the description covers the decisions an agent must make: validation path, targeting source, post source, bidding default, and the fact that creation does not spend. It stops short of saying what is returned (e.g., created campaign/ad group IDs) or how account defaults are resolved, which would be needed for full downstream chaining.

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?

With 67% schema coverage the schema carries much of the load, but the description adds real meaning: locations must be values from x_ads_search_locations, post_ids are existing posts converted from post URLs, bidding defaults to automatic, total budget is optional alongside the required daily budget. It leaves folder, language, account and ad_group_name to the schema, so it is additive rather than exhaustive.

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?

Opens with a specific verb+resource ("Create an X Ads campaign") and immediately defines scope: it creates the campaign plus one ad group/line item in a single call, with bidding, targeting and promoted posts. The composite "in one call" framing distinguishes it from single-object siblings like x_ads_campaigns, x_ads_ad_groups or x_ads_add_posts.

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?

Gives concrete operating guidance: dry_run=true to validate without creating, targeting values must come from x_ads_search_locations, and existing posts are supplied as post IDs. It also states activation is a separate step, implicitly routing the agent to a status tool. It does not explicitly say when to prefer a platform-specific alternative or which siblings to avoid, so it falls short of a full when/when-not treatment.

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