Skip to main content
Glama

WhatsMCP: MCP for WhatsApp

Get Message

wa_get_message
Read-only

Fetch ONE stored message from one of your accounts, by WhatsApp's message_id (as a webhook delivery or wa_list_messages gave it) or by its cursor. Use this to read the message a webhook told you about, or the one you are about to react to, edit or delete, without paging through history.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cursorNothe message's cursor, as wa_list_messages returned it (a webhook delivery carries it as message_seq). Pass this or message_id
account_idYesthe account the message belongs to, from wa_list_accounts
message_idNoWhatsApp's id for the message — the message_id a webhook delivery, wa_list_messages or wa_send_message gave you. Pass this or cursor

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageNothe message; absent when the request was declined
refusalNopresent only when the request was declined — including when no such message is stored

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedOutput schema / properties / message / properties / account_name
      Added value: +{
      +  "description": "the WhatsApp display name of that account",
      +  "type": "string"
      +}
    • addedOutput schema / properties / message / properties / account_phone
      Added value: +{
      +  "description": "the phone number of your account this message was sent from or received on, E.164",
      +  "type": "string"
      +}
    • addedOutput schema / properties / message / 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 / message / 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 / message / 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"
      +}
  2. Changed1 schema field changed
    • addedOutput schema / properties / message / 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"
      +}
  3. Changed1 schema field changed
    • addedOutput schema / properties / message / properties / imported
      Added value: +{
      +  "description": "true for a message loaded as history (pairing sync or wa_load_history) rather than received live",
      +  "type": "boolean"
      +}
  4. Added

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so safety is covered by structured data. The description adds the provenance of the identifiers (webhook / wa_list_messages / wa_send_message) which is genuinely useful context, but says nothing about not-found behavior, error cases, or whether message_id is unique across accounts. With annotations covering the safety profile, a 3 is appropriate.

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?

Two sentences, front-loaded with the verb and resource, then the use case. Zero filler and no repetition of schema fields.

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?

Output schema exists so return values need no explanation; annotations cover safety; schema covers parameters. The description adds the one thing structured data cannot: when to reach for this tool versus paging the list. Nothing an agent needs to call 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 account_id, message_id and cursor, including the either/or relationship. The description reinforces the webhook name mapping (message_seq -> cursor) but adds little beyond the schema. Baseline 3 when schema does the heavy lifting.

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 ('Fetch ONE stored message') with the two identifiers it accepts and where those identifiers come from. 'Fetch ONE' explicitly distinguishes it from the sibling wa_list_messages, which pages through 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 explicit when-to-use scenarios ('read the message a webhook told you about, or the one you are about to react to, edit or delete') and an explicit when-not-to ('without paging through history'), implicitly routing to wa_list_messages for enumeration.

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