read_campaign
Retrieve detailed campaign metadata from Meta Ads to analyze performance, monitor settings, and manage advertising strategies.
Instructions
Fetch detailed campaign metadata.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| campaign_id | Yes | ||
| meta_access_token | No |
Implementation Reference
- The implementation of the `read_campaign` tool, registered with the MCP server and decorated to handle Meta API requests.
@mcp_server.tool() @meta_api_tool async def read_campaign(campaign_id: str, meta_access_token: Optional[str] = None) -> str: """Fetch detailed campaign metadata.""" if not campaign_id: return _json({"error": "No campaign ID provided"}) payload = await make_api_request( campaign_id, meta_access_token, { "fields": ( "id,name,objective,status,effective_status,daily_budget,lifetime_budget,buying_type," "start_time,stop_time,created_time,updated_time,bid_strategy,special_ad_categories," "special_ad_category_country,budget_remaining,configured_status,advantage_state_info" ) }, ) return _json(payload)