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 the chat settings are out of sync, tell the user it didn't work and suggest doing it in WhatsApp on their phone; only try again if the user asks.

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.6/5.0
Behavior5/5

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

Annotations already declare idempotent=true and destructive=false, but the description adds substantive context they cannot express: nothing is deleted, the action is reversible, other participants see no change, it works on the free plan, and it propagates to all linked devices. It also documents the failure mode and the recommended recovery, which is exactly the behavioral detail an agent needs before mutating remote state.

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?

Purpose is front-loaded and every sentence carries information: purpose, behavior, usage, return shape, error handling. The main cost is density — it is one long run-on block that bundles return-field documentation and error protocol into the same paragraph, which slightly hurts scannability.

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 takes on the burden of describing the return value, which it does thoroughly (`chat`, `status` with its three enumerated values, plus the contact field meanings and the JID needed for follow-up calls like send_message). Combined with the error-path guidance, nothing an agent needs to invoke and interpret this tool is missing.

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 coverage is 100%, so both `chat` and `archive` are already documented with their accepted formats and the default of true. The description restates the `archive: false` case but adds no syntax or format detail beyond what the schema supplies, so the baseline of 3 applies.

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 opening sentence gives a specific verb (archives/unarchives), a specific resource (a WhatsApp chat, person or group), and the device scope (phone and every linked device). It also distinguishes the operation from delete_chat by name, so an agent can separate the two 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?

It states the positive trigger explicitly ("when the user wants a chat out of their main list but kept") and names the alternative tool and condition that selects it ("to remove a conversation for good, use delete_chat"). It goes further and prescribes behavior on an out-of-sync response: report failure, suggest doing it in WhatsApp, and only retry if asked.

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.