Skip to main content
Glama
HardikCoder45

WhatsApp MCP Server

fetch_message_history

Retrieve older WhatsApp messages from an allowlisted chat. Use beforeMessageId to page backward when you need previous conversation history.

Instructions

Pull older messages for an allowlisted chat using Baileys fetchMessageHistory. Use beforeMessageId to page backward.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
chatIdYes
beforeMessageIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the 'allowlisted chat' constraint and names the underlying mechanism (Baileys fetchMessageHistory), but says nothing about pagination termination, limits, failure behavior, or what happens when beforeMessageId is omitted.

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

Conciseness5/5

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

Two short sentences, front-loaded with the action and scope, followed by the key paging instruction. No filler.

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

Completeness3/5

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

For a 3-param tool with no annotations, no output schema, and 0% parameter coverage, the description covers the essential paging flow but omits limit semantics and any return/behavioral detail. Adequate but with clear gaps.

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

Parameters3/5

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

Schema coverage is 0%, so the description must compensate. It explains beforeMessageId's purpose (page backward) and implicitly scopes chatId to allowlisted chats, but the limit parameter's semantics (default, max 100) are left entirely to the schema with no added meaning.

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?

States a specific verb (pull) and resource (older messages) and scopes it to an 'allowlisted chat', which distinguishes it from search_messages and read_messages that operate on current messages. It does not explicitly name a sibling, so it falls just short of the top score.

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?

Clear usage context: fetch older messages and use beforeMessageId to page backward, implying it is the pagination/backfill tool rather than the search tool. No explicit when-not condition or named alternative is given.

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