Skip to main content
Glama
razvangirgiz

wazap-mcp

by razvangirgiz

Read messages from a WhatsApp chat

read_messages
Read-onlyIdempotent

Retrieve chat messages oldest to newest, load older history using before, and read recent status stories via chat_id "status".

Instructions

Read one chat, oldest to newest: the latest messages, or older ones with before (wazap asks the phone when the local history runs out). chat_id "status" reads the stories people posted, newest first, from the last hours (at most a day); they show nowhere else.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hoursNo"status" only: how far back, 24 by default
limitNo
typesNoOnly these types; limit counts them, so ["call"] gives that many calls
beforeNoThe oldest message_id you have
chat_idYesChat id from another tool, a phone number, or "status" for stories
account_idNoAccount id
include_previewsNoAttach a small image of each photo, up to 12

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
syncYes
countYes
hoursNo
notesNoCaveats to act on or tell the user
olderNobefore ran past the local history: the phone was asked, and sent this many
typesNo
chat_idYes
omittedNoOlder stories left out by limit
messagesYes
account_idYes
preview_countYes
unconfirmed_sendsNoSends WhatsApp has not echoed yet: outcome unknown, not failed

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv1.0.3
    • changedInput schema / properties / account_id / description
      Previous value: -"Registry account id (default, work, …). Omit to resolve from chat_id or message_id, or the default account."New value: +"Account id"
    • changedInput schema / properties / before / description
      Previous value: -"Return the messages immediately older than this message_id"New value: +"The oldest message_id you have"
    • changedInput schema / properties / chat_id / description
      Previous value: -"Chat id as returned by another tool (\"<digits>@s.whatsapp.net\" or \"<id>@g.us\"), or a phone number in international format"New value: +"Chat id from another tool, a phone number, or \"status\" for stories"
    • addedInput schema / properties / hours
      Added value: +{
      +  "description": "\"status\" only: how far back, 24 by default",
      +  "maximum": 24,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • changedInput schema / properties / include_previews / description
      Previous value: -"Attach a small JPEG of each photo, newest first, up to 12 per call, so you can see what was sent: the preview WhatsApp shipped when there is one, otherwise the photo is downloaded once and shrunk on the machine running wazap"New value: +"Attach a small image of each photo, up to 12"
    • removedInput schema / properties / limit / description
      Removed value: -"Maximum number of messages (1-200)"
    • changedInput schema / properties / types / description
      Previous value: -"Keep only these message types; omit for every type. The limit counts matching messages, so [\"call\"] returns that many calls, not that many messages of which some are calls."New value: +"Only these types; limit counts them, so [\"call\"] gives that many calls"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "account_id": {
      +      "type": "string"
      +    },
      +    "chat_id": {
      +      "type": "string"
      +    },
      +    "count": {
      +      "type": "number"
      +    },
      +    "hours": {
      +      "type": "number"
      +    },
      +    "messages": {
      +      "items": {
      +        "additionalProperties": true,
      +        "properties": {
      +          "chat_id": {
      +            "type": "string"
      +          },
      +          "message_id": {
      +            "type": "string"
      +          },
      +          "private": {
      +            "const": true,
      +            "description": "Tagged #private: no words",
      +            "type": "boolean"
      +          },
      +          "text": {
      +            "type": "string"
      +          },
      +          "timestamp": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "message_id",
      +          "chat_id",
      +          "text",
      +          "timestamp"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "notes": {
      +      "description": "Caveats to act on or tell the user",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "older": {
      +      "additionalProperties": false,
      +      "description": "before ran past the local history: the phone was asked, and sent this many",
      +      "properties": {
      +        "asked_phone": {
      +          "const": true,
      +          "type": "boolean"
      +        },
      +        "received": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "asked_phone",
      +        "received"
      +      ],
      +      "type": "object"
      +    },
      +    "omitted": {
      +      "description": "Older stories left out by limit",
      +      "type": "number"
      +    },
      +    "preview_count": {
      +      "type": "number"
      +    },
      +    "sync": {
      +      "type": "string"
      +    },
      +    "types": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "unconfirmed_sends": {
      +      "description": "Sends WhatsApp has not echoed yet: outcome unknown, not failed",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "draft_id": {
      +            "type": "string"
      +          },
      +          "handed_at": {
      +            "type": "string"
      +          },
      +          "state": {
      +            "const": "unknown",
      +            "type": "string"
      +          },
      +          "text": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "draft_id",
      +          "text",
      +          "handed_at",
      +          "state"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "chat_id",
      +    "count",
      +    "preview_count",
      +    "messages",
      +    "sync",
      +    "account_id"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changedv0.21.0
    • changedInput schema / properties / types / items / enum
      Previous value: -[
      -  "text",
      -  "image",
      -  "video",
      -  "audio",
      -  "voice",
      -  "document",
      -  "sticker",
      -  "location",
      -  "contact",
      -  "poll",
      -  "reaction",
      -  "deleted",
      -  "view_once",
      -  "call",
      -  "system",
      -  "unknown"
      -]New value: +[
      +  "text",
      +  "image",
      +  "video",
      +  "audio",
      +  "voice",
      +  "document",
      +  "sticker",
      +  "location",
      +  "contact",
      +  "poll",
      +  "reaction",
      +  "deleted",
      +  "view_once",
      +  "call",
      +  "event",
      +  "invite",
      +  "system",
      +  "unknown"
      +]
  3. Changed2 schema fields changedv0.15.0
    • addedInput schema / properties / account_id
      Added value: +{
      +  "description": "Registry account id (default, work, …). Omit to resolve from chat_id or message_id, or the default account.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / include_previews
      Added value: +{
      +  "default": false,
      +  "description": "Attach a small JPEG of each photo, newest first, up to 12 per call, so you can see what was sent: the preview WhatsApp shipped when there is one, otherwise the photo is downloaded once and shrunk on the machine running wazap",
      +  "type": "boolean"
      +}
  4. Changed1 schema field changedv0.10.0
    • addedInput schema / properties / types
      Added value: +{
      +  "description": "Keep only these message types; omit for every type. The limit counts matching messages, so [\"call\"] returns that many calls, not that many messages of which some are calls.",
      +  "items": {
      +    "enum": [
      +      "text",
      +      "image",
      +      "video",
      +      "audio",
      +      "voice",
      +      "document",
      +      "sticker",
      +      "location",
      +      "contact",
      +      "poll",
      +      "reaction",
      +      "deleted",
      +      "view_once",
      +      "call",
      +      "system",
      +      "unknown"
      +    ],
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  5. First observedv0.9.3

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=true, and destructiveHint=false, so the safety profile is covered. The description adds meaningful behavioral details: ordering (oldest to newest), the special 'status' mode behavior (newest first, limited to last hours up to a day), and the fact that it may query the phone when local history runs out. It also notes that stories appear only here, which is important context. No contradiction.

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 a compact two-sentence layout, front-loaded with the core behavior (read one chat oldest to newest), then covering the 'before' parameter, then the 'status' special case. Every clause adds meaning, and the structure is logical: main use, then variations. No filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (7 parameters, multiple modes, special 'status' behavior), the description covers the key usage scenarios (latest messages, older via before, status stories) and provides enough context for an agent to call it correctly. The output schema exists, so return values are already defined. Missing details like exact pagination behavior or limit default are in the schema, and the description handles the non-obvious parts.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 86%, with most parameters having descriptions (hours, types, before, chat_id, include_previews). The description adds extra meaning for key parameters: 'before' is clarified as the oldest message_id you have, 'status' chat_id is explained, and 'types' is explained with an example and the behavior that the limit counts them. Limit has no description in schema, but the description doesn't explicitly cover it, yet the overall value added is high.

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 clearly states it reads messages from a chat, with ordering (oldest to newest) and a special 'status' mode for stories. It distinguishes itself from siblings like get_status and get_message by covering both regular chats and the status feed, and mentions a unique capability (fetching older messages via 'before') that other tools likely lack.

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?

The description provides clear context for when to use 'status' (for stories, which 'show nowhere else') and mentions bridging local history gaps via 'before', but it doesn't explicitly state when NOT to use this tool versus alternatives like search, get_message, or wait_for_messages. It implies usage for reading messages but lacks exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.