Analyze Wasted Spend
Analyze wasted ad spend and identify campaigns losing money or underperforming.
ā ļø IMPORTANT: This tool retrieves READ-ONLY data. Safe to call multiple times.
šÆ What This Tool Does (Performance Agent - Phase 1):
- Identifies campaigns LOSING money (ROAS
<1.0x) - Identifies campaigns UNDERPERFORMING (1.0x ⤠ROAS
<target) - Separates true waste from opportunity cost
- Provides severity-based classification (CRITICAL/HIGH/MEDIUM)
- Generates actionable recommendations with expected impact
- Shows top performing campaigns for budget reallocation
Returns detailed analysis:
- Total wasted spend (campaigns with ROAS
<1.0) - Total underperforming spend (profitable but below target)
- Campaign-by-campaign breakdown with severity levels
- Specific recommendations (PAUSE/REDUCE/OPTIMIZE)
- Quick actions for immediate implementation
- Budget reallocation suggestions
Target ROAS Resolution (3-tier priority):
- Account goals table (user-set or API-pulled)
- 90-day historical average ROAS
- Default to 2.0x if no data available
Severity Levels:
- šØ CRITICAL: ROAS
<0.5x (losing money severely) - š“ HIGH: ROAS
<1.0x (unprofitable/breakeven) - š” MEDIUM: 1.0x ⤠ROAS
<target (profitable but underperforming)
Parameters:
- lookback_days: 7, 30, 60, 90, or 120 days (default: 30)
- start_date: Optional start date (YYYY-MM-DD). Overrides lookback_days when used with end_date.
- end_date: Optional end date (YYYY-MM-DD). Overrides lookback_days when used with start_date. ā ļø DATE CLARIFICATION: If the userās date request is vague or ambiguous (e.g., āMarch to Juneā without a year, ālast quarterā, ārecentlyā, āa few months agoā), ask the user to specify exact dates before calling this tool. Do not assume or guess dates.
- target_roas: Optional override (e.g., 3.0 for 3.0x ROAS)
- customer_id: Optional (uses connected account if omitted)
Execution time: 1-3 seconds (cached database query) Data source: campaign_daily_metrics table (updated nightly)
Use this tool when:
- User asks āwhere is my money going?ā
- User wants to identify wasted spend
- User wants to optimize campaign budgets
- User asks which campaigns to pause/reduce
- User wants to know which campaigns are losing money
š AFTER calling this tool, help the user understand:
Wasted vs. Underperforming:
- Wasted Spend = Actual losses (ROAS
<1.0, youāre losing money) - Underperforming Spend = Opportunity cost (profitable but below target)
Example:
- Campaign A: Spent 600 back (ROAS 0.6x) ā $400 WASTED
- Campaign B: Spent 1500 back (ROAS 1.5x, target 3.0x) ā 500 opportunity cost
Quick Actions (IMPORTANT ā read severity context first):
- ā³ LEARNING campaigns ā Do NOT pause. Monitor for 14+ days before judging.
- ā INSUFFICIENT_DATA campaigns ā Need more spend before analysis is meaningful.
- šØ CRITICAL campaigns (established, 14+ days, ZERO conversions) ā Consider pausing
- šØ CRITICAL campaigns (established, 14+ days, HAS conversions) ā Review performance, verify revenue in ad platform before reducing budget
- š“ HIGH severity (established, 14+ days) ā Consider reducing budget by 50-70%
- š” MEDIUM ā Optimize targeting, ad copy, landing pages
- Top performers ā Consider increasing budget
ā ļø NEVER say āpauseā for a campaign that has conversions. Say āreviewā or āreduce budgetā instead. ā ļø NEVER recommend pausing a campaign in LEARNING phase. ā ļø If ALL campaigns are LEARNING or INSUFFICIENT_DATA, tell the user their account is too new for waste analysis and recommend checking back in 2 weeks. ā ļø Consider campaign objective: brand awareness campaigns will not have ROAS data. This is normal. ā ļø When data confidence is MEDIUM or LOW, soften all recommendations and add verification prompts.
Visualization Tip: For 10+ campaigns, suggest creating a treemap visualization to show wasted spend by campaign size.
š¬ Community: For optimization discussions, visit our Discord: https://discord.gg/dH3Qt4YS
Authorizations
API key from https://adspirer.ai/keys. Prefix sk_live_. Treat as a secret ā never commit.
Headers
Client-generated UUID to make writes idempotent. Strongly recommended for write tools. A repeat call with the same key returns the cached result instead of re-executing. Example: 550e8400-e29b-41d4-a716-446655440000
Body
All tool arguments are wrapped in an arguments object. The fields accepted inside arguments are listed below ā required fields are marked with a red asterisk.
Response
Tool executed successfully. data.text carries the human-readable result (markdown-friendly). data.quota shows your current usage against the plan limit. data.structured appears when the tool emits machine-parseable structured content. data.content appears for tools that return non-text blocks (images, resources).
Returned on HTTP 200. data.text is the primary human-readable output. data.quota is always present for billable calls. data.structured is set only when the tool emits machine-parseable structured content. data.content is set only when the tool emits non-text content blocks.

