Skip to main content
Glama
EfrainTorres

ArmaVita Meta Ads MCP

list_campaigns

Retrieve and filter advertising campaigns from a Meta Ads account to manage marketing initiatives and analyze performance data.

Instructions

List campaigns for an ad account with optional filters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ad_account_idYes
meta_access_tokenNo
page_sizeNo
status_filterNo
objective_filterNo
page_cursorNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `list_campaigns` tool handler, implemented using `mcp_server.tool()` and a helper `meta_api_tool` decorator.
    @mcp_server.tool()
    @meta_api_tool
    async def list_campaigns(
        ad_account_id: str,
        meta_access_token: Optional[str] = None,
        page_size: int = 10,
        status_filter: str = "",
        objective_filter: Union[str, List[str]] = "",
        page_cursor: str = "",
    ) -> str:
        """List campaigns for an ad account with optional filters."""
        if not ad_account_id:
            return _json({"error": "No account ID specified"})
    
        params: Dict[str, Any] = {
            "fields": (
                "id,name,objective,status,effective_status,daily_budget,lifetime_budget,buying_type,"
                "start_time,stop_time,created_time,updated_time,bid_strategy,advantage_state_info"
            ),
            "page_size": int(page_size),
        }
    
        if status_filter:
            params["effective_status"] = [status_filter]
    
        objectives = _normalize_objectives(objective_filter)
        if objectives:
            params["filtering"] = [{"field": "objective", "operator": "IN", "value": objectives}]
    
        if page_cursor:
            params["page_cursor"] = page_cursor
    
        payload = await make_api_request(f"{ad_account_id}/campaigns", meta_access_token, params)
        return _json(payload)
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions 'optional filters' but doesn't describe pagination behavior (implied by page_size and page_cursor parameters), rate limits, authentication requirements, or what happens when filters are applied. The description is minimal and lacks important operational context.

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 waste. It's appropriately sized for a list operation and front-loads the core purpose. Every word earns its place.

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

Completeness3/5

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

Given 6 parameters with 0% schema coverage, no annotations, but an output schema exists, the description is incomplete. It covers the basic purpose but lacks guidance on parameter usage, behavioral traits, and differentiation from siblings. The output schema reduces the need to describe return values, but other gaps remain significant.

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 the description must compensate but only mentions 'optional filters' without explaining which parameters are filters or their purposes. It doesn't clarify the relationship between ad_account_id and meta_access_token, or explain filter syntax/values. The description adds minimal value beyond what parameter names suggest.

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 'List' and resource 'campaigns' with the scope 'for an ad account'. It distinguishes from other list tools by specifying campaigns, but doesn't explicitly differentiate from other campaign-related tools like 'read_campaign' or 'search_ads_archive'.

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 mentions 'optional filters' which implies some usage context, but provides no guidance on when to use this tool versus alternatives like 'search_ads_archive' or 'read_campaign'. No prerequisites, exclusions, or comparison with sibling tools are provided.

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