Skip to main content
Glama

get_chat

Read-only

Look up a WhatsApp chat by JID, phone number, or name to retrieve its JIDs, group status, and recent messages; returns found=false if the chat is absent.

Instructions

Returns found=false for a chat absent from the store. Otherwise returns its name, all JIDs, group flag and the most recent messages.

chat may be a JID, a phone number with country code, or a chat or contact name.

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": "<chat>"
    },
    "name": "get_chat"
  }
}

Input Schema

NameRequiredDescriptionDefault
chatYes
recentNo
accountNoAccount from list_accounts when several WhatsApp numbers are set up; default: default

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so safety is covered. The description adds genuinely useful behavior beyond that: a missing chat yields found=false rather than an error, and it discloses the returned shape. It stops short of noting pagination or how many messages 'most recent' means by default.

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?

Two short sentences with the not-found case front-loaded, and no filler. The identifier-format sentence is dense but earns its place; minor awkwardness from the inline code formatting and trailing newline keeps it from a 5.

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, the description needn't document return values in detail, and it correctly focuses on the not-found contract and identifier formats. The one thing an agent would still want — what `recent` controls and its default — is not covered in the description.

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 only 33% (only `account` is documented), so the description has to compensate. It does well for `chat`, spelling out that it accepts a JID, a country-code phone number, or a chat/contact name, but `recent` is never mentioned and its default of 5 is left to the schema, leaving a real gap.

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?

The description names a specific verb and resource ('Returns ... a chat') and enumerates the returned fields (name, all JIDs, group flag, recent messages), so the agent knows exactly what lookup this performs. It does not explicitly differentiate itself from siblings like list_chats or get_message_context, which keeps it short of a 5.

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 statement of when to use this tool versus alternatives such as list_chats (bulk listing) or get_message_context (thread context). Usage is only implied by the accepted identifier formats; no exclusions or routing guidance is given.

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