summarize_calls
Aggregate call history into grouped counts and durations, returning totals and averages for a specified time window without individual records.
Instructions
Summarize / report on call history — grouped counts and totals over a window.
USE THIS for any "summarize", "report", "breakdown", "how many calls by X", "stats", or "totals" request. Returns aggregated counts + durations grouped by a field — NOT individual records. Prefer this over list_history_conferences / list_history_participants whenever the user wants aggregates rather than a raw list; it walks pagination internally and is far cheaper on context and tool calls than fetching individual records.
Args: start_time: Lower bound (inclusive) on start_time. UTC ISO 8601 required. end_time: Upper bound (exclusive) on start_time. UTC ISO 8601 required. group_by: One of "call_direction", "call_quality", "protocol", "service_tag", "system_location", "conference_name", "disconnect_reason", "vendor". conference_name: Restrict to one conference name. service_tag: Restrict to one tag. call_direction: "in" or "out" — useful when group_by is something else. location: system_location filter (name or id). max_records: Hard cap on participants fetched. Defaults to 10,000 (the platform retention limit).
Returns: { "total_calls": int, "total_duration_seconds": int, "average_duration_seconds": float, "time_range": {"start": ..., "end": ...}, "group_by": str, "groups": {: {"count": int, "duration_seconds": int}, ...}, "truncated": bool # true if max_records was hit before exhausting results }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_time | Yes | ||
| group_by | No | call_direction | |
| location | No | ||
| start_time | Yes | ||
| max_records | No | ||
| service_tag | No | ||
| call_direction | No | ||
| conference_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||