Skip to main content
Glama

Analyze WhatsApp activity

get_analytics
Read-onlyIdempotent

Get WhatsApp analytics data: KPIs, activity patterns, rankings, response times, call stats, labels, emojis, words, countries, and more. Supports section-based drill-down, date range filtering, chat/label/community filters, pagination, and chat/contact exports.

Start with section="overview" (default) for a compact summary, then drill into specific sections.

Sections: overview — High-level summary with top 5 chats (~5KB) kpis — Core + account KPIs + account overview activity — Daily/hourly/weekday/monthly + sent/received + message types rankings — Top chats/groups/DMs/senders (paginated) response_times — Avg/median/fastest/slowest + by-hour + by-chat calls — Call statistics (total/answered/missed/video/voice) labels — Labels (business) or Lists (personal) with chat counts emojis — Top emojis (paginated) words — Top words (paginated) countries — Contact country distribution silences — Longest-inactive chats channels — Newsletter/channel details + subscriber counts communities — Community details + sub-groups conversation_starters — Who starts conversations, night msgs, unanswered streaks — Current/longest streak + last active date gaps — Conversation gaps (>1 day silence periods) organization — Pinned/archived/muted/unread chat lists chat_detail — Full analytics for ONE specific chat (requires chat_id) export_chat — Export chat messages in format (requires chat_id + format) export_contacts — Export contacts in format (requires format) community_growth — Community member count history over time channel_growth — Channel subscriber count history over time

Examples: Overview: {} Rankings: { section: "rankings", chat_type: "group", limit: 5 } Filter by label: { section: "activity", label: "Family" } Chat detail: { section: "chat_detail", chat_id: "120363406792713578@g.us" } Export CSV: { section: "export_chat", chat_id: "...", format: "csv", limit: 100 } Export contacts: { section: "export_contacts", format: "vcf" }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelNoFilter by label/list name or ID
limitNoMax items for paginated sections (default 20, max 500)
queryNoSearch keyword — filter analytics to only messages containing this text. Shows activity patterns for conversations mentioning a topic.
formatNoExport format (required for export_chat/export_contacts)
offsetNoSkip N items for pagination
chat_idNoFilter to specific chat. Required for chat_detail/export_chat
date_toNoCustom end date (ISO 8601) — overrides date_range
sectionNoAnalytics section to retrieveoverview
chat_typeNoFilter rankings by chat type
communityNoFilter by community name or ID
date_fromNoCustom start date (ISO 8601) — overrides date_range
date_rangeNoPreset date range (default: "30d")
target_sessionNoSession ID for multi-account routing
include_transcriptionsNoInclude audio transcriptions in exports (default true)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultNoThe JSON-compatible result returned by the Kaption extension

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/non-destructive, so safety is covered. The description adds real behavioral context beyond them: per-section payload size (~5KB for overview), which sections are paginated, and which parameters each mode requires. It does not discuss auth, rate limits, or truncation behavior for large exports, which keeps it off a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the summary and usage pattern before the long section catalog, and every sentence earns its place. The 22-entry section list is long but is the necessary payload of this tool; slight redundancy between the section list and the examples.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return values needn't be described, and the description compensates for the tool's complexity by covering section semantics, defaults, requirements per mode, pagination, and concrete invocation examples. Nothing an agent needs to select and call this correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% so the baseline is 3, but the description genuinely adds meaning: it explains what each section value returns, that paginated sections honor limit/offset, and shows parameters in context via examples (chat_type only affects rankings, format is required for exports). That is more than restating the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Get WhatsApp analytics data') and enumerates exactly what data domains are covered. The section list makes it trivially distinguishable from siblings like summarize_conversation or query, since it owns the analytics surface.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly prescribes the workflow: 'Start with section="overview" (default) for a compact summary, then drill into specific sections.' It also names the conditions for sub-modes (chat_detail requires chat_id, exports require format) and provides six worked examples covering filtering, drill-down, and export paths.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources