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.
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 |
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-17.