Conversation stats
- Permission required
metrics.view
When to use it
Numbers for your organization's conversations in a period: total, average duration, needs-human, feedback, tool calls and failures, grouped by channel, day, status, centre, outcome, topic or assigned person. Respects your centres.
Input
| Field | Type | Description |
|---|---|---|
organization_id | integer | Only to repeat your organization (or, with an Autonex staff key, pick another one) |
date_from | string | From (default: 30 days ago) (YYYY-MM-DD, UTC) |
date_to | string | To, inclusive (default: today) (YYYY-MM-DD, UTC) |
group_by | "channel" | "day" | "status" | "location" | "outcome" | "topic" | "assigned_agent" | Group by channel, day, status, centre, outcome, topic or assigned person (default channel) |
channel | "voice" | "whatsapp" | "web" | "instagram" | "facebook" | |
location_id | integer |
Every tool also accepts lang (es | en) for the language of the text answer.
Output
| Field | Type | Description |
|---|---|---|
periodRequired | object | |
period.fromRequired | string | |
period.toRequired | string | |
totalsRequired | object | |
totals.conversationsRequired | number | |
totals.avg_duration_secondsRequired | number | null | |
totals.needs_humanRequired | number | |
totals.feedback_positiveRequired | number | |
totals.feedback_negativeRequired | number | |
totals.tool_callsRequired | number | |
totals.tool_calls_failedRequired | number | |
group_byRequired | "channel" | "day" | "status" | "location" | "outcome" | "topic" | "assigned_agent" | |
groupsRequired | object[] | |
groups[].keyRequired | string | null | |
groups[].labelRequired | string | null | |
groups[].conversationsRequired | number | |
groups[].avg_duration_secondsRequired | number | null | |
groups[].needs_humanRequired | number | |
data_as_ofRequired | string |
Examples
Example 1: Conversations per day last week
Call
{
"name": "get_conversation_stats",
"arguments": {
"date_from": "2026-11-16",
"date_to": "2026-11-22",
"group_by": "day"
}
}Equivalent JSON-RPC call (POST /mcp)
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_conversation_stats",
"arguments": {
"date_from": "2026-11-16",
"date_to": "2026-11-22",
"group_by": "day"
}
}
}