Skip to main content
Glama

Get Chat

wa_get_chat
Read-only

Read the most recent messages for one WhatsApp account, oldest first — or, with chat, one conversation, including older history loaded with wa_load_history. Use this for context before replying; use wa_list_messages to page through everything new. Narrow with since/until (when sent; until is exclusive).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chatNoread ONE conversation — a phone number or a group JID — including history loaded with wa_load_history; omit for the account's most recent messages across all chats
limitNohow many recent messages, 1-200; defaults to 50
sinceNoonly messages sent at or after this time: RFC3339 with a zone (2026-10-01T09:00:00+03:00) or a date (2026-10-01 = midnight UTC); omit for no lower bound
untilNoonly messages sent BEFORE this time — exclusive, so all of 1 October is since 2026-10-01 until 2026-10-02; same formats as since; omit for no upper bound
account_idYesthe account whose conversation to read, from wa_list_accounts

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountNothe account this conversation was read from
refusalNopresent only when the request was declined
has_moreNotrue when older messages match than were returned; page them with wa_list_messages(account_id, chat, since, until, include_history=true)
messagesYesrecent messages for this account, oldest first
account_noticesNopresent when a number this read covers is not working: new messages are not arriving on it; says why and what to do

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / messages / items / properties / kind / description
      Previous value: -"what the message is: text, image, video, audio, document, sticker, reaction, location, live_location, contact, poll, poll_vote, video_note, album, event, comment, pin, group_invite or template; other is a type this server does not classify. text carries a body, and so do image/video/document captions and template text; an image, video, audio, document or sticker attachment can be fetched with wa_get_media"New value: +"what the message is: text, image, video, audio, document, sticker, reaction, location, live_location, contact, poll, poll_vote, video_note, album, event, comment, pin, group_invite, template or call_permission; other is a type this server does not classify. text carries a body, and so do image/video/document captions, template text and a call_permission request or answer; an image, video, audio, document or sticker attachment can be fetched with wa_get_media"
  2. Changed4 schema fields changed
    • addedOutput schema / properties / account_notices
      Added value: +{
      +  "description": "present when a number this read covers is not working: new messages are not arriving on it; says why and what to do",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "account_id": {
      +        "description": "the account this notice is about",
      +        "type": "string"
      +      },
      +      "message": {
      +        "description": "what is wrong and what to do; tell the user",
      +        "type": "string"
      +      },
      +      "since": {
      +        "description": "when it stopped working, RFC3339, when known",
      +        "type": "string"
      +      },
      +      "status": {
      +        "description": "why it is not live: starting, not_running, whatsapp_down, suspended, pairing, unlinked or locked",
      +        "type": "string"
      +      },
      +      "status_reason": {
      +        "description": "the detail, e.g. no_egress, no_plan, stopped",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "account_id",
      +      "status",
      +      "message"
      +    ],
      +    "type": "object"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
    • 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"
      +}
  3. Changed3 schema fields changed
    • addedInput schema / properties / since
      Added value: +{
      +  "description": "only messages sent at or after this time: RFC3339 with a zone (2026-10-01T09:00:00+03:00) or a date (2026-10-01 = midnight UTC); omit for no lower bound",
      +  "type": "string"
      +}
    • addedInput schema / properties / until
      Added value: +{
      +  "description": "only messages sent BEFORE this time — exclusive, so all of 1 October is since 2026-10-01 until 2026-10-02; same formats as since; omit for no upper bound",
      +  "type": "string"
      +}
    • addedOutput schema / properties / has_more
      Added value: +{
      +  "description": "true when older messages match than were returned; page them with wa_list_messages(account_id, chat, since, until, include_history=true)",
      +  "type": "boolean"
      +}
  4. Changed3 schema fields changed
    • addedOutput schema / properties / account
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "the account this conversation was read from",
      +  "properties": {
      +    "account_id": {
      +      "description": "the id to pass to other wa_ tools",
      +      "type": "string"
      +    },
      +    "name": {
      +      "description": "the account's WhatsApp display name",
      +      "type": "string"
      +    },
      +    "phone": {
      +      "description": "the account's phone number, E.164",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "account_id"
      +  ],
      +  "type": [
      +    "null",
      +    "object"
      +  ]
      +}
    • addedOutput schema / properties / messages / items / properties / account_name
      Added value: +{
      +  "description": "the WhatsApp display name of that account",
      +  "type": "string"
      +}
    • addedOutput schema / properties / messages / items / properties / account_phone
      Added value: +{
      +  "description": "the phone number of your account this message was sent from or received on, E.164",
      +  "type": "string"
      +}
  5. Changed3 schema fields changed
    • addedOutput schema / properties / messages / items / properties / attachment
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "present on an image, video, audio, document or sticker message: the file's mime type, size and name; fetch the bytes with wa_get_media",
      +  "properties": {
      +    "available": {
      +      "description": "true when the file should be fetchable with wa_get_media(account_id, message_id) — a live received attachment; false for history and for files you sent, which are not kept",
      +      "type": "boolean"
      +    },
      +    "file_name": {
      +      "description": "documents only: the file name the sender gave it",
      +      "type": "string"
      +    },
      +    "mime": {
      +      "description": "the attachment's mime type as the sender declared it, e.g. image/jpeg or application/pdf; empty for a message stored before this was recorded",
      +      "type": "string"
      +    },
      +    "size": {
      +      "description": "the attachment's size in bytes as the sender declared it; 0 when unknown",
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "available"
      +  ],
      +  "type": [
      +    "null",
      +    "object"
      +  ]
      +}
    • addedOutput schema / properties / messages / items / properties / received_at
      Added value: +{
      +  "description": "when this server received and stored the message, RFC3339; later than at for a message delivered late or loaded as history",
      +  "type": "string"
      +}
    • addedOutput schema / properties / messages / items / properties / sender_name
      Added value: +{
      +  "description": "who wrote the message, by name: for inbound the sender's name as saved in this account's contacts, or else the name they chose for themselves; for outbound this account's own WhatsApp name. Empty when no name is known",
      +  "type": "string"
      +}
  6. Changed1 schema field changed
    • addedOutput schema / properties / messages / items / properties / status
      Added value: +{
      +  "description": "delivery status of an outbound message from the provider's receipts: sent, delivered, read or failed; empty when no receipt has arrived (or for inbound). Only Business (Cloud API) numbers report this today",
      +  "type": "string"
      +}
  7. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true/idempotentHint=false, so the safety profile is covered. The description adds non-annotation value: result ordering (oldest first), the inclusion of history loaded via wa_load_history, and the filter semantics of since/until. It does not discuss pagination or result size limits, which is a minor gap.

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?

One dense sentence that front-loads the core capability before the alternatives. Every clause carries meaning, though the em-dash branching makes it slightly harder to parse than a clean split into two sentences.

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 described. The description covers mode selection, ordering, history inclusion, time filtering, and the alternative tool — everything needed 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 all five parameters are already documented in-schema, making 3 the baseline. The description restates the since/until narrowing and the exclusivity of 'until', which the schema already spells out, so it adds little beyond the structured fields.

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 (read) and resource (most recent messages / one conversation) and explains the dual mode via the optional 'chat' parameter. It explicitly differentiates itself from the sibling wa_list_messages and mentions wa_load_history for older history.

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 a clear when-to-use ('this for context before replying') and names the alternative with its own condition ('use wa_list_messages to page through everything new'). The routing decision is fully inferable without opening either schema.

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