Skip to main content
Glama
EfrainTorres

ArmaVita Meta Ads MCP

read_ad_set

Retrieve comprehensive details for a specific Meta Ads ad set to analyze performance, targeting, and configuration directly from the Meta Marketing API.

Instructions

Fetch full details for one ad set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ad_set_idYes
meta_access_tokenNo

Implementation Reference

  • The handler for 'read_ad_set', which fetches detailed information about a specific ad set from the Meta Graph API.
    @mcp_server.tool()
    @meta_api_tool
    async def read_ad_set(ad_set_id: str, meta_access_token: Optional[str] = None) -> str:
        """Fetch full details for one ad set."""
        if not ad_set_id:
            return _json({"error": "No ad set ID provided"})
    
        payload = await make_api_request(
            ad_set_id,
            meta_access_token,
            {
                "fields": (
                    "id,name,campaign_id,status,frequency_control_specs{event,interval_days,max_frequency},"
                    "daily_budget,lifetime_budget,targeting,bid_amount,bid_strategy,bid_constraints,"
                    "optimization_goal,billing_event,start_time,end_time,created_time,updated_time,"
                    "attribution_spec,destination_type,promoted_object,pacing_type,budget_remaining,"
                    "dsa_beneficiary,is_dynamic_creative"
                )
            },
        )
    
        if isinstance(payload, dict) and "frequency_control_specs" not in payload:
            payload["_meta"] = {
                "note": "No frequency_control_specs were returned. Either none are set or the API omitted the field."
            }
    
        return _json(payload)

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