Skip to main content
Glama
Maheidem

WAHA WhatsApp MCP Server

by Maheidem

Import WhatsApp Chat Export

whatsapp_import_chat
Idempotent

Import a WhatsApp chat export file to backfill historical messages into the message store without duplicating existing data.

Instructions

Import a WhatsApp chat export file (ZIP or TXT) into the message store.

Use this to backfill historical messages from WhatsApp's "Export Chat" feature. Only inserts new messages — won't overwrite or duplicate existing data.

The file should be a WhatsApp chat export:

  • ZIP file containing a .txt (standard WhatsApp export format)

  • Or a plain .txt file

The chat name is extracted from the filename (e.g., "Conversa do WhatsApp com NAME.zip"). You can override it with the chatName parameter.

Messages are matched to existing contacts by name. If a contact doesn't exist, it's created. If the chat already exists in the store (by name), messages are added to it.

Args:

  • filePath: Absolute path to the ZIP or TXT file on the server

  • chatName: Optional override for the chat name (extracted from filename if omitted)

Returns:

  • chat_name: Resolved chat name

  • total_parsed: Number of messages found in file

  • inserted: New messages added

  • skipped_duplicates: Messages already in store

  • senders: List of sender names found

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesAbsolute path to the WhatsApp export ZIP or TXT file on the server
chatNameNoOverride chat name (extracted from filename if omitted)
Behavior5/5

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

Beyond the annotations (idempotent, non-destructive), the description details behavior: filename extraction for chat name, contact matching/creation, and duplicate skipping. It also lists return fields, which is not in the output schema. No contradictions with annotations.

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?

Every sentence earns its place. The description is organized with paragraphs, a bullet list for file format, and clear 'Args' and 'Returns' sections. No redundancy or fluff.

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?

Given the tool's complexity (handling ZIP/TXT, contact matching, idempotency), the description covers all essential aspects. The output schema is absent but the return fields are listed in the description. The sibling set is addressed by the unique purpose.

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 100%, but the description adds meaning: explains filePath is an absolute path, chatName is an optional override, and describes how the chat name is extracted. This enriches the schema's short descriptions.

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?

The description uses a specific verb ('Import') and resource ('WhatsApp chat export file'), clearly stating it inserts messages into the message store. It distinguishes from siblings like 'whatsapp_read_messages' and 'whatsapp_send_text' by being the only tool for backfilling historical exports.

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?

The description explicitly advises using the tool to 'backfill historical messages from WhatsApp's 'Export Chat' feature.' It notes it only inserts new messages, implying it's not for overwriting. While no direct alternatives are named, the sibling list makes the context clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Maheidem/waha-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server