Skip to main content
Glama

archive_chat

Idempotent

Archives a WhatsApp chat (a person or a group), or unarchives it with archive: false, on the user's phone and every linked device, like "Archive chat" on the phone. Works on the free plan. Nothing is deleted and it can be undone; the other people in the chat see nothing. Use it when the user wants a chat out of their main list but kept; to remove a conversation for good, use delete_chat. Returns { chat, status (archived, unarchived or failed) }, with the contact fields (name; name_source: address_book, push_name, group_subject, business, phone or unresolved; canonical_jid: the JID to pass to send_message and read_chat_history; phone_jid and lid_jid: the chat's phone-number and LID forms, null when unknown or for groups; phone_display: the number as +). If it answers that WhatsApp is re-syncing, ask the user to open WhatsApp on their phone and try again in a minute.

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": "archive_chat"
  }
}

Input Schema

NameRequiredDescriptionDefault
chatYesThe chat to archive: a contact name, a phone number with country code, a group's exact name, or a chat JID (person, @lid or group).
archiveNoOptional, default true. true archives the chat; false unarchives it (moves it back to the main chat list).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

Beyond the annotations it discloses that nothing is deleted, the action is undoable, other participants see no notification, and the change propagates to all linked devices — exactly the kind of non-obvious behavior an agent needs. It also describes the failure mode (WhatsApp re-syncing) with a recovery instruction. It does not cover rate limiting or what happens if the chat name is ambiguous, so it falls just short of 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.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The action and its inverse are front-loaded, which is good, but the single paragraph then crams in a dense return-shape enumeration with six field glosses. That detail is useful but could be split or trimmed; as written it is a wall of prose that is harder to scan than it needs to be.

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?

There is no output schema, so the description carries the return contract and does so fully: status enum, chat fields, null conditions for groups, and phone_display formatting. Combined with the undo semantics and the re-sync recovery path, an agent has everything needed to call it and interpret the result.

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 coverage is 100%, so the baseline is 3, but the description adds real meaning: it spells out that `archive: false` moves the chat back to the main list, and it explains the identifier forms in the returned fields (canonical_jid for send_message/read_chat_history, phone_jid vs lid_jid), which clarifies what a `chat` value ultimately resolves against.

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 and resource (archives/unarchives a WhatsApp chat, person or group), names the `archive: false` inversion, and scopes it to the user's phone plus every linked device. An agent can distinguish this from delete_chat without opening either schema.

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 an explicit when-to-use condition ("user wants a chat out of their main list but kept") and names the alternative with its own condition ("to remove a conversation for good, use delete_chat"). It also notes the free-plan constraint, which is a real eligibility gate.

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.