socialmate-mcp
v1.3.0Model 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…
| Parameter | Type | Description |
|---|---|---|
chat_id * | string | Recipient 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 * | string | The message text to send (1–4096 characters). |
account_id | string | SocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to. |
reply_to | string | Optional 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…
| Parameter | Type | Description |
|---|---|---|
chat_id * | string | Recipient 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 * | string | The kind of media being sent. |
url * | string | Public https URL of the file to send; the server fetches it. |
account_id | string | SocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to. |
caption | string | Optional caption shown with the media. |
reply_to | string | Optional 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…
| Parameter | Type | Description |
|---|---|---|
chat_id * | string | Recipient 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 * | string | The poll question. |
options * | array | Between 2 and 12 answer options. |
account_id | string | SocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to. |
reply_to | string | Optional id of an existing message to quote, so this send appears as a threaded reply to it. |
selectable_count | integer | How 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…
| Parameter | Type | Description |
|---|---|---|
chat_id * | string | Recipient 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 * | number | Latitude in decimal degrees. |
longitude * | number | Longitude in decimal degrees. |
account_id | string | SocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to. |
address | string | Optional street address shown under the pin. |
name | string | Optional place name shown on the pin. |
reply_to | string | Optional 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.
| Parameter | Type | Description |
|---|---|---|
chat_id * | string | Recipient 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 * | array | Between 1 and 10 contact cards to send. |
account_id | string | SocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to. |
reply_to | string | Optional 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.
| Parameter | Type | Description |
|---|---|---|
chat_id * | string | Recipient 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 * | string | A single emoji, e.g. "👍". Pass an empty string "" to remove your existing reaction. |
message_id * | string | Id of the target message (from whatsapp_fetch_new_messages, whatsapp_search_messages, or a previous send result). |
account_id | string | SocialMate 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.
| Parameter | Type | Description |
|---|---|---|
chat_id * | string | Recipient 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_id | string | SocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to. |
message_ids | array | Optional 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.
| Parameter | Type | Description |
|---|---|---|
chat_id * | string | Recipient 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_id | string | SocialMate 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.
| Parameter | Type | Description |
|---|---|---|
message_id * | string | Id of the target message (from whatsapp_fetch_new_messages, whatsapp_search_messages, or a previous send result). |
account_id | string | SocialMate 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…
| Parameter | Type | Description |
|---|---|---|
chat_id * | string | Recipient 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_id | string | SocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to. |
max_messages | integer | How 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.
| Parameter | Type | Description |
|---|---|---|
chat_id * | string | Recipient 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_id | string | SocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to. |
max_messages | integer | How 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…
| Parameter | Type | Description |
|---|---|---|
account_id | string | SocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to. |
chat_id | string | Restrict to one chat (a phone number or a @g.us group JID). Omit to poll across all chats. |
limit | integer | Max messages to return (default 50). |
since | integer | Unix-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…
| Parameter | Type | Description |
|---|---|---|
account_id | string | SocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to. |
chat_id | string | Restrict the search to one chat (a phone number or a @g.us group JID). Omit to search all chats. |
limit | integer | Max messages to return (default 50). |
search | string | Full-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…
| Parameter | Type | Description |
|---|---|---|
account_id | string | SocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to. |
chat_id | string | Restrict to one chat (a phone number or a @g.us group JID). Omit for all chats. |
direction | string | Inbound vs outbound media. Defaults to all. |
downloaded_only | boolean | Only items already downloaded to disk. |
has_context | boolean | Agent 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. |
limit | integer | Page size (default 100). |
offset | integer | Rows to skip, for paging. |
pinned_only | boolean | Only items pinned in the app. |
search | string | Match on filename or caption. |
sort | string | Ordering (default newest). |
state | string | Download-lifecycle filter. Defaults to all. |
type | string | Media 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…
| Parameter | Type | Description |
|---|---|---|
media_id * | string | A media id (from whatsapp_list_media, or a message's media.id). |
account_id | string | SocialMate 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…
| Parameter | Type | Description |
|---|---|---|
context * | string | The description/transcript your model produced for this media. |
media_id * | string | A media id (from whatsapp_list_media, or a message's media.id). |
account_id | string | SocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to. |
overwrite | boolean | Set false to refuse (409) when context already exists. Defaults to true (replace). |
source | string | What 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.
| Parameter | Type | Description |
|---|---|---|
account_id | string | SocialMate 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.
| Parameter | Type | Description |
|---|---|---|
account_id | string | SocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to. |
limit | integer | Max contacts to return (default 25). |
search | string | Match 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.
| Parameter | Type | Description |
|---|---|---|
account_id | string | SocialMate 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…
| Parameter | Type | Description |
|---|---|---|
name * | string | The group subject/name (1–100 characters). |
participants * | array | Phone numbers (full international format) or JIDs to add as founding members. |
account_id | string | SocialMate 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"…
| Parameter | Type | Description |
|---|---|---|
action * | string | What to do with the listed participants. |
group_id * | string | The target group id/JID ending in @g.us (from whatsapp_list_groups). |
participants * | array | Phone numbers or JIDs to act on. |
account_id | string | SocialMate 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.
| Parameter | Type | Description |
|---|---|---|
chat_id * | string | Recipient 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 * | string | The message text to queue. |
account_id | string | SocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to. |
scheduled_at | string | ISO-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…
| Parameter | Type | Description |
|---|---|---|
batch_name * | string | Human label for the batch, shown in the app and in whatsapp_list_batches. |
rows * | array | The recipients, 1–5000. Each row supplies its own placeholder values. |
template * | string | Message template. {{field}} placeholders are filled per row from that row's fields, e.g. "Hi {{name}}, your order {{order}} is delayed." |
account_id | string | SocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to. |
max_retries | integer | Retries per item before it is marked failed. Defaults to 3. |
priority | integer | Queue priority, 0 (lowest) to 3 (highest). Defaults to 2. |
scheduled_at | string | ISO-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…
| Parameter | Type | Description |
|---|---|---|
account_id | string | SocialMate 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.
| Parameter | Type | Description |
|---|---|---|
contact_id * | string | The contact id, phone number or JID to fetch (from whatsapp_list_contacts). |
account_id | string | SocialMate 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.
| Parameter | Type | Description |
|---|---|---|
contact_id * | string | The contact id from a message/webhook, or a plain phone number in full international format. A group id is rejected. |
account_id | string | SocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to. |
company | Company / organization. null clears. | |
custom_name | Agent-set display name (e.g. "Jane (VIP)"). Wins the display label everywhere. null clears it. | |
email | Contact email. null clears. | |
notes | Free-form notes about the contact. null clears. | |
tags | Up 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.
| Parameter | Type | Description |
|---|---|---|
group_id * | string | The target group id/JID ending in @g.us (from whatsapp_list_groups). |
account_id | string | SocialMate 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…
| Parameter | Type | Description |
|---|---|---|
group_id * | string | The target group id/JID ending in @g.us (from whatsapp_list_groups). |
subject * | string | The new group name/subject (1–100 characters). |
account_id | string | SocialMate 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…
| Parameter | Type | Description |
|---|---|---|
description * | string | The new group description (up to 512 characters; empty clears it). |
group_id * | string | The target group id/JID ending in @g.us (from whatsapp_list_groups). |
account_id | string | SocialMate 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…
| Parameter | Type | Description |
|---|---|---|
group_id * | string | The target group id/JID ending in @g.us (from whatsapp_list_groups). |
account_id | string | SocialMate 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…
| Parameter | Type | Description |
|---|---|---|
group_id * | string | The target group id/JID ending in @g.us (from whatsapp_list_groups). |
account_id | string | SocialMate 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.
| Parameter | Type | Description |
|---|---|---|
account_id | string | Restrict to one account. Omit to list across all accounts the key can use. |
limit | integer | Max items to return (default 100). |
status | string | Filter 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.
| Parameter | Type | Description |
|---|---|---|
account_id | string | Restrict to one account. Omit for all. |
limit | integer | Max batches to return (default 50). |
status | string | Filter 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.
| Parameter | Type | Description |
|---|---|---|
item_id * | string | A 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.
| Parameter | Type | Description |
|---|---|---|
item_id * | string | A 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.
| Parameter | Type | Description |
|---|---|---|
batch_id * | string | A 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.
| Parameter | Type | Description |
|---|---|---|
batch_id * | string | A 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…
| Parameter | Type | Description |
|---|---|---|
account_id | string | Pause 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…
| Parameter | Type | Description |
|---|---|---|
account_id | string | Resume 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…
| Parameter | Type | Description |
|---|---|---|
account_id | string | SocialMate account id to act on (from whatsapp_list_accounts). Omit to use the only account the API key is scoped to. |
type | string | What 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…
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | The 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.
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | The 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.
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | The 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.
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | The id of one of SocialMate's own WhatsApp agents (from whatsapp_agent_list). |
range | string | The 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…
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | The id of one of SocialMate's own WhatsApp agents (from whatsapp_agent_list). |
status | string | "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…
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | The id of one of SocialMate's own WhatsApp agents (from whatsapp_agent_list). |
approval_id * | string | The approval id (from whatsapp_agent_list_approvals). |
decision * | string | "approve" carries the action out; "reject" discards it. |
note | string | Optional 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…
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | The id of one of SocialMate's own WhatsApp agents (from whatsapp_agent_list). |
status | string | "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.
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | The id of one of SocialMate's own WhatsApp agents (from whatsapp_agent_list). |
chat_id * | string | The 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.
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | The id of one of SocialMate's own WhatsApp agents (from whatsapp_agent_list). |
chat_id * | string | The 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…
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | The id of one of SocialMate's own WhatsApp agents (from whatsapp_agent_list). |
chat_id * | string | The 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 * | string | The 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…
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | The id of one of SocialMate's own WhatsApp agents (from whatsapp_agent_list). |
idempotency_key * | string | A 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 * | object | Who the event is about — one individual customer (groups are refused). |
type * | string | The event type, e.g. "order.shipped", "booking.reminder", "cart.abandoned". |
audience | string | "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". |
consent | object | Proof 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… |
data | object | Event details the agent can use in the message, e.g. { "order_number": "1042", "tracking_url": "…" }. |
instruction | string | What 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. |
job | string | Force 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.
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | The 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…
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | The id of one of SocialMate's own WhatsApp agents (from whatsapp_agent_list). |
content * | string | The knowledge itself (up to 200,000 characters). |
kind | string | The kind of item. Defaults to "text". |
shared | boolean | true = share with every agent on this account; default false = this agent only. |
title | string | Optional short title. |