get_creative_performance
Retrieve performance statistics for advertising creatives to analyze campaign effectiveness and optimize ad content based on data-driven insights.
Instructions
Get performance statistics for creatives.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| campaign_id | No | Filter by campaign ID | |
| date_from | No | Start date (YYYY-MM-DD) | |
| date_to | No | End date (YYYY-MM-DD) |
Implementation Reference
- src/propellerads_mcp/server.py:676-699 (handler)Handler logic for the 'get_creative_performance' tool, which fetches and formats creative performance statistics using the PropellerAdsClient.
elif name == "get_creative_performance": creatives = client.get_creative_statistics( campaign_id=args.get("campaign_id"), date_from=args.get("date_from"), date_to=args.get("date_to"), ) if not creatives: return "No creative statistics found." enriched = [calculate_metrics(c) for c in creatives] lines = ["# Creative Performance\n\n"] for c in enriched: lines.append( f"**Creative {c.get('creative_id', 'N/A')}**\n" f"- Impressions: {c.get('impressions', 0):,}\n" f"- Clicks: {c.get('clicks', 0):,}\n" f"- CTR: {format_percentage(c.get('ctr'))}\n" f"- Conversions: {c.get('conversions', 0)}\n" f"- Spend: {format_currency(c.get('spend', c.get('cost', 0)))}\n\n" ) return "".join(lines) - src/propellerads_mcp/server.py:308-321 (registration)Registration of the 'get_creative_performance' tool definition in the TOOLS list.
name="get_creative_performance", description="Get performance statistics for creatives.", inputSchema={ "type": "object", "properties": { "campaign_id": { "type": "integer", "description": "Filter by campaign ID", }, "date_from": {"type": "string", "description": "Start date (YYYY-MM-DD)"}, "date_to": {"type": "string", "description": "End date (YYYY-MM-DD)"}, }, }, ),