Skip to main content
Glama

WhatsMCP: MCP for WhatsApp

Load Older Messages

wa_load_history

Ask the account's phone for older messages in one conversation, before the oldest one stored here, and store them. The phone must be online; it usually answers within seconds. Read the result with wa_get_chat and the same chat. Loaded messages are history: they never trigger webhooks and appear in wa_list_messages only with include_history=true. They are kept for your plan's history window like any other message. A conversation needs at least one stored message to page back from.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chatYesthe conversation to page back: a phone number for a direct chat, or a group JID (…@g.us)
countNohow many older messages to ask the phone for, 1-500; defaults to 50
account_idYesthe account, as returned by wa_list_accounts

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusYesok (the request reached the phone) or refused (nothing was asked)
refusalNopresent only when status is refused
answeredYesthe phone answered in time; false means it may still answer later (it must be online) — read the chat again in a minute
importedYesof those, how many were new here; 0 with answered=true usually means you reached the start of what the phone holds
receivedYesmessages the phone sent back

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

The annotations declare readOnlyHint=false, idempotentHint=false, and destructiveHint=false, but the description adds important behavior: loaded messages never trigger webhooks, require include_history=true in wa_list_messages, and are kept for the plan's history window. It also discloses the online-phone requirement and expected response time.

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?

The description is front-loaded with the core action and follows with tightly relevant operational details. Every sentence adds useful information: prerequisites, how to read results, webhook behavior, retention, and the paging precondition.

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 need not be explained. Combined with the rich schema, annotations, and description details, the definition tells an agent what the tool does, when it can run, what it changes, and how to retrieve the loaded messages.

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 description coverage is 100%, so chat, count, and account_id are already documented in the schema. The description adds only relationship context, such as reading with the same chat, rather than syntax, ranges, or defaults beyond what the schema provides.

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 states a specific action: ask the account's phone for older messages in one conversation, before the oldest stored message, and store them. It clearly distinguishes this from listing current messages by noting that loaded history appears in wa_list_messages only with include_history=true.

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?

It gives clear prerequisites: the phone must be online, and the conversation must already have at least one stored message. It also routes the agent to wa_get_chat with the same chat to read the loaded result, and explains how loaded history surfaces in wa_list_messages.

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