Skip to main content
Glama

chat_analytics

Idempotent

Analyze a WhatsApp chat to measure message volume, reply speed, message types, tone, topics, group roles, and capture gaps over a selected time range.

Instructions

How a conversation works, from the numbers: who writes how much and when, reply speed both ways, message length, emoji, stickers, media, voice notes, quotes, deferred replies, formality, alphabet mix, requests and promises, phrases typical for this chat compared to my other chats, roles in a group, and what the bridge cannot see.

chat: JID, phone number or name (the phone and LID chats of one person are merged). after/before: unix seconds, YYYY-MM-DD or ISO 8601. sections: subset of volume, reply_speed, length, emoji, stickers, reactions, media, voice, quotes, deferrals, formality, script, topics_tasks, phrases, group_roles, capture_gaps. detail: brief, normal or full. refresh: ignore the cache. report: also write a Markdown report to exports_dir. Returns summary, meta and sections ({n, low_data, data, examples}); examples are masked and never contain secret-looking text.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "chat": "<chat>"
    },
    "name": "chat_analytics"
  }
}

Input Schema

NameRequiredDescriptionDefault
chatYes
afterNo
beforeNo
detailNonormal
reportNo
accountNoAccount from list_accounts when several WhatsApp numbers are set up; default: default
refreshNo
sectionsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations say readOnlyHint=false, which could puzzle an agent for an analytics call; the description resolves this by explaining that 'report' also writes a Markdown file to exports_dir. It further discloses caching behavior ('refresh: ignore the cache'), masking of examples, merged phone/LID chats, and limitations ('what the bridge cannot see', 'capture_gaps'). That is substantive behavior beyond the annotations, though cost/latency expectations for full detail are not stated.

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

Conciseness3/5

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

The parameter block is compact and front-loaded, but the opening sentence is a long unordered metric enumeration that largely duplicates the later 'sections' list, so the same content is effectively stated twice. It is readable but wastes space that could have been spent on sibling differentiation.

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?

For an 8-parameter analytics tool with an output schema, the description covers input formats, the section selector vocabulary, caching, side effects, and privacy handling of examples. Return shape is only sketched ('summary, meta and sections'), which is acceptable given the output schema exists.

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

Parameters5/5

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

Schema coverage is only 13%, so the description must carry the parameter burden, and it does: 'chat' accepts JID, phone number or name with merging semantics, 'after'/'before' accept unix seconds, YYYY-MM-DD or ISO 8601, 'sections' is spelled out as an explicit list of valid values, 'detail' enumerates brief/normal/full, and 'refresh'/'report' are explained behaviorally. The only gap is 'account', which is documented in the schema itself.

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

Purpose4/5

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

The first sentence names a concrete verb domain (compute statistics about 'How a conversation works') and enumerates the exact metric families covered, so an agent knows precisely what this produces. It does not distinguish itself from the sibling chat_analytics_compare, which remains an unpriced ambiguity, so it stops short of a 5.

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

Usage Guidelines3/5

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

Usage is implied through the selector parameters: pick a subset of 'sections', choose 'detail' of brief/normal/full, and set 'refresh' to bypass the cache. There is no explicit statement of when to use this versus chat_analytics_compare, get_chat, or export_chat, and no prerequisites or exclusions are given.

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