Skip to main content
Glama

Create Ad Set

meta_create_adset

Create a targeted ad set in an existing campaign by defining budget, billing event, optimization goal, and audience targeting.

Instructions

Creates a new ad set within a campaign.

Args:

  • ad_account_id (string): Ad account ID (e.g., act_123456789)

  • campaign_id (string): Parent campaign ID

  • name (string): Ad set name

  • daily_budget (number, optional): Daily budget in cents

  • lifetime_budget (number, optional): Lifetime budget in cents (requires end_time)

  • billing_event (string): How you're charged: IMPRESSIONS, LINK_CLICKS, etc.

  • optimization_goal (string): What to optimize for: REACH, LINK_CLICKS, CONVERSIONS, etc.

  • targeting (object): Targeting spec JSON. Example: {"geo_locations": {"countries": ["US"]}, "age_min": 18, "age_max": 65}

  • start_time (string, optional): ISO 8601 start time

  • end_time (string, optional): ISO 8601 end time (required with lifetime_budget)

  • status (string): ACTIVE or PAUSED (default PAUSED)

  • placement_soft_opt_out (string[], optional): Placements to soft opt-out (up to 5% spend may still go to these). Only for Sales/Leads objectives.

Returns the new ad set ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ad_account_idYesAd account ID
campaign_idYesParent campaign ID
nameYes
daily_budgetNo
lifetime_budgetNo
billing_eventYesBilling event type
optimization_goalYesOptimization goal
targetingYesTargeting spec object (geo_locations, age, interests, etc.)
start_timeNo
end_timeNo
statusNoPAUSED
placement_soft_opt_outNoPlacements to soft opt-out (up to 5% spend may still go to these for better performance). Only for Sales/Leads objectives.
response_formatNoOutput format: 'markdown' for human-readable or 'json' for machine-readablemarkdown
Behavior4/5

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

Annotations indicate non-read-only and non-destructive, which align with creation. The description adds context such as default status PAUSED, placement soft opt-out behavior, and budget constraints. No contradictions with annotations.

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?

The description is well-structured as a docstring with Args: and Returns sections. It is clear and organized, though slightly lengthy due to including all parameters. Important info is front-loaded.

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 tool with 13 parameters and no output schema, the description covers key details: required params, budget requirements, default status, placement opt-out. It mentions the return value (new ad set ID). Could mention potential errors or permissions, but adequate.

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 54%, but the description provides detailed explanations with examples (e.g., daily_budget in cents, targeting spec example, billing_event enum values). This adds significant meaning beyond the schema's short descriptions.

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 clearly states 'Creates a new ad set within a campaign.' It uses a specific verb (creates) and resource (ad set), and distinguishes it from siblings like meta_create_ad or meta_create_campaign.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions parameter dependencies (e.g., lifetime_budget requires end_time) but does not provide explicit guidance on when to use this tool over alternatives like meta_update_adset or meta_list_adsets. No when-to-use or when-not-to-use advice.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/oliverames/meta-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server