compare_periods
Compare two N-day windows to detect per-company and agency-wide changes in call volume and minutes, revealing growth, shrinkage, and billing anomalies.
Instructions
Compare current N-day window vs the previous N-day window.
Returns per-company minute / call deltas + agency-wide totals. Useful for "is Malick growing?", "did we lose Stewart traffic this month?", catching invoice surprises before they hit.
Args: days: Window length on each side (default 30 = roughly one cycle). Cap: 365 (don't ask for "5-year delta" — likely a typo). account_id: Auto-resolves if omitted.
Returns: A breakdown showing current vs previous totals, % deltas, and per-company growth/shrink. Sorted by absolute minute change.
Implementation: pulls call data for both windows in one tool call. Tracker counts use current-snapshot for both periods (CallRail doesn't expose historical tracker counts) — only minute deltas reflect actual period-over-period change.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | ||
| account_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |