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
| Name | Required | Description | Default |
|---|---|---|---|
| ad_set_id | Yes | ||
| meta_access_token | No |
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)