socialmate-mcp

v1.3.0
socialmate-mcp Checked 3 days ago Published 15 days ago

Model Context Protocol server for SocialMate — let Claude Desktop, Cursor and any MCP client control WhatsApp through your self-hosted SocialMate server.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

whatsapp_list_accounts

Lists the WhatsApp accounts this API key can use, with each account's id and live connection state. Call this first if you have more than one account, then pass an account_id to the other tools. Returns an array of accounts.

whatsapp_send_message

Sends a WhatsApp text message to one chat. Returns { sent: true, messageId, chatId, timestamp, status } when it went out immediately. Read `status` — but know what it means: at send time it is only "pending"/"sent", i.e. the message was handed to WhatsApp, NOT that it arrived. It advances to "delivered" (it reached their phone) and then "read" (they opened it) later. So never tell anyone a message was delivered on the strength of this result. Learn the real outcome either from the `message.delivered` / `message.read` webhooks (they carry messageId + status, via the n8n Trigger or your own re…

ParameterTypeDescription
chat_id *stringRecipient WhatsApp id: a phone number in full international format including country code (a leading +, spaces, dashes and a 00 prefix are all accepted, e.g. "+1 415 555 1234" or "14155551234"), OR a…
text *stringThe message text to send (1–4096 characters).
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.
reply_tostringOptional id of an existing message to quote, so this send appears as a threaded reply to it.

whatsapp_send_media

Sends an image, video, audio, document or sticker to a chat from a public https URL, with an optional caption. Returns { sent: true, messageId, chatId, type, timestamp, status }. As with every send, `status` is the send-time state ("sent" = handed to WhatsApp, not proof it arrived) — the real outcome arrives later on the `message.delivered` / `message.read` webhooks, or by re-reading the row with whatsapp_fetch_new_messages / whatsapp_search_messages. If anti-ban blocks the send, the media is auto-queued and you get { queued: true, itemId, reason, retryAfterMs, priority } instead — it has…

ParameterTypeDescription
chat_id *stringRecipient WhatsApp id: a phone number in full international format including country code (a leading +, spaces, dashes and a 00 prefix are all accepted, e.g. "+1 415 555 1234" or "14155551234"), OR a…
type *stringThe kind of media being sent.
url *stringPublic https URL of the file to send; the server fetches it.
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.
captionstringOptional caption shown with the media.
reply_tostringOptional id of an existing message to quote, so this send appears as a threaded reply to it.

whatsapp_send_poll

Sends a multiple-choice poll to a chat. Returns { sent: true, messageId, chatId, type, timestamp, status } — keep `messageId`, it is what whatsapp_get_poll_results reads the votes back with. `status` is the send-time state ("sent" = handed to WhatsApp, not proof it arrived); delivery/read come later on the `message.delivered` / `message.read` webhooks. Use a poll instead of asking an open question when you need a structured answer — WhatsApp renders tappable options. Votes are NOT pushed back to you here: read them with whatsapp_get_poll_results, or bridge the `poll.vote` webhook via the S…

ParameterTypeDescription
chat_id *stringRecipient WhatsApp id: a phone number in full international format including country code (a leading +, spaces, dashes and a 00 prefix are all accepted, e.g. "+1 415 555 1234" or "14155551234"), OR a…
name *stringThe poll question.
options *arrayBetween 2 and 12 answer options.
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.
reply_tostringOptional id of an existing message to quote, so this send appears as a threaded reply to it.
selectable_countintegerHow many options a voter may pick. Defaults to 1 (single-select).

whatsapp_send_location

Sends a location pin (latitude/longitude, with an optional place name and address) to a chat. Use this for directions, meeting points, or delivery addresses — the recipient can tap it to open maps. Returns { sent: true, messageId, chatId, type, timestamp, status }; `status` is the send-time state ("sent" = handed to WhatsApp, not proof it arrived), with delivery/read arriving later on the `message.delivered` / `message.read` webhooks. Never guess coordinates — a wrong pin sends a real person to the wrong place; if you do not have the exact latitude/longitude, send the address as text inste…

ParameterTypeDescription
chat_id *stringRecipient WhatsApp id: a phone number in full international format including country code (a leading +, spaces, dashes and a 00 prefix are all accepted, e.g. "+1 415 555 1234" or "14155551234"), OR a…
latitude *numberLatitude in decimal degrees.
longitude *numberLongitude in decimal degrees.
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.
addressstringOptional street address shown under the pin.
namestringOptional place name shown on the pin.
reply_tostringOptional id of an existing message to quote, so this send appears as a threaded reply to it.

whatsapp_send_contact

Sends one or more contact cards (vCards) to a chat, so the recipient can tap to save or message them. Use this to hand off a lead to a colleague or share a support number. Returns { sent: true, messageId, chatId, type, timestamp, status }; `status` is the send-time state ("sent" = handed to WhatsApp, not proof it arrived), with delivery/read arriving later on the `message.delivered` / `message.read` webhooks. Only share a number the person is entitled to have — never pass one customer's contact details to another. Requires SocialMate Pro.

ParameterTypeDescription
chat_id *stringRecipient WhatsApp id: a phone number in full international format including country code (a leading +, spaces, dashes and a 00 prefix are all accepted, e.g. "+1 415 555 1234" or "14155551234"), OR a…
contacts *arrayBetween 1 and 10 contact cards to send.
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.
reply_tostringOptional id of an existing message to quote, so this send appears as a threaded reply to it.

whatsapp_react_message

Reacts to a message with a single emoji, or removes your reaction by passing an empty string. WhatsApp allows one reaction per sender per message, so a new emoji replaces your previous one. Use this to acknowledge a message cheaply instead of sending a reply. Available on every tier: reactions consume no message-send budget and do not raise the anti-ban risk score.

ParameterTypeDescription
chat_id *stringRecipient WhatsApp id: a phone number in full international format including country code (a leading +, spaces, dashes and a 00 prefix are all accepted, e.g. "+1 415 555 1234" or "14155551234"), OR a…
emoji *stringA single emoji, e.g. "👍". Pass an empty string "" to remove your existing reaction.
message_id *stringId of the target message (from whatsapp_fetch_new_messages, whatsapp_search_messages, or a previous send result).
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.

whatsapp_mark_read

Marks a chat as read, showing the sender blue ticks. Omit message_ids to acknowledge every unread message in the chat. Call this once you have handled someone's message so they know it landed. Available on every tier: read receipts consume no message-send budget.

ParameterTypeDescription
chat_id *stringRecipient WhatsApp id: a phone number in full international format including country code (a leading +, spaces, dashes and a 00 prefix are all accepted, e.g. "+1 415 555 1234" or "14155551234"), OR a…
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.
message_idsarrayOptional specific message ids to acknowledge. Omit to mark the whole chat read.

whatsapp_send_typing

Shows or clears a "typing…" / "recording audio…" indicator in a chat. Send "composing" before a slow reply so the contact sees you are responding, then send the message. WhatsApp expires the indicator after about 10 seconds. Pass "paused" to clear it. Available on every tier: presence consumes no message-send budget.

ParameterTypeDescription
chat_id *stringRecipient WhatsApp id: a phone number in full international format including country code (a leading +, spaces, dashes and a 00 prefix are all accepted, e.g. "+1 415 555 1234" or "14155551234"), OR a…
state *string"composing" = typing, "recording" = recording a voice note, "paused" = clear the indicator.
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.

whatsapp_get_poll_results

Reads back the results of a poll you sent: every option, how many people picked each one, and who voted for what. Call this after sending a poll to find out whether it was answered — polls are not delivered back to you automatically. Re-voting replaces a person's earlier choice, so the counts never double-count anyone, and an option nobody picked is still listed with a count of 0. Pass the message_id you got back when you sent the poll. Requires SocialMate Pro.

ParameterTypeDescription
message_id *stringId of the target message (from whatsapp_fetch_new_messages, whatsapp_search_messages, or a previous send result).
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.

whatsapp_get_ai_context

Returns a chat's recent history as a role-mapped, token-windowed transcript (the contact = user, your account = assistant), ready to use as conversation memory before you reply. This is the recommended way to recall a thread — call it before answering a returning contact. Emoji reactions a message drew, and the results of any poll, are rendered into the turns, so you see how people responded and not just what was said; media that a vision model already described (whatsapp_set_media_context) reads inline as "[image: <what it shows>]". Returns { transcript, meta, account, chat } — `transcrip…

ParameterTypeDescription
chat_id *stringRecipient WhatsApp id: a phone number in full international format including country code (a leading +, spaces, dashes and a 00 prefix are all accepted, e.g. "+1 415 555 1234" or "14155551234"), OR a…
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.
max_messagesintegerHow many recent messages to include (default 50).

whatsapp_get_conversation

Deprecated alias of whatsapp_get_ai_context — returns a chat's recent history as a role-mapped, token-windowed transcript for use as conversation memory. Prefer whatsapp_get_ai_context in new agents. Requires SocialMate Pro.

ParameterTypeDescription
chat_id *stringRecipient WhatsApp id: a phone number in full international format including country code (a leading +, spaces, dashes and a 00 prefix are all accepted, e.g. "+1 415 555 1234" or "14155551234"), OR a…
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.
max_messagesintegerHow many recent messages to include (default 50).

whatsapp_fetch_new_messages

Returns messages that arrived AFTER a given timestamp cursor — the poll a pure-MCP agent uses to detect new WhatsApp messages, since MCP has no inbound push. Pass the newest timestamp you have already seen as `since`; the first call omits it to get the recent tail. Returns { data, pagination }, where each row is { id, chatId, body, type, fromMe, status, hasMedia, timestamp, media }, newest first — track the largest `timestamp` and pass it back as `since` next time. Every row also carries its current `status` ("pending" → "sent" → "delivered" → "read"), so the same poll that finds new…

ParameterTypeDescription
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.
chat_idstringRestrict to one chat (a phone number or a @g.us group JID). Omit to poll across all chats.
limitintegerMax messages to return (default 50).
sinceintegerUnix-ms timestamp cursor: only messages strictly after this are returned. Omit on the first call to get the most recent messages, then pass the largest timestamp you saw.

whatsapp_search_messages

Reads raw stored message rows for the account, optionally restricted to one chat and/or full-text searched. Returns { data, pagination }, where each row is { id, chatId, body, type, fromMe, status, hasMedia, timestamp, media }. `status` is that message's CURRENT delivery state — "pending" → "sent" → "delivered" (it reached their phone) → "read" (they opened it) — so this is how you check whether something you sent actually landed WITHOUT asking a human and without waiting on a webhook. Use it to find or count specific messages, or to confirm a delivery. To load conversation memory be…

ParameterTypeDescription
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.
chat_idstringRestrict the search to one chat (a phone number or a @g.us group JID). Omit to search all chats.
limitintegerMax messages to return (default 50).
searchstringFull-text query to match message bodies. Omit to just list recent messages.

whatsapp_list_media

Lists the media stored for the account — images, videos, voice notes, documents, stickers — newest first, with each item's id, type, chat, caption, size, download state and whether it already carries an agent description (`aiContext` / `needsContext`). This is step 1 of the vision loop: pass has_context=false for the "what have I not looked at yet?" sweep, fetch each one with whatsapp_get_media, then cache what you saw with whatsapp_set_media_context. Returns { data, pagination }. Do not call this just to read a conversation — whatsapp_get_ai_context already renders described media inlin…

ParameterTypeDescription
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.
chat_idstringRestrict to one chat (a phone number or a @g.us group JID). Omit for all chats.
directionstringInbound vs outbound media. Defaults to all.
downloaded_onlybooleanOnly items already downloaded to disk.
has_contextbooleanAgent Memory filter: false = only media still needing a description (your "what to analyze next" sweep), true = only media you have already described. Omit for both.
limitintegerPage size (default 100).
offsetintegerRows to skip, for paging.
pinned_onlybooleanOnly items pinned in the app.
searchstringMatch on filename or caption.
sortstringOrdering (default newest).
statestringDownload-lifecycle filter. Defaults to all.
typestringMedia kind filter ("voice" = PTT voice notes). Defaults to all.

whatsapp_get_media

Returns a media item AS AN IMAGE, so you can actually look at it with your own vision model — a JPEG preview of the photo, video frame or sticker. This is step 2 of the vision loop: fetch anything whose `needsContext` is true, describe what you see, then save that description with whatsapp_set_media_context so it is never analyzed twice. What you get back is a preview-resolution thumbnail, not the original file: enough to see what a photo IS, not to read fine print. Voice notes and most documents have no thumbnail and return 404 — work from their caption, or pull the original bytes over th…

ParameterTypeDescription
media_id *stringA media id (from whatsapp_list_media, or a message's media.id).
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.

whatsapp_set_media_context

Caches the description or transcript YOU produced for a media item (image, video, voice note, document) so the same media is never re-analyzed (Agent Memory). This is step 3 of the vision loop: find the media with whatsapp_list_media (has_context=false), look at it with whatsapp_get_media, then save the result here — it comes back already described inside whatsapp_get_ai_context, saving tokens and re-processing on every future pass. The media id also arrives on a message's `media.id` (webhook / transcript); an item whose `needsContext` is already false does not need this. SocialMate stores y…

ParameterTypeDescription
context *stringThe description/transcript your model produced for this media.
media_id *stringA media id (from whatsapp_list_media, or a message's media.id).
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.
overwritebooleanSet false to refuse (409) when context already exists. Defaults to true (replace).
sourcestringWhat produced the context, e.g. "gpt-4o", "whisper-1".

whatsapp_list_chats

Lists every chat (1:1, group and broadcast) on the account. Returns each chat's id, name, type and unread count. Use it to discover conversations and to get a chat id to message. It does not return any messages: to READ a chat, use whatsapp_get_ai_context (a role-mapped transcript, for recalling a thread before you reply) or whatsapp_search_messages (raw rows, each carrying its delivery `status`). Available on every tier.

ParameterTypeDescription
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.

whatsapp_list_contacts

Finds WhatsApp contacts by name, phone or JID (or lists them). Returns each contact's id, name, phone and JID. Use to look up who to message; pass a returned phone or JID as chat_id to whatsapp_send_message.

ParameterTypeDescription
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.
limitintegerMax contacts to return (default 25).
searchstringMatch contacts whose name, phone or JID contains this text. Omit to list contacts.

whatsapp_list_groups

Lists every WhatsApp group the account belongs to. Returns each group's id (a @g.us JID), subject and size. Use a returned id to message a group or with the group-management tools.

ParameterTypeDescription
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.

whatsapp_create_group

Creates a new WhatsApp group with a subject and its founding participants. Returns the new group as { id, subject } — `id` is the @g.us JID you pass to every other group tool and to whatsapp_send_message. The account becomes the group's admin. Do NOT use a group as a way to reach several people at once: a group exposes every member's number to every other member, and adding people who did not ask to be there is the fastest way to get a number reported. When several people who are already waiting on you need the same news, send them individual, personalised, paced messages with whatsapp_queue…

ParameterTypeDescription
name *stringThe group subject/name (1–100 characters).
participants *arrayPhone numbers (full international format) or JIDs to add as founding members.
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.

whatsapp_update_group_participants

Adds, removes, promotes (to admin) or demotes members of a group. Returns only { success: true } — it is NOT a per-number report, so it does not tell you which numbers actually changed. WhatsApp silently ignores a number it will not add (one whose privacy settings forbid being added, or that has no WhatsApp account), so if the outcome matters, verify the roster afterwards with whatsapp_get_group. Never add a person who has not asked to join: unsolicited group adds are how numbers get reported and banned — send them the join link from whatsapp_get_group_invite and let them tap it. "remove"…

ParameterTypeDescription
action *stringWhat to do with the listed participants.
group_id *stringThe target group id/JID ending in @g.us (from whatsapp_list_groups).
participants *arrayPhone numbers or JIDs to act on.
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.

whatsapp_queue_message

Queues one text message to send later — optionally at a scheduled time — drained safely by the anti-ban engine. Returns the queued item id. Use for reminders, follow-ups and scheduled sends; for an immediate reply use whatsapp_send_message. Requires SocialMate Pro.

ParameterTypeDescription
chat_id *stringRecipient WhatsApp id: a phone number in full international format including country code (a leading +, spaces, dashes and a 00 prefix are all accepted, e.g. "+1 415 555 1234" or "14155551234"), OR a…
content *stringThe message text to queue.
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.
scheduled_atstringISO-8601 date-time with a timezone to send at (e.g. 2026-07-10T14:30:00Z or 2026-07-10T16:30:00+02:00). Omit to send as soon as anti-ban allows. Natural-language times ("tomorrow 9am") are rejected  

whatsapp_queue_import

Queues one batch for people who are ALREADY WAITING ON YOU: when several of them need the same news — an order delay, a new pickup time — one call creates one batch from a {{field}} template plus up to 5000 rows, and each row becomes an individual, personalised message, still sent one by one through the anti-ban pipeline. Returns { batch, itemCount } — track it with whatsapp_list_batches, stop it with whatsapp_cancel_batch. Only for people who contacted the user or explicitly opted in; never a list that was bought, scraped or guessed. This is not a broadcast and SocialMate is not a broad…

ParameterTypeDescription
batch_name *stringHuman label for the batch, shown in the app and in whatsapp_list_batches.
rows *arrayThe recipients, 1–5000. Each row supplies its own placeholder values.
template *stringMessage template. {{field}} placeholders are filled per row from that row's fields, e.g. "Hi {{name}}, your order {{order}} is delayed."
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.
max_retriesintegerRetries per item before it is marked failed. Defaults to 3.
priorityintegerQueue priority, 0 (lowest) to 3 (highest). Defaults to 2.
scheduled_atstringISO-8601 date-time with a timezone to start the batch at (e.g. 2026-07-10T14:30:00Z or 2026-07-10T16:30:00+02:00). Anti-ban still paces it. Omit to start as soon as allowed. Natural-language times ("t…

whatsapp_get_antiban_status

Returns the account's live anti-ban state — call it BEFORE anything resembling a campaign, so you find out how much room is left instead of discovering it by getting blocked. Returns { accountId, riskLevel, riskScore, warmingDay, messagesToday, dailyLimit, paused, pauseScope, pauseReason, autoResumeAt, nightMode, warming, rateLimits }, where `rateLimits` is { perMinute, perHour, perDay, burst }, each a { current, max } pair — `max - current` is your remaining headroom in that window, and the tightest of the four is what will actually stop you. `riskLevel` / `riskScore` grade how much the r…

ParameterTypeDescription
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.

whatsapp_get_contact

Returns one contact's full details (name, phone, JID, profile info, plus any saved agent enrichment) by contact id or phone. Use after whatsapp_list_contacts when you need the complete record for a specific person.

ParameterTypeDescription
contact_id *stringThe contact id, phone number or JID to fetch (from whatsapp_list_contacts).
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.

whatsapp_update_contact

Saves what YOU learned about a contact — a custom name, notes, email, company, tags — into SocialMate's local store (Agent Memory). Use the moment you discover who an unknown/unnamed contact is, or a new detail while chatting: the name then shows in every future transcript and the app, so you never re-ask. Works even for a brand-new number (creates the contact). SocialMate STORES what you learned; it does not generate it. Requires SocialMate Pro. A provided field is saved, null clears it, an omitted field is left unchanged.

ParameterTypeDescription
contact_id *stringThe contact id from a message/webhook, or a plain phone number in full international format. A group id is rejected.
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.
companyCompany / organization. null clears.
custom_nameAgent-set display name (e.g. "Jane (VIP)"). Wins the display label everywhere. null clears it.
emailContact email. null clears.
notesFree-form notes about the contact. null clears.
tagsUp to 32 short tags, e.g. ["vip","lead"]. null clears all.

whatsapp_get_group

Returns one group's details: subject, description, participants and admin roles. Use after whatsapp_list_groups when you need the member list or metadata before managing the group.

ParameterTypeDescription
group_id *stringThe target group id/JID ending in @g.us (from whatsapp_list_groups).
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.

whatsapp_set_group_subject

Renames a group — sets the subject every member sees, in their chat list and as a system line in the conversation. Returns { success: true }. Because the rename is visible to everyone, never use the subject as a scratchpad, a status line or a way to pass a message: send a message. It replaces the name outright, so read the current one with whatsapp_get_group first if you mean to amend rather than overwrite. Use whatsapp_set_group_description for the longer description/topic instead. Requires SocialMate Pro (`apiWriteEnabled`), an API key with the `admin` scope, AND the account must be an adm…

ParameterTypeDescription
group_id *stringThe target group id/JID ending in @g.us (from whatsapp_list_groups).
subject *stringThe new group name/subject (1–100 characters).
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.

whatsapp_set_group_description

Sets a group's description — the longer topic text members read in the group's info panel (up to 512 characters; an empty string clears it). Returns { success: true }. It REPLACES the existing description rather than appending to it, so read the current text with whatsapp_get_group first if you mean to amend it, or you will silently destroy what was there. Members are notified that the description changed, so do not rewrite it repeatedly. Use whatsapp_set_group_subject to rename the group instead. Requires SocialMate Pro (`apiWriteEnabled`), an API key with the `admin` scope, AND the account…

ParameterTypeDescription
description *stringThe new group description (up to 512 characters; empty clears it).
group_id *stringThe target group id/JID ending in @g.us (from whatsapp_list_groups).
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.

whatsapp_get_group_invite

Returns a group's shareable invite link as { inviteCode, inviteLink } (inviteLink is https://chat.whatsapp.com/<code>). PREFER THIS over whatsapp_update_group_participants whenever you want someone to join: sending a link is consented and they choose to tap it, whereas adding a number outright is not, and unsolicited adds are how numbers get reported. It adds nobody by itself — the recipient must tap the link. Treat the link as a secret: anyone who holds it can join, so send it to the person who asked, never to a group or a public channel. The account must be an admin of that group (and once…

ParameterTypeDescription
group_id *stringThe target group id/JID ending in @g.us (from whatsapp_list_groups).
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.

whatsapp_leave_group

Makes the account itself leave a group. Returns { success: true }. Irreversible from your side: the account cannot re-join without a fresh invite, and it cannot fetch one after leaving (whatsapp_get_group_invite is an admin read, and you are no longer a member) — so if there is any chance of going back, get the link BEFORE you call this. If the account is the group's only admin, the group is left without one. Confirm the user actually wants to leave before calling; never leave a group to tidy up, to stop notifications or to end a conversation — to stop replying, simply stop replying. This…

ParameterTypeDescription
group_id *stringThe target group id/JID ending in @g.us (from whatsapp_list_groups).
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.

whatsapp_queue_status

Returns the smart-queue's live state: how many messages are pending, processing, sent and failed, and whether the queue is paused. Call to check outbound backlog before or after queueing sends. Available on every tier (read scope).

whatsapp_list_queue

Lists queued messages, newest-relevant first, optionally filtered by account or status (pending, processing, sent, failed, cancelled). Returns queue items with their ids, target chats and scheduled times. Use to review or find an item to cancel/retry. Available on every tier (read scope); cancelling or retrying an item requires Pro.

ParameterTypeDescription
account_idstringRestrict to one account. Omit to list across all accounts the key can use.
limitintegerMax items to return (default 100).
statusstringFilter by status: a single value or CSV (e.g. "pending,processing"). Omit for all.

whatsapp_list_batches

Lists smart-queue batches (each one a set of individual, personalised messages queued together by whatsapp_queue_import) with their progress counts. Use it to track a batch through to completion. Available on every tier (read scope); cancelling or retrying a batch requires Pro.

ParameterTypeDescription
account_idstringRestrict to one account. Omit for all.
limitintegerMax batches to return (default 50).
statusstringFilter by batch status. Omit for all.

whatsapp_cancel_queued

Cancels a single pending queued message by its item id so it is never sent. Returns the cancelled item. Use to pull back a scheduled or backlogged send. Requires SocialMate Pro.

ParameterTypeDescription
item_id *stringA queued item id (from whatsapp_list_queue).

whatsapp_retry_queued

Re-queues a failed message by its item id for another send attempt. Returns the item. Use after fixing whatever caused a failure. Requires SocialMate Pro.

ParameterTypeDescription
item_id *stringA queued item id (from whatsapp_list_queue).

whatsapp_cancel_batch

Cancels a whole queue batch by its batch id: every item of it still pending is dropped and never sent. Returns how many were cancelled. Use this to pull back a batch you started with whatsapp_queue_import and got wrong — items already sent cannot be recalled. To stop the queue temporarily without discarding anything, use whatsapp_pause_queue; to drop one message, use whatsapp_cancel_queued. Requires SocialMate Pro.

ParameterTypeDescription
batch_id *stringA queue batch id (from whatsapp_list_batches, or the batch returned by whatsapp_queue_import).

whatsapp_retry_batch

Re-queues every failed item in a batch for another send attempt. Returns how many were retried. Use after fixing whatever made them fail (e.g. the account reconnected). This does not resend items that already went out. To retry a single message, use whatsapp_retry_queued. Requires SocialMate Pro.

ParameterTypeDescription
batch_id *stringA queue batch id (from whatsapp_list_batches, or the batch returned by whatsapp_queue_import).

whatsapp_pause_queue

Pauses the smart queue: queued and scheduled messages stop draining and nothing more goes out until whatsapp_resume_queue. Pass account_id to pause one account; omit it to pause every account. Returns { success: true, paused: true, accountId } (accountId is null on a global pause). This is a kill-switch, not a cancel — NOTHING is discarded: items stay queued and their scheduled times keep passing, so a long pause builds a backlog that fires as one overdue rush when you resume. If a message should never be sent, cancel it instead (whatsapp_cancel_queued for one item, whatsapp_cancel_batch for…

ParameterTypeDescription
account_idstringPause only this account's queue. Omit to pause globally.

whatsapp_resume_queue

Resumes a smart queue you paused with whatsapp_pause_queue, so queued messages start draining again. Pass account_id to resume one account; omit it to resume globally. Returns { success: true, paused: false, accountId } (accountId is null on a global resume). Everything that fell due during the pause is now overdue and will go out as fast as the anti-ban engine allows, so before resuming a long pause check whatsapp_queue_status for the backlog and cancel whatever is now stale (whatsapp_cancel_queued / whatsapp_cancel_batch) rather than letting a pile of late messages land at once. This only li…

ParameterTypeDescription
account_idstringResume only this account's queue. Omit to resume globally.

whatsapp_trigger_sync

Starts a history sync (backfill) for the account — the whole archive, or just contacts / chats / messages. Returns { success: true, accountId, type, status: "started" } immediately: it does NOT wait for the sync to finish, and it returns no messages. Poll whatsapp_sync_status for progress, and only then read the history with whatsapp_search_messages / whatsapp_get_ai_context. You almost never need this: SocialMate keeps the archive current on its own, and WhatsApp pushes history to it. Call it only when the archive is visibly stale (an expected message is genuinely missing) — not before ev…

ParameterTypeDescription
account_idstringSocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to.
typestringWhat to sync (default full).

whatsapp_sync_status

Returns the most recent history-sync jobs (up to 50, newest first) across all accounts: each is { id, accountId, type, status, progress, itemsDone, itemsTotal, error, startedAt, finishedAt }, where `status` is "pending" / "running" / "completed" / "failed" and `progress` is a FRACTION from 0 to 1 (0.5 = half done, 1 = finished) — not a percentage. Poll this after whatsapp_trigger_sync — when the job for your account reads "completed", the archive is current and whatsapp_search_messages / whatsapp_get_ai_context will see it; if it reads "failed", `error` says why, and retrying immediately w…

whatsapp_get_capabilities

Returns what this SocialMate install can do AND what THIS key may actually call: { tier, features{...}, tools[{name, n8nNode, available, feature?, requiresAdminKey?, reason?}], tunnel, keyScope, accounts[] }. **Call it once, first.** Your MCP client lists every tool this server exposes regardless of licence, so `tools[]` is the only thing that tells you which of them will really work. `available:false` with a `feature` means the licence tier is wrong — calling it returns 402. `available:false` with `requiresAdminKey` means your API key lacks admin scope — calling it returns 403 on ANY tier…

whatsapp_agent_list

Lists SocialMate's own WhatsApp agents (one per WhatsApp number, configured in the SocialMate app) as an array of { id, accountId, accountLabel, name, status, autonomy, model, providerId, provider{kind,label}, today{conversations, replies, tokens, costUsd}, openHandoffs, pendingApprovals }. `status` is "draft" (never activated), "active", "paused" or "error". Call this first to get the agent_id every other whatsapp_agent_* tool needs, and to see at a glance whether anything is waiting on a person (openHandoffs / pendingApprovals). An API key scoped to some accounts only sees the agents on thos…

whatsapp_agent_get

Returns the full configuration of one of SocialMate's own WhatsApp agents: its name, status, autonomy, purpose and custom instructions, persona, enabled jobs, tool policies, delivery, escalation, budget and senses settings, owner numbers, model and fallback model, provider (kind and label only — never keys), configVersion, and the catalog of available jobs (jobCatalog). Use it to understand how the agent is set up before deciding on an approval or a hand-off. It is read-only: changing the configuration is done in the SocialMate app. Requires SocialMate Pro (AI agents) and an API key with the…

ParameterTypeDescription
agent_id *stringThe id of one of SocialMate's own WhatsApp agents (from whatsapp_agent_list).

whatsapp_agent_pause

Pauses one of SocialMate's own WhatsApp agents: it stops answering on that number until whatsapp_agent_resume. Returns the agent summary (same shape as whatsapp_agent_list) with status "paused". Nothing is deleted, and the number itself keeps working — people can still message it and a person can still reply. Emits the `agent.paused` webhook. Use this when the agent is getting things wrong and a person should take over everywhere; to silence it in a single chat, use whatsapp_agent_take_over instead. Requires SocialMate Pro (AI agents) and an API key with the `admin` scope.

ParameterTypeDescription
agent_id *stringThe id of one of SocialMate's own WhatsApp agents (from whatsapp_agent_list).

whatsapp_agent_resume

Resumes a paused SocialMate WhatsApp agent so it answers on its number again. Returns the agent summary with status "active". Fails with "Choose an AI provider and model in SocialMate first." if the agent has no provider/model yet — that is set up in the SocialMate app, not here. It only lifts this agent's own pause: if every agent is switched off in the app (the global kill switch), it still stays quiet. Emits the `agent.resumed` webhook. Confirm with the user before resuming an agent someone else paused. Requires SocialMate Pro (AI agents) and an API key with the `admin` scope.

ParameterTypeDescription
agent_id *stringThe id of one of SocialMate's own WhatsApp agents (from whatsapp_agent_list).

whatsapp_agent_usage

Returns one SocialMate agent's usage over a range: { range, totals{runs, conversations, replies, escalations, tokens, inputTokens, outputTokens, cacheReadTokens, costUsd, resolutionRate, p50LatencyMs, p95LatencyMs}, daily[], byModel[], byTool[], monthCostUsd }. `costUsd` is computed from SocialMate's own model price catalog — an estimate of what the AI provider bills the user, not an invoice. `range` is "today", "7d" (default), "14d", "30d" or "90d". For all agents at once, use whatsapp_agent_usage_summary. Requires SocialMate Pro (AI agents) and an API key with the `read` scope.

ParameterTypeDescription
agent_id *stringThe id of one of SocialMate's own WhatsApp agents (from whatsapp_agent_list).
rangestringThe period to report. Defaults to 7d.

whatsapp_agent_usage_summary

Returns usage across every SocialMate agent the API key can see: { agents, today{conversations, replies, tokens, costUsd, escalations}, monthCostUsd, daily[{day, conversations, replies, escalations, tokens, costUsd}] } — `daily` covers the last 14 days. Costs are estimates from SocialMate's own price catalog. Use it for a quick "how much did the agents do and spend" answer; drill into one agent with whatsapp_agent_usage. Requires SocialMate Pro (AI agents) and an API key with the `read` scope.

whatsapp_agent_list_approvals

Lists the actions one of SocialMate's own agents is holding for a person to approve — replies or steps it was not allowed to take on its own under its autonomy setting. Each is { id, agentId, runId, chatId, contactPhone, kind ("act" | "draft" | "connector_intent"), summary, preview, payload, status, decidedBy, createdAt, decidedAt, expiresAt } (times in epoch ms). By default only "pending" items; pass status "all" to include approved, rejected and expired ones. Read `summary` and `preview` before deciding with whatsapp_agent_decide_approval. Requires SocialMate Pro (AI agents) and an API key…

ParameterTypeDescription
agent_id *stringThe id of one of SocialMate's own WhatsApp agents (from whatsapp_agent_list).
statusstring"pending" (default) or "all".

whatsapp_agent_decide_approval

Approves or rejects one action SocialMate's own agent is holding (from whatsapp_agent_list_approvals). Approving a held reply SENDS it to the customer on WhatsApp right away, through the anti-ban engine; approving a held website step (kind "connector_intent") carries it out on the connected site; rejecting discards it. Returns { ok, message } — e.g. "Approved and sent.", or a note that some part could not be sent. It fails with "Already approved." / "Already rejected." if someone decided it first. This is a decision on a real customer conversation: only approve what the user has actually agr…

ParameterTypeDescription
agent_id *stringThe id of one of SocialMate's own WhatsApp agents (from whatsapp_agent_list).
approval_id *stringThe approval id (from whatsapp_agent_list_approvals).
decision *string"approve" carries the action out; "reject" discards it.
notestringOptional note recorded with the decision (up to 500 characters).

whatsapp_agent_list_handoffs

Lists the chats one of SocialMate's own agents handed to a person — because it was asked for a human, could not answer, hit its budget, or someone took the chat over. Each is { id, agentId, accountId, chatId, contactName, contactPhone, reason, trigger, status ("open" | "claimed" | "resolved"), openedAt, resolvedAt } (epoch ms). By default only open ones; pass status "all" for the history. While a chat is handed off the agent stays quiet there; answer the person with whatsapp_agent_reply, and give the chat back with whatsapp_agent_release once it is dealt with. Requires SocialMate Pro (AI age…

ParameterTypeDescription
agent_id *stringThe id of one of SocialMate's own WhatsApp agents (from whatsapp_agent_list).
statusstring"open" (default) or "all".

whatsapp_agent_take_over

Takes one chat away from SocialMate's own agent so a person can handle it: the agent stops replying in that chat (any reply it was about to send is cancelled) until whatsapp_agent_release. Returns { ok: true }. It opens a hand-off marked "Taken over by a person" and sends nothing to the customer. Other chats are unaffected; to stop the agent everywhere use whatsapp_agent_pause. Requires SocialMate Pro (AI agents) and an API key with the `admin` scope.

ParameterTypeDescription
agent_id *stringThe id of one of SocialMate's own WhatsApp agents (from whatsapp_agent_list).
chat_id *stringThe chat's full WhatsApp id (JID) exactly as SocialMate reports it — the `chatId` from whatsapp_agent_list_handoffs or whatsapp_agent_list_approvals, or a chat `id` from whatsapp_list_chats. Not a b…

whatsapp_agent_release

Gives a chat back to SocialMate's own agent after a person handled it: the chat's open hand-offs are resolved and the agent answers there again from the next message on. Returns { ok: true }. It sends nothing by itself. Only release once the person's issue is actually dealt with, or the agent picks the conversation up mid-problem. Emits `agent.handoff_resolved` when a hand-off was open. Requires SocialMate Pro (AI agents) and an API key with the `admin` scope.

ParameterTypeDescription
agent_id *stringThe id of one of SocialMate's own WhatsApp agents (from whatsapp_agent_list).
chat_id *stringThe chat's full WhatsApp id (JID) exactly as SocialMate reports it — the `chatId` from whatsapp_agent_list_handoffs or whatsapp_agent_list_approvals, or a chat `id` from whatsapp_list_chats. Not a b…

whatsapp_agent_reply

Sends a reply in one chat as the person running the business — not as the agent — and keeps SocialMate's own agent out of that chat: it takes the chat over first (as whatsapp_agent_take_over does), then sends the text through the anti-ban engine. Returns { ok: true } once the text is handed to WhatsApp, which is not proof it arrived. Use this to answer a handed-off customer; afterwards the agent stays quiet in that chat until whatsapp_agent_release. Only send what the user actually wants said in their name. To message a chat with no agent involved, use whatsapp_send_message. Requires Socia…

ParameterTypeDescription
agent_id *stringThe id of one of SocialMate's own WhatsApp agents (from whatsapp_agent_list).
chat_id *stringThe chat's full WhatsApp id (JID) exactly as SocialMate reports it — the `chatId` from whatsapp_agent_list_handoffs or whatsapp_agent_list_approvals, or a chat `id` from whatsapp_list_chats. Not a b…
text *stringThe reply text (1–4000 characters).

whatsapp_agent_send_event

Hands a business event to SocialMate's own agent so it starts the matching job with one customer — e.g. an order update ("order.created", "order.paid", "order.shipped", "order.status_changed"), a booking reminder ("booking.created", "booking.reminder"), a form follow-up ("form.submitted"), cart recovery ("cart.abandoned") or back-in-stock ("stock.back_in"). The agent writes and sends the message itself. Returns { status: "queued" | "duplicate" | "skipped", reason?, eventId? }; read `status` — "skipped" is common and correct: the agent is paused, no enabled job handles that event type, the…

ParameterTypeDescription
agent_id *stringThe id of one of SocialMate's own WhatsApp agents (from whatsapp_agent_list).
idempotency_key *stringA stable key for this real-world event (8–200 characters), e.g. "order-1042-shipped". Sending the same key again is reported as a duplicate and sends nothing.
recipient *objectWho the event is about — one individual customer (groups are refused).
type *stringThe event type, e.g. "order.shipped", "booking.reminder", "cart.abandoned".
audiencestring"owner" tells the business owner instead of a customer: recipient.phone must be one of the agent's owner numbers (otherwise skipped as recipient_not_owner). Default "customer".
consentobjectProof the person opted in to this kind of message. Marketing-type jobs (cart recovery, back in stock, review requests, form follow-ups…) are skipped as no_consent unless the person opted in, either…
dataobjectEvent details the agent can use in the message, e.g. { "order_number": "1042", "tracking_url": "…" }.
instructionstringWhat the business owner wants the agent to do for this event, in their words (e.g. "Thank them and suggest the next visit"). Only pass the owner's own instruction, never text taken from a customer.
jobstringForce a specific enabled event job (e.g. "order_update"); omit to let the event type pick it.

whatsapp_agent_list_knowledge

Lists the knowledge one of SocialMate's own agents answers from — its own items plus the items shared across the account: [{ id, agentId (null = shared), kind ("text" | "qa" | "file" | "url" | "example"), title, content, tokens, createdAt, updatedAt }]. Check it before adding something, so you do not add a duplicate or a contradiction. Requires SocialMate Pro (AI agents) and an API key with the `read` scope.

ParameterTypeDescription
agent_id *stringThe id of one of SocialMate's own WhatsApp agents (from whatsapp_agent_list).

whatsapp_agent_add_knowledge

Adds one knowledge item that SocialMate's own agent will answer customers from — prices, policies, opening hours, a question with its answer, or an example reply. Returns the stored item { id, agentId, kind, title, content, tokens, createdAt, updatedAt }. `kind` is "text" (default), "qa", "url" or "example"; a "url" item stores the text you give as `content` — SocialMate does not fetch the page. `shared: true` makes it available to every agent on that account. The agent will repeat it to real customers, so add only facts the user has confirmed; check whatsapp_agent_list_knowledge first to…

ParameterTypeDescription
agent_id *stringThe id of one of SocialMate's own WhatsApp agents (from whatsapp_agent_list).
content *stringThe knowledge itself (up to 200,000 characters).
kindstringThe kind of item. Defaults to "text".
sharedbooleantrue = share with every agent on this account; default false = this agent only.
titlestringOptional short title.