Skip to main content
Glama

list_whatsapp_messages

Read-only

WhatsApp messages of the tenant's own Twilio sender, AS TWILIO SEES THEM — inbound and outbound, newest first, with delivery status and error code in plain words. This is where a customer's reply shows up even before connect_whatsapp_inbound is set, and where 'sent' turns out to be 'undelivered'. Optional: direction (inbound | outbound | both, default both), number (only the conversation with this E.164 number), since (ISO date), limit (default 20, max 100), include_body (default true). Read-only; twilio_direct tenants. WITH lead_id or contact_id instead: the WhatsApp history of that record from CallPilotAI's own timeline - every route (Beeper, Twilio, AI-Call-Bot), no bridge tool and no Twilio needed.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_whatsapp_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of entries to return
sinceNoOnly entries from this point in time on (ISO 8601)
numberNoE.164, e.g. +491701234567
lead_idNoHistory of this lead (timeline), any WhatsApp route.
directionNoOnly inbound, outbound or both (default both)
contact_idNoHistory of this contact (timeline), any WhatsApp route.
include_bodyNoAlso include body

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / direction / description
      Added value: +"Only inbound, outbound or both (default both)"
    • addedInput schema / properties / include_body / description
      Added value: +"Also include body"
    • addedInput schema / properties / limit / description
      Added value: +"Maximum number of entries to return"
    • addedInput schema / properties / since / description
      Added value: +"Only entries from this point in time on (ISO 8601)"
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, and the description is consistent ('Read-only; twilio_direct tenants'). Beyond that it discloses ordering (newest first), that rows carry delivery status and plain-word error codes, a default limit of 20 with a max of 100 that the schema does not state, and that the lead_id/contact_id mode bypasses the Twilio bridge entirely. Return shape details remain thin, which keeps it off a 5.

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 decision-relevant facts (Twilio-sender scope, newest first, read-only) are front-loaded, and the parameter list and alternative mode follow in a logical order. It is dense with caps and em dashes and slightly long for a single paragraph, but no sentence 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 seven optional parameters, no required fields and no output schema, the description carries the right load: it explains the two data sources, the filters, the defaults, ordering and what a result contains (status plus plain-word error code). An agent has enough to pick the mode and 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% and every parameter is documented inline, so the baseline is 3. The description adds some meaning — the max of 100 on limit, that number restricts to 'the conversation with this E.164 number', and that lead_id/contact_id switch the data source rather than merely filtering it — but most of the remaining prose restates values already in the schema.

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?

Opens with a specific verb+resource and an explicit scope: 'WhatsApp messages of the tenant's own Twilio sender, AS TWILIO SEES THEM — inbound and outbound'. It then distinguishes a second mode keyed on lead_id/contact_id versus the Twilio-sender mode, so an agent can tell it apart from siblings like list_whatsapp_senders or connect_whatsapp_inbound without opening any schema.

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 concrete usage context: this is where a customer reply appears before connect_whatsapp_inbound is configured, and where 'sent' may actually be 'undelivered'. It also explains the alternative mode (use lead_id/contact_id for CallPilotAI's own timeline across all routes, no Twilio needed). It stops short of naming a sibling to use instead for other message-history needs, so it is clear context without full exclusion guidance.

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.