Explain why a performance metric changed using statistical analysis and historical context.
ā ļø IMPORTANT: This tool retrieves READ-ONLY data. Safe to call multiple times. Uses statistical analysis only (no ML models).
šÆ What This Tool Does (Performance Agent - Phase 1 Feature 4):
Returns comprehensive anomaly explanation:
š How Anomaly Detection Works:
Historical Comparison:
15% deviation flagged as requiring attention
Contributing Factor Detection:
CPC Changes (>15% threshold)
Conversion Rate Changes (>10% threshold)
Campaign Changes:
Day-of-Week Patterns:
Seasonality Detection:
Parameters:
Execution time: 2-4 seconds (statistical analysis + database queries) Data source: campaign_daily_metrics table (updated nightly, 120-day retention) Analysis method: Statistical comparison (no ML models) Trigger: Reactive (user asks āwhy?ā), not proactive alerts
Use this tool when:
š AFTER calling this tool, help the user understand:
Normal vs Abnormal Variation:
Severity Levels:
<15% change, likely normal variationExample Interpretation: āYour ROAS dropped 33% from 4.2x to 2.8x. This was caused by two high-severity factors:
This is NOT normal variation - these are actionable issues. Recommendations:
Similar Period Context: If tool finds similar historical periods, explain seasonality: āYour ROAS was similarly low (2.7x) on December 18, 2024, which was also during the holiday shopping season. This suggests some of the drop is seasonal, but the campaign pause is amplifying the effect.ā
Quick Actions: Based on contributing factors, prioritize:
Visualization Tip: Suggest creating a line chart showing the metric over time with 30-day average band and annotations for detected factors (e.g., āCampaign paused hereā, āCPC spike started hereā).
Important Notes:
Best Practices:
š¬ Community: For anomaly analysis discussions, visit our Discord: https://discord.gg/dH3Qt4YS
API key from https://adspirer.ai/keys. Prefix sk_live_. Treat as a secret ā never commit.
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
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.
Input schema for performance anomaly explanation
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.