Skip to main content
Glama
EfrainTorres

ArmaVita Meta Ads MCP

list_ad_sets

Retrieve ad sets from Meta Ads accounts or campaigns to manage advertising groups and analyze campaign structure.

Instructions

List ad sets under an account or campaign.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ad_account_idYes
meta_access_tokenNo
page_sizeNo
campaign_idNo
page_cursorNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The implementation of the `list_ad_sets` tool handler, which fetches ad set data from the Meta Graph API.
    @mcp_server.tool()
    @meta_api_tool
    async def list_ad_sets(
        ad_account_id: str,
        meta_access_token: Optional[str] = None,
        page_size: int = 10,
        campaign_id: str = "",
        page_cursor: str = "",
    ) -> str:
        """List ad sets under an account or campaign."""
        if not ad_account_id:
            return _json({"error": "No account ID specified"})
    
        target = campaign_id or ad_account_id
        endpoint = f"{target}/adsets"
        params: Dict[str, Any] = {
            "fields": (
                "id,name,campaign_id,status,daily_budget,lifetime_budget,targeting,bid_amount,bid_strategy,"
                "bid_constraints,optimization_goal,billing_event,start_time,end_time,created_time,updated_time,"
                "is_dynamic_creative,frequency_control_specs{event,interval_days,max_frequency}"
            ),
            "page_size": int(page_size),
        }
        if page_cursor:
            params["page_cursor"] = page_cursor
    
        payload = await make_api_request(endpoint, meta_access_token, params)
        return _json(payload)
Behavior2/5

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

No annotations are provided, so the description carries full burden. It doesn't disclose behavioral traits like pagination (implied by page_size and page_cursor parameters but not explained), rate limits, authentication requirements (meta_access_token is in schema but not mentioned), or whether it's a read-only operation. The description is minimal and lacks critical 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?

Extremely concise with a single sentence that front-loads the core purpose. No wasted words or redundant information, 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 5 parameters with 0% schema coverage, no annotations, and an output schema (which reduces need to describe returns), the description is incomplete. It lacks details on parameter usage, authentication, pagination behavior, and when to use versus siblings, making it inadequate for a tool with this complexity.

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. It mentions 'under an account or campaign' which hints at ad_account_id and campaign_id, but doesn't explain their relationship, defaults, or other parameters like page_size, page_cursor, or meta_access_token. The description adds minimal value beyond the schema's parameter names.

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 ('List') and resource ('ad sets'), specifying they can be under an account or campaign. It distinguishes from other list tools like list_ads or list_campaigns by focusing on ad sets, but doesn't explicitly differentiate from read_ad_set (which might fetch a single ad set).

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?

No guidance on when to use this tool versus alternatives like search_ads_archive or read_ad_set. It mentions 'under an account or campaign' but doesn't clarify if both can be specified or if one takes precedence, nor does it mention prerequisites like authentication.

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