Skip to main content
Glama

Get chat

get_chat
Read-onlyIdempotent

Retrieve a specific WhatsApp chat from a local archive by JID and optionally include its latest message for conversation review.

Instructions

Get one chat by JID, with its latest message.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "chat_jid": "<chat_jid>"
    },
    "name": "get_chat"
  }
}

Input Schema

NameRequiredDescriptionDefault
chat_jidYesJID of the chat
include_last_messageNoinclude the latest message (default true)

Output Schema

NameRequiredDescriptionDefault
jidYeschat JID: x@s.whatsapp.net or x@lid for a person, x@g.us for a group
nameNogroup name or contact name; empty when unknown
is_groupYes
last_messageNothe newest stored message, when requested
last_message_timeNotimestamp of the newest stored message, UTC

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is fully covered. The description adds only that the latest message is bundled in, which largely repeats the include_last_message default already documented in the schema. It says nothing extra about failure modes (e.g. invalid or unknown JID) or ordering behavior.

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?

A single front-loaded sentence with the resource and key stated first and the message-inclusion detail last; nothing is wasted. The trailing clause slightly duplicates the schema's include_last_message default, keeping it just below maximum.

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?

With an output schema present, rich annotations, and fully documented parameters, the description needn't explain return values or safety. What remains missing is routing context against the several chat-lookup siblings, which is the one thing structured fields cannot supply.

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 both chat_jid and include_last_message are already documented with types and the default. The description restates the same two ideas without adding format details (JID syntax, whether the flag can suppress message fetching) beyond the schema. Baseline 3 is appropriate when the schema carries the semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (get one chat) plus the lookup key (JID) and scope (single chat, latest message included). It is clear what the tool returns, but it never distinguishes itself from siblings like get_direct_chat_by_contact, get_contact_chats, or list_chats, which an agent could easily confuse with it.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance, no mention of prerequisites (e.g. connection state), and no pointer to alternatives for retrieving chats or messages. The phrase 'by JID' only implies that the caller must already know the identifier; it does not say how to obtain one or when to prefer this over the sibling lookups.

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