Skip to main content
Glama

get_analytics

Read-only

Retrieve WhatsApp analytics such as KPIs, activity patterns, rankings, response times, calls, labels, and countries. Filter by date, chat, label, or community and export chats or contacts.

Instructions

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)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.6

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety is covered. The description adds real behavioral context beyond that: per-section prerequisites (chat_id for chat_detail, format for exports), approximate payload size (~5KB for overview), and pagination scope — but says nothing about rate limits or export delivery mechanics.

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 one-line scope, then the workflow tip, then the section reference and examples — a sensible order. The 22-entry section list is long but each entry adds semantic detail the enum alone cannot convey, so it largely earns its space.

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

Completeness4/5

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

For a 22-mode tool with no output schema, it covers prerequisites, pagination, filtering, exports, and approximate result sizes well. It stops short of describing the shape of export output (e.g., whether a file or inline payload is returned), which is the remaining gap given no output schema exists.

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 goes further by mapping parameters to sections (label filter on 'activity', chat_type on 'rankings', limit on paginated sections) via worked examples. This meaningfully clarifies how the 14 optional parameters interact with the section enum.

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+resource ('Get WhatsApp analytics data') and enumerates the exact scope (KPIs, activity, rankings, response times, exports, growth history). An agent can distinguish this from siblings like summarize_conversation or query purely from the description.

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

Usage Guidelines4/5

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

Gives explicit entry-point guidance ('Start with section="overview" (default) ... then drill into specific sections') plus six concrete invocation examples covering filtering, chat_detail, and exports. It does not, however, say when to prefer this tool over the sibling export_contacts or query, leaving one overlap unresolved.

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