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

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_idNothe account, as returned by wa_list_accounts; omit it when the workspace has only one account

Output 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. Changed1 schema field changed
    • changedOutput schema / properties / refusal / properties / account_status / description
      Previous value: -"when the number is not working: its status — starting, not_running, whatsapp_down, suspended, pairing, unlinked or locked"New value: +"when the number is not working: its status — starting, not_running, whatsapp_down (telegram_down for a Telegram account), suspended, pairing, unlinked or locked"
  2. Changed3 schema fields changed
    • changedInput schema / properties / account_id / description
      Previous value: -"the account, as returned by wa_list_accounts"New value: +"the account, as returned by wa_list_accounts; omit it when the workspace has only one account"
    • changedInput schema / required
      Previous value: -[
      -  "account_id",
      -  "chat"
      -]New value: +[
      +  "chat"
      +]
    • addedOutput schema / properties / refusal / properties / candidates
      Added value: +{
      +  "description": "on an account_ambiguous refusal: the accounts to choose from — retry with one of these as account_id",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "account_id": {
      +        "description": "the id to retry with as account_id",
      +        "type": "string"
      +      },
      +      "name": {
      +        "description": "the account's WhatsApp display name",
      +        "type": "string"
      +      },
      +      "phone": {
      +        "description": "the account's phone number, E.164",
      +        "type": "string"
      +      },
      +      "status": {
      +        "description": "whether the number works right now — live, connecting, or why not, as wa_list_accounts reports it",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "account_id"
      +    ],
      +    "type": "object"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
  3. 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"
      +}
  4. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: the phone must be online, latency is usually seconds, loaded messages never trigger webhooks, and retention follows the plan's history window. This explains the non-idempotent, mutating nature (remote fetch + local store) that readOnlyHint=false only implies.

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?

Front-loaded with the action and its precondition, and every sentence carries information (latency, webhook suppression, retention, read path). Slightly dense at five sentences, but nothing is wasted.

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, and the description covers the operational requirements (phone online), side effects (webhook suppression), retention, and the follow-up read call. Nothing an agent needs to invoke it correctly is missing.

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 100%, so the schema already documents chat, count (1-500, default 50), and account_id. The description only restates 'in one conversation' and 'older messages' without adding format or edge-case semantics, so baseline 3 applies.

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 and resource: asks the account's phone for older messages in one conversation, before the oldest stored one, and stores them. This is clearly distinct from wa_list_messages and wa_get_chat, which are named explicitly as the read paths.

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?

Gives the triggering condition (paging back before the oldest stored message) and the prerequisite (the conversation needs at least one stored message). It also routes the agent to the follow-up tool ('Read the result with wa_get_chat') and flags that wa_list_messages only shows loaded messages with include_history=true.

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