Skip to main content
Glama
EfrainTorres

ArmaVita Meta Ads MCP

update_ad_set

Modify an ad set's delivery settings, budget allocation, and audience targeting parameters to optimize campaign performance.

Instructions

Update an ad set's delivery, budgeting, and targeting configuration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ad_set_idYes
frequency_control_specsNo
bid_strategyNo
bid_amountNo
bid_constraintsNo
statusNo
targetingNo
optimization_goalNo
daily_budgetNo
lifetime_budgetNo
is_dynamic_creativeNo
meta_access_tokenNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler function for 'update_ad_set' tool. It performs input validation and makes an API request to update the ad set.
    @mcp_server.tool()
    @meta_api_tool
    async def update_ad_set(
        ad_set_id: str,
        frequency_control_specs: Optional[List[Dict[str, Any]]] = None,
        bid_strategy: Optional[str] = None,
        bid_amount: Optional[int] = None,
        bid_constraints: Optional[Dict[str, Any]] = None,
        status: Optional[str] = None,
        targeting: Optional[Dict[str, Any]] = None,
        optimization_goal: Optional[str] = None,
        daily_budget: Optional[int] = None,
        lifetime_budget: Optional[int] = None,
        is_dynamic_creative: Optional[bool] = None,
        meta_access_token: Optional[str] = None,
    ) -> str:
        """Update an ad set's delivery, budgeting, and targeting configuration."""
        if not ad_set_id:
            return _json({"error": "No ad set ID provided"})
    
        bid_error = _validate_bid_controls(bid_strategy, bid_amount, bid_constraints)
        if bid_error:
            return _json(bid_error)
    
        payload: Dict[str, Any] = {}
    
        if frequency_control_specs is not None:
            payload["frequency_control_specs"] = frequency_control_specs
    
        normalized_bid_strategy = _normalize_bid_strategy(bid_strategy)
        if normalized_bid_strategy is not None:
            payload["bid_strategy"] = normalized_bid_strategy
    
        if bid_amount is not None:
            payload["bid_amount"] = str(bid_amount)
        if bid_constraints is not None:
            payload["bid_constraints"] = json.dumps(bid_constraints)
        if status is not None:
            payload["status"] = status
        if targeting is not None:
            payload["targeting"] = json.dumps(targeting)
        if optimization_goal is not None:
            payload["optimization_goal"] = optimization_goal
        if daily_budget is not None:
            payload["daily_budget"] = str(daily_budget)
        if lifetime_budget is not None:
            payload["lifetime_budget"] = str(lifetime_budget)
        if is_dynamic_creative is not None:
            payload["is_dynamic_creative"] = "true" if bool(is_dynamic_creative) else "false"
    
        if not payload:
            return _json({"error": "No update parameters provided"})
    
        try:
            result = await make_api_request(ad_set_id, meta_access_token, payload, method="POST")
            return _json(result)
        except Exception as exc:  # noqa: BLE001
            return _json(
                {
                    "error": f"Failed to update ad set {ad_set_id}",
                    "details": str(exc),
                    "params_sent": payload,
                }
            )
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'Update' which implies a mutation, but fails to describe critical aspects like required permissions, whether changes are reversible, rate limits, or response behavior. This leaves significant gaps for an agent to understand how to use it safely and effectively.

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?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and wastes no space, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (12 parameters, mutation operation) and lack of annotations, the description is insufficient. It doesn't cover behavioral traits, parameter details, or usage context. While an output schema exists, the description should still address critical aspects like side effects or prerequisites, which it omits.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 12 parameters and 0% schema description coverage, the schema provides only titles and types without explanations. The description lists general categories ('delivery, budgeting, and targeting configuration') but doesn't clarify individual parameters like 'bid_strategy' or 'optimization_goal', nor does it explain relationships or constraints, failing to compensate for the low schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Update') and the resource ('an ad set's delivery, budgeting, and targeting configuration'), making the purpose specific and understandable. However, it doesn't explicitly differentiate this tool from its sibling 'update_ad' or 'update_campaign', which would be needed for a score of 5.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'update_ad' or 'update_campaign', nor does it mention prerequisites or context for usage. It simply states what the tool does without indicating appropriate scenarios or exclusions.

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/EfrainTorres/armavita-meta-ads-mcp'

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