MCP tools reference
These are the tools your agent sees after you add https://mcp.dmwire.ai/mcp. You never call them yourself; your agent picks them. Each tool is one call to the REST API, and its answer starts with that call's HTTP status.
Tools that take a request body get it in a single body argument. The server's instructions tell the agent to start with list_accounts, listen with wait_for_messages, reply with send_message, and ask you before messaging anyone.
Chats, history, search and read
Your agent can look back as well as listen. These tools read what is already stored on your accounts. Like the channel tools below, they show up in the list at the bottom once your agent's tools/list carries them; until then, use the REST call.
| Tool | What it does | REST |
|---|---|---|
list_chats | Your chats, most recently active first. Each has chat_id, channel, name, type (user, group or channel), unread_count and last_message_at. Narrow with query (a name, @username, number or group name), account_id or type. 50 by default, up to 200. | GET /v1/chats |
list_groups | list_chats with only groups. Today these are WhatsApp groups. | GET /v1/chats/groups |
list_channels | list_chats with only channels. | GET /v1/chats/channels |
list_messages | Past messages, sent and received, newest first. Pass chat_id for one chat. | GET /v1/messages |
search_messages | Messages whose text contains query (2 to 200 characters, upper and lower case alike) from the last 365 days, newest first. Narrow with account_id or chat_id. 20 by default, up to 100. | GET /v1/messages/search |
mark_read | Marks a chat read: its unread count goes to 0. On a linked WhatsApp number, Telegram and LinkedIn the other person also gets your read receipt (receipt_sent: true); elsewhere only your own inbox is marked (receipt_sent: false). An unknown chat is refused with contact_not_found (404). | POST /v1/chats/{chat_id}/read |
Telegram groups and channels are not stored yet, so on a Telegram account list_groups and list_channels come back empty for now.
Every message carries a chat_id, the chat it belongs to. It is the same id as contact.id, and wait_for_messages, list_messages and search_messages all take it as a filter.
To answer a specific message, give send_message a reply_to with that message's id. On a linked WhatsApp number (groups too), Telegram, Instagram, Messenger and LinkedIn the reply shows the quoted message. On other channels, or when the message cannot be quoted, the text goes out without the quote and the answer carries reply_to_applied: false. A message from another chat is refused with message_not_found (404).
On Telegram, send_message also takes to.telegram_username (the @username, with or without the @). The person must have written to the account first.
Connecting SMS, email, LINE, Viber, Instagram, Messenger, WhatsApp Business and a custom channel
These channels connect with credentials of an account you already own. Each tool is the twin of one REST call, so a script can do the same without an agent. They show up in the list below once your agent's tools/list carries them; until then, use the REST call.
| Channel | Connect | Status | Disconnect | REST |
|---|---|---|---|---|
| SMS, Twilio number | connect_sms | get_sms_status | disconnect_sms | /v1/channels/sms/twilio |
| SMS, Android phone | connect_android_sms | get_android_sms_status | disconnect_android_sms | /v1/channels/sms/android-gateway |
connect_email | get_email_status | disconnect_email | /v1/channels/email/imap | |
| LINE | connect_line, then verify_line_webhook | get_line_status | disconnect_line | /v1/channels/line |
| Viber | connect_viber (verify_viber_webhook to register again) | get_viber_status | disconnect_viber | /v1/channels/viber |
connect_linkedin (submit_linkedin_code when the status is code_required) | get_linkedin_status | disconnect_linkedin | /v1/channels/linkedin | |
| Instagram and Messenger, Facebook Page | set_meta_app, then connect_instagram_messenger (list_pages, select_page to pick the Page from a script) | get_instagram_messenger_status | disconnect_instagram_messenger | /v1/channels/meta |
| Instagram, pushed token | set_meta_app, then push_instagram_token | list_accounts | disconnect_instagram_token | /v1/channels/instagram-login/token |
| WhatsApp Business | connect_whatsapp_business, then verify_whatsapp_business when pending | get_whatsapp_business_status | disconnect_whatsapp_business | /v1/channels/whatsapp-business |
| Custom channel | set_custom_channel_webhook | get_custom_channel_status | disconnect_custom_channel | /v1/channels/custom |
On the custom channel, push_custom_channel_message sends in a message that someone wrote on your side. The setup per channel is on its page: SMS, Email, LINE, Viber, Instagram, Messenger, WhatsApp Business, Custom channel.
get_meta_app and remove_meta_app read and delete your own Meta app (setup). On WhatsApp Business, list_templates, create_template and delete_template manage your message templates and send_template sends one outside the 24 hour window.
The live tool list
The real tools/list call this page was built from:
curl \
-X POST https://mcp.dmwire.ai/mcp \
-H "X-API-Key: $DMWIRE_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {}}'{
"result": {
"tools": [
{
"name": "connect_telegram",
"title": "Start a connection session"
},
{
"name": "connect_whatsapp",
"title": "Start a WhatsApp Web pairing session"
},
{
"name": "create_webhook",
"title": "Create Webhook Subscription"
},
{
"name": "delete_webhook",
"title": "Delete Webhook Subscription"
},
{
"name": "disconnect_telegram",
"title": "Disconnect the channel"
},
{
... (shortened here; the full list is below)25 tools, read from a live tools/list call to https://mcp.dmwire.ai/mcp on 2026-10-17.
Messages
send_message
Send a Message
Queues a text message (optionally with one media URL) from a connected account. Address the recipient by to.phone (international format) or to.contact_id. account_id may be omitted when exactly one account is connected. On WhatsApp a new phone number creates the contact; on Telegram only an existing contact can be messaged. Answers 202 with the message id; read get_message for the delivery status.
| Argument | Type | Required | What it is |
|---|---|---|---|
body.account_id | string | no | The account to send from (see list_accounts). Optional when one account is connected. |
body.to | object | yes | |
body.to.phone | string | no | |
body.to.contact_id | string | no | |
body.text | string | yes | |
body.media_url | string | no | An https URL of an image, video, audio file or document to attach. |
wait_for_messages
Wait for New Messages
Long poll for incoming messages. Returns as soon as at least one message newer than cursor arrives (up to 50 per call), or an empty list when timeout_s passes. Always pass the returned cursor into the next call; without a cursor the wait starts from now. At most 2 waits may be open at once per account (429 wait_concurrency).
| Argument | Type | Required | What it is |
|---|---|---|---|
cursor | string | no | The opaque cursor returned by the previous call. |
account_id | string | no | Only messages received on this account. |
timeout_s | integer | no |
get_message
Get a Message
Reads one message (sent or received) with its current status. Use it after send_message to see whether the message was sent, delivered, read or failed.
| Argument | Type | Required | What it is |
|---|---|---|---|
id | string | yes |
Chats
Accounts
list_accounts
List Connected Accounts
Lists the WhatsApp Web and Telegram accounts connected to your account. status is one of connected, connecting, disconnected or restricted. limits shows today's sends and new contacts against the caps; ramp_day is how far the account is into its warm-up ramp (null when the account has no ramp).
No arguments.
connect_whatsapp
Start a WhatsApp Web pairing session
Begins pairing a WhatsApp number by QR code. Creates or resets the connection and returns a session whose QR code you then fetch and have the end user scan. Poll the status endpoint until the connection reports connected.
| Argument | Type | Required | What it is |
|---|---|---|---|
body.phone_number | string | yes | The WhatsApp number to connect, in E.164 format (for example +15551230000). |
body.link_method | qr | pairing_code | no | How the phone is linked. 'qr' (default) shows a QR code to scan; 'pairing_code' returns an 8-character code to type on the phone under Linked devices, Link with phone number instead. |
body.force_new | boolean | no | Discard any existing session for this number and start a fresh pairing. |
body.import_contacts | boolean | no | Import the device's existing contacts on first connection. |
body.pause_ai_for_imported_contacts | boolean | no | When importing contacts, keep automated replies paused for them. |
body.import_existing_chats | boolean | no | Import existing chat history on first connection. Requires import_contacts to be true. |
body.mark_imported_contacts_as_private | boolean | no | When importing contacts, create them as private (no messages stored or sent for them). Incompatible with import_existing_chats. |
get_whatsapp_qr
Get the pairing QR code
Returns the current QR code for a pairing session so it can be rendered for the end user to scan. The code is short-lived; poll this endpoint every 10 to 15 seconds until the status reports connected, and restart the connection if the code expires.
| Argument | Type | Required | What it is |
|---|---|---|---|
phoneNumber | string | yes | The connected number in E.164 format. |
get_whatsapp_status
Get the connection status
Returns the live connection status for a pairing session. The terminal success state is connected (the service may also report open). Treat disconnected and not_initialized as terminal failure states. Poll this endpoint after the end user scans the QR code to confirm the connection.
| Argument | Type | Required | What it is |
|---|---|---|---|
phoneNumber | string | yes | The connected number in E.164 format. |
disconnect_whatsapp
Disconnect a WhatsApp Web connection
Disconnects the pairing session and removes the connection record. The operation is idempotent and always succeeds locally even if the connection service is unreachable.
| Argument | Type | Required | What it is |
|---|---|---|---|
phoneNumber | string | yes | The connected number in E.164 format. |
connect_telegram
Start a connection session
Begins a connection session for an account phone number. In code mode the connection service sends a one-time login code to the account and reports code_required; in qr mode it returns a login token and QR URL to display. Poll the status endpoint until the channel reports connected.
| Argument | Type | Required | What it is |
|---|---|---|---|
body.phone_number | string | yes | The account phone number to connect, in E.164 format. |
body.mode | code | qr | no | Login method. 'code' sends a one-time login code to the account; 'qr' returns a login token and QR URL to display for scanning. |
body.force_new | boolean | no | When true, discards any existing session and starts fresh. |
submit_telegram_code
Submit the login code
Submits the one-time login code for a pending session. On success the status becomes connected; when the account has two-factor enabled the status becomes password_required and the password must be submitted next.
| Argument | Type | Required | What it is |
|---|---|---|---|
phoneNumber | string | yes | The account phone number being connected, in E.164 format. |
body.code | string | yes | The one-time login code received by the account. |
submit_telegram_password
Submit the two-factor password
Submits the two-factor password for a session that reported password_required. On success the status becomes connected and the channel is live.
| Argument | Type | Required | What it is |
|---|---|---|---|
phoneNumber | string | yes | The account phone number being connected, in E.164 format. |
body.password | string | yes | The account's two-factor password. |
get_telegram_status
Get live connection status
Returns the live connection status for a session, polled from the connection service. Poll this until the status is connected or an error/disconnected status. Reports not_initialized when no session exists.
| Argument | Type | Required | What it is |
|---|---|---|---|
phoneNumber | string | yes | The account phone number, in E.164 format. |
disconnect_telegram
Disconnect the channel
Tears down the connection session and removes the account record. Idempotent: the record is removed even when the connection service is unreachable, so repeated calls succeed.
| Argument | Type | Required | What it is |
|---|---|---|---|
phoneNumber | string | yes | The account phone number to disconnect, in E.164 format. |
Usage
get_usage
Get Today's Usage
Today's sends and new contacts (UTC day) against the plan caps.
No arguments.
Webhooks
list_webhook_events
List Subscribable Event Types
Returns the full list of event types that webhook subscriptions can listen to. Use these exact strings in the subscribed_to field when creating or updating a subscription. The events are (message.received, message.sent, message.delivered, message.read, message.failed, account.connected, account.disconnected, account.restricted, account.limit_reached), plus a descriptions map; subscribing to an event outside the account's set returns 400.
No arguments.
list_webhooks
List Webhook Subscriptions
Returns every webhook subscription configured on the account, including the events each one listens to. The returned id (or the exact name) can be used as the webhookId path parameter in the other webhook endpoints.
No arguments.
create_webhook
Create Webhook Subscription
Creates a new webhook subscription. The URL must use HTTPS and be publicly reachable. The subscribed_to array selects which event types are delivered to the URL, use GET /webhooks/events to discover the valid values. Optionally pass a name so the subscription can be addressed by a stable identifier later.
| Argument | Type | Required | What it is |
|---|---|---|---|
body.url | string | yes | HTTPS URL that will receive event payloads via POST. |
body.subscribed_to | array | yes | Event types to subscribe to. Must contain at least one valid event name. |
body.name | string | no | Optional display name. Also usable as the webhookId path parameter. Defaults to a timestamped name. |
body.retries_enabled | boolean | no | Retry failed deliveries (1m, 5m, 30m, 2h). Off by default. See the Retries section for the duplicate-delivery caveat. |
body.enabled | boolean | no | Account on/off switch for the subscription. Defaults to true (on). Pass false to create it switched off. |
body.generate_signing_secret | boolean | no | When true, an HMAC signing secret is minted for the new subscription (turning signing on) and returned once as a top-level signing_secret field in the response. Store it then, it is never returned in full again by create/list/update; only GET /webhooks/{webhookId}/signing-secret exposes it afterwards. You can also turn signing on later via POST /webhooks/{webhookId}/signing-secret. |
update_webhook
Update Webhook Subscription
Updates an existing webhook subscription. Provide at least one of url, subscribed_to or name; omitted fields keep their current values. When the URL changes, delivery for the new URL is automatically re-enabled so a previously failing endpoint gets a fresh start.
| Argument | Type | Required | What it is |
|---|---|---|---|
webhookId | string | yes | The subscription id (from the id field) or its exact name. |
body.url | string | no | New HTTPS delivery URL. |
body.subscribed_to | array | no | Replacement event list. Must contain at least one valid event name. |
body.name | string | no | New display name. |
body.retries_enabled | boolean | no | Turn delivery retries on or off for this subscription. |
body.enabled | boolean | no | Account on/off switch. Set false to switch the subscription off (suppress delivery), true to switch it back on. Signing is managed separately via the signing-secret routes, not here. |
delete_webhook
Delete Webhook Subscription
Removes a webhook subscription so its URL stops receiving event payloads. Delivery-health counters for the URL are reset, so re-adding the same URL later starts with a clean record.
| Argument | Type | Required | What it is |
|---|---|---|---|
webhookId | string | yes | The subscription id (from the id field) or its exact name. |
test_webhook
Send Test Payload
Sends a sample payload to the subscription's URL so you can verify your receiver end-to-end. Optionally pass an event to control which event type the sample payload simulates. Test deliveries never affect the subscription's health counters. The response reports whether the delivery succeeded; a failed test returns delivered:false together with the failure details instead of an error status.
| Argument | Type | Required | What it is |
|---|---|---|---|
webhookId | string | yes | The subscription id (from the id field) or its exact name. |
body.event | string | no | Event type to simulate. Must be one of the values from GET /webhooks/events. Defaults to a delivery event. |
get_webhook_health
Get Webhook Delivery Health
Returns the delivery-health record for the subscription's URL: how many deliveries have succeeded and failed, whether delivery is currently paused after repeated failures, and the details of the most recent failure. Returns health:null when no deliveries have been attempted yet.
| Argument | Type | Required | What it is |
|---|---|---|---|
webhookId | string | yes | The subscription id (from the id field) or its exact name. |
reenable_webhook
Re-enable Webhook Delivery
Resumes delivery for a webhook whose URL was paused automatically after repeated failures. Resets the paused flag and failure counters. No delivery attempt is made, use the test endpoint afterwards to confirm the receiver is healthy again.
| Argument | Type | Required | What it is |
|---|---|---|---|
webhookId | string | yes | The subscription id (from the id field) or its exact name. |
get_webhook_signing_secret
Read Webhook Signing Secret
Returns the subscription's HMAC signing secret so you can configure signature verification on your receiver. The secret is symmetric, we hold the same value your endpoint needs, so it is readable rather than write-once. When signing is off, signing_enabled is false and signing_secret is null.
| Argument | Type | Required | What it is |
|---|---|---|---|
webhookId | string | yes | The subscription id (from the id field) or its exact name. |
rotate_webhook_signing_secret
Generate or Rotate Webhook Signing Secret
Mints a new signing secret for the subscription, or replaces the existing one. Creating a secret is how signing is turned on. The new secret is returned in the response.
| Argument | Type | Required | What it is |
|---|---|---|---|
webhookId | string | yes | The subscription id (from the id field) or its exact name. |
turn_off_webhook_signing
Turn Off Webhook Signing
Removes the subscription's signing secret, turning signing off. Subsequent deliveries carry no signature headers, exactly as the webhook behaved before signing was enabled.
| Argument | Type | Required | What it is |
|---|---|---|---|
webhookId | string | yes | The subscription id (from the id field) or its exact name. |
Last checked against the live service on 2026-10-23.