Skip to main content
Glama
EfrainTorres

ArmaVita Meta Ads MCP

update_campaign

Modify existing Meta ad campaign settings including budget, status, objectives, and bid strategies to optimize performance and adjust targeting parameters.

Instructions

Update campaign settings for an existing campaign.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYes
meta_access_tokenNo
nameNo
statusNo
special_ad_categoriesNo
daily_budgetNo
lifetime_budgetNo
bid_strategyNo
bid_capNo
spend_capNo
campaign_budget_optimizationNo
objectiveNo
use_ad_set_level_budgetsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The implementation of the `update_campaign` tool, decorated with `@mcp_server.tool()` and `@meta_api_tool`.
    async def update_campaign(
        campaign_id: str,
        meta_access_token: Optional[str] = None,
        name: Optional[str] = None,
        status: Optional[str] = None,
        special_ad_categories: Optional[List[str]] = None,
        daily_budget: Optional[int] = None,
        lifetime_budget: Optional[int] = None,
        bid_strategy: Optional[str] = None,
        bid_cap: Optional[int] = None,
        spend_cap: Optional[int] = None,
        campaign_budget_optimization: Optional[bool] = None,
        objective: Optional[str] = None,
        use_ad_set_level_budgets: Optional[bool] = None,
    ) -> str:
        """Update campaign settings for an existing campaign."""
        if not campaign_id:
            return _json({"error": "No campaign ID provided"})
    
        bid_error = _validate_bid_strategy(bid_strategy)
        if bid_error:
            return _json(bid_error)
    
        payload: Dict[str, Any] = {}
    
        if name is not None:
            payload["name"] = name
        if status is not None:
            payload["status"] = status
    
        if special_ad_categories is not None:
            categories, category_error = _normalize_special_ad_categories(special_ad_categories)
            if category_error:
                return _json({"error": category_error})
            payload["special_ad_categories"] = json.dumps(categories)
    
        if use_ad_set_level_budgets is True:
            payload["daily_budget"] = ""
            payload["lifetime_budget"] = ""
            if campaign_budget_optimization is not None:
                payload["campaign_budget_optimization"] = "false"
        else:
            if daily_budget is not None:
                payload["daily_budget"] = "" if daily_budget == "" else str(daily_budget)
            if lifetime_budget is not None:
                payload["lifetime_budget"] = "" if lifetime_budget == "" else str(lifetime_budget)
            if campaign_budget_optimization is not None:
                payload["campaign_budget_optimization"] = "true" if campaign_budget_optimization else "false"
    
        if bid_strategy is not None:
            payload["bid_strategy"] = str(bid_strategy).strip().upper()
        if bid_cap is not None:
            payload["bid_cap"] = str(bid_cap)
        if spend_cap is not None:
            payload["spend_cap"] = str(spend_cap)
        if objective is not None:
            payload["objective"] = objective
    
        if not payload:
            return _json({"error": "No update parameters provided"})
    
        result = await make_api_request(campaign_id, meta_access_token, payload, method="POST")
    
        if isinstance(result, dict) and use_ad_set_level_budgets is True:
            result["budget_strategy"] = "ad_set_level"
            result["note"] = "Campaign updated to use ad set level budgets."
    
        return _json(result)
Behavior2/5

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

With no annotations provided, the description carries full burden but only states it's an update operation. It doesn't disclose behavioral traits like required permissions, whether changes are reversible, rate limits, or what happens to unspecified settings. For a mutation tool with 13 parameters, this is a significant gap in transparency.

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 with zero wasted words. It's appropriately sized and front-loaded, stating the core purpose immediately without unnecessary elaboration.

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 (13 parameters, mutation operation) and lack of annotations, the description is incomplete. While an output schema exists (which helps), the description doesn't address key contextual aspects like parameter meanings, usage scenarios, or behavioral implications, leaving significant gaps for an AI agent.

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?

Schema description coverage is 0%, so parameters are undocumented in the schema. The description adds no information about any parameters—it doesn't mention which settings can be updated, what 'campaign_id' refers to, or the meaning of fields like 'bid_strategy' or 'objective'. This fails to compensate for the schema gap.

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 verb ('Update') and resource ('campaign settings for an existing campaign'), making the purpose understandable. However, it doesn't distinguish this tool from sibling tools like 'update_ad' or 'update_ad_set', which also update advertising resources, so it doesn't achieve full differentiation.

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. It doesn't mention prerequisites (e.g., needing an existing campaign ID), exclusions, or comparisons to sibling tools like 'create_campaign' or other update tools in the list.

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