MCPDocumentation
On this page

Conversations

Conversation stats

get_conversation_stats
Read
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

FieldTypeDescription
organization_idintegerOnly to repeat your organization (or, with an Autonex staff key, pick another one)
date_fromstringFrom (default: 30 days ago) (YYYY-MM-DD, UTC)
date_tostringTo, 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_idinteger

Every tool also accepts lang (es | en) for the language of the text answer.

Output

FieldTypeDescription
periodRequiredobject
period.fromRequiredstring
period.toRequiredstring
totalsRequiredobject
totals.conversationsRequirednumber
totals.avg_duration_secondsRequirednumber | null
totals.needs_humanRequirednumber
totals.feedback_positiveRequirednumber
totals.feedback_negativeRequirednumber
totals.tool_callsRequirednumber
totals.tool_calls_failedRequirednumber
group_byRequired"channel" | "day" | "status" | "location" | "outcome" | "topic" | "assigned_agent"
groupsRequiredobject[]
groups[].keyRequiredstring | null
groups[].labelRequiredstring | null
groups[].conversationsRequirednumber
groups[].avg_duration_secondsRequirednumber | null
groups[].needs_humanRequirednumber
data_as_ofRequiredstring

Examples

Example 1: Conversations per day last week

Call

JSON
{
  "name": "get_conversation_stats",
  "arguments": {
    "date_from": "2026-11-16",
    "date_to": "2026-11-22",
    "group_by": "day"
  }
}

Equivalent JSON-RPC call (POST /mcp)

JSON
{
  "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"
    }
  }
}