AI tools — Omnichannel chat

16 tools. The latest schema is always in comm_tool_catalog once connected.

Meta Ads operations

ReadScope: comm:read
ads_catalog

Meta (Facebook/Instagram) Ads operations available to the connected ad account, with each operation's description and parameters.

No parameters.

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/comm/ads_catalog/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "ads_catalog",
  "arguments": {
    "args": {}
  }
}

Read Meta Ads data

ReadScope: comm:read
ads_read

Run one read operation of Meta Ads (name from ads_catalog): campaigns, spend, results, ad sets.

ParameterTypeRequiredDescription
toolstringyesRead operation name from ads_catalog
argumentsobjectnoArguments per the operation's schema

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/comm/ads_read/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"tool":"list_campaigns","arguments":{}}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "ads_read",
  "arguments": {
    "args": {
      "tool": "list_campaigns",
      "arguments": {}
    }
  }
}

Add Q&A to a chat assistant

Write proposalScope: comm:write
comm_add_ai_bot_qa

Add question–answer pairs to an existing customer-reply assistant's knowledge (max 50 pairs per call). Creates a proposal; it only runs after the user taps Confirm in the app.

ParameterTypeRequiredDescription
botNamestringyesAssistant name
pairsobject[]yesList of Q&A pairs
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "comm_add_ai_bot_qa",
  "arguments": {
    "args": {
      "botName": "Tư vấn khoá tiếng Anh",
      "pairs": [
        {
          "question": "Học phí khoá cơ bản bao nhiêu?",
          "answer": "Khoá cơ bản 3 tháng giá 3.000.000đ.",
          "category": "Học phí"
        }
      ]
    }
  }
}

Change Meta Ads

Write proposalScope: comm:write
comm_ads_change

Change the Meta ad account (pause/resume campaigns, change budget, create or edit ads) using one write operation from ads_catalog. Creates a proposal; it only runs after the user taps Confirm in the app.

ParameterTypeRequiredDescription
toolstringyesWrite operation name from ads_catalog
argumentsobjectnoArguments per the operation's schema
summarystringyesOne sentence describing the change
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "comm_ads_change",
  "arguments": {
    "args": {
      "tool": "update_campaign_run_status",
      "arguments": {
        "campaign_id": "120212345678900001",
        "status": "PAUSED"
      },
      "summary": "Tạm dừng chiến dịch Khuyến mãi tháng 10"
    }
  }
}

Inbox agent metrics

ReadScope: comm:read
comm_agents_performance

Inbox agent metrics: conversations resolved in a period, or current workload.

ParameterTypeRequiredDescription
metricstringnoresolved = resolved in period; workload = currently assigned
periodstringnoPeriod: today (default) or week

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/comm/comm_agents_performance/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"metric":"resolved","period":"week"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "comm_agents_performance",
  "arguments": {
    "args": {
      "metric": "resolved",
      "period": "week"
    }
  }
}

Assign a conversation to me

Write proposalScope: comm:write
comm_assign_to_me

Assign an open inbox conversation to the current user. Creates a proposal; it only runs after the user taps Confirm in the app.

ParameterTypeRequiredDescription
customer_querystringyesCustomer name or phone to find the conversation
conversation_refstringnoConversation code (HT-…) if known
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "comm_assign_to_me",
  "arguments": {
    "args": {
      "customer_query": "Nguyễn An"
    }
  }
}

Auto-reply assistant metrics

ReadScope: comm:read
comm_bot_stats

Inbox auto-reply assistant metrics per period: conversations handled, handed over to agents, and self-resolution rate; optionally by channel.

ParameterTypeRequiredDescription
periodstringnoPeriod: today (default) or week
groupBystringnochannel = per channel; empty = total

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/comm/comm_bot_stats/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"period":"week","groupBy":"channel"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "comm_bot_stats",
  "arguments": {
    "args": {
      "period": "week",
      "groupBy": "channel"
    }
  }
}

Chat channel status

ReadScope: comm:read
comm_channels_status

Connected chat channels and their health: channel type, page/account name, status (Active, Error, PendingReconnect, Disconnected), webhook verification.

ParameterTypeRequiredDescription
channelTypestringnoFilter by channel type; empty = all
activeOnlybooleannotrue = active channels only

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/comm/comm_channels_status/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"activeOnly":true}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "comm_channels_status",
  "arguments": {
    "args": {
      "activeOnly": true
    }
  }
}

Close a conversation

Write proposalScope: comm:write
comm_close_conversation

Close an open inbox conversation. Creates a proposal; it only runs after the user taps Confirm in the app.

ParameterTypeRequiredDescription
customer_querystringyesCustomer name or phone to find the conversation
conversation_refstringnoConversation code (HT-…) if known
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "comm_close_conversation",
  "arguments": {
    "args": {
      "customer_query": "0901234567"
    }
  }
}

Create a customer-reply assistant

Write proposalScope: comm:write
comm_create_ai_bot

Create a customer-reply assistant on Facebook, Zalo or website widget from a description: name, industry, tone, reply mode, fallback message, channels, business hours and initial Q&A. Creates a proposal; it only runs after the user taps Confirm in the app.

ParameterTypeRequiredDescription
namestringyesAssistant name
industrystringyesIndustry (e.g. Education, Spa)
tonestringnoFriendly or Professional…
modestringnoAuto, Hybrid…
fallbackMessagestringnoReply when unsure
personaPromptstringnoForm of address and persona
channelTypesstring[]yesFacebook, ZaloOa, ZaloPersonal, Widget
maxEscalateAttemptsintegernoUnsure attempts before handing to an agent
businessHoursobjectnoBusiness hours (Vietnam time)
qaPairsobject[]noInitial Q&A
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "comm_create_ai_bot",
  "arguments": {
    "args": {
      "name": "Tư vấn khoá tiếng Anh",
      "industry": "Giáo dục",
      "channelTypes": [
        "Facebook"
      ]
    }
  }
}

Inbox counts by channel

ReadScope: comm:read
comm_inbox_breakdown

Count the inbox by channel: open conversations, all conversations, unread, new contacts or returning customers.

ParameterTypeRequiredDescription
metricstringnoMetric, default conversations_open
daysintegernoRecent days (for new_contacts)
periodstringnoPeriod (for returning_customers)

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/comm/comm_inbox_breakdown/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"metric":"unread"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "comm_inbox_breakdown",
  "arguments": {
    "args": {
      "metric": "unread"
    }
  }
}

Conversation messages

ReadScope: comm:read
comm_messages_get

Most recent messages of a conversation in time order: direction, sender, type, content, delivery status, internal notes.

ParameterTypeRequiredDescription
conversationIdstringyesConversation id (from comm_conversations_search)
limitintegernoMessages to read, max 50

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/comm/comm_messages_get/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"conversationId":"0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b","limit":20}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "comm_messages_get",
  "arguments": {
    "args": {
      "conversationId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
      "limit": 20
    }
  }
}

Message volume

ReadScope: comm:read
comm_messages_volume

Inbox message volume for a period, split into inbound and outbound; or distribution by hour of day.

ParameterTypeRequiredDescription
periodstringnoPeriod: today (default) or week
groupBystringnohour = hourly distribution for today

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/comm/comm_messages_volume/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"period":"week"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "comm_messages_volume",
  "arguments": {
    "args": {
      "period": "week"
    }
  }
}

Inbox sales funnel

ReadScope: comm:read
comm_sales_pipeline

Sales funnel of chat conversations by agent-assigned stage: New, Consulting, Quoted, Won, Lost.

ParameterTypeRequiredDescription
periodstringnoPeriod: today (default) or week

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/comm/comm_sales_pipeline/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"period":"week"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "comm_sales_pipeline",
  "arguments": {
    "args": {
      "period": "week"
    }
  }
}

Update a customer-reply assistant

Write proposalScope: comm:write
comm_update_ai_bot

Update an existing customer-reply assistant: name, industry, tone, reply mode, fallback message, persona, channels, escalation attempts, business hours. Creates a proposal; it only runs after the user taps Confirm in the app.

ParameterTypeRequiredDescription
botNamestringyesAssistant to update
namestringnoNew name (if renaming)
industrystringnoIndustry
tonestringnoTone
modestringnoReply mode
fallbackMessagestringnoFallback message
personaPromptstringnoPersona
channelTypesstring[]noChannels
maxEscalateAttemptsintegernoAttempts before escalation
businessHoursobjectnoBusiness hours
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "comm_update_ai_bot",
  "arguments": {
    "args": {
      "botName": "Shop A",
      "tone": "Professional"
    }
  }
}