Skip to main content
Glama

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. Changed3 schema fields changed
    • addedOutput schema / properties / refusal / properties / account_status
      Added value: +{
      +  "description": "when the number is not working: its status — starting, not_running, whatsapp_down, suspended, pairing, unlinked or locked",
      +  "type": "string"
      +}
    • addedOutput schema / properties / refusal / properties / account_status_reason
      Added value: +{
      +  "description": "the detail of account_status, e.g. no_egress, stopped, no_plan",
      +  "type": "string"
      +}
    • addedOutput schema / properties / refusal / properties / since
      Added value: +{
      +  "description": "when the number stopped working, RFC3339, when known",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare readOnly=false, idempotent=false, destructive=false; the description goes well beyond by disclosing that the phone must be online, that it usually answers within seconds, that loaded messages never trigger webhooks, that they surface only with include_history=true, and that they count against the plan's history window.

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?

The most important constraint (phone must be online) is front-loaded and each sentence carries distinct information about behavior, retention, and prerequisites. It is somewhat dense at five sentences but none is filler.

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?

With an output schema present, return values need not be explained. The description covers prerequisites, latency expectation, webhook/visibility side effects, and retention, which is everything an agent needs to call it correctly.

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 the schema already documents chat (phone number or group JID) and count (1-500, default 50). The description adds no syntax or format detail beyond what the schema provides, so baseline 3 is appropriate.

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: ask the account's phone for older messages in one conversation and store them. The phrase 'before the oldest one stored here' precisely delimits it from wa_list_messages, and it points to wa_get_chat for reading the result, so an agent can distinguish it from siblings without opening schemas.

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 clear context for use ('page back' older history) and a prerequisite ('a conversation needs at least one stored message'), plus the read-back workflow via wa_get_chat. It stops short of stating when NOT to use it versus alternatives, but the routing is largely explicit.

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