Channels tools
Marketing templates, assets, segments, and campaigns (create, preview, and send).
29 tools. Each is callable over MCP with a Bearer agx_ key that holds the required scope. The catalog is public (tools/list isn't scope-filtered); the scope below is enforced when the tool is called (tools/call) — a key without it is refused (default-deny).
get_asset
Get one marketing asset by id (metadata + public_url). Requires assets:read.
Required scope: assets:read
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
asset_id | string | ✓ |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_asset",
"arguments": {
"asset_id": "\u2026"
}
}
}
get_campaign
Get one campaign by id (config + status + stats). Requires campaigns:read.
Required scope: campaigns:read
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
campaign_id | string | ✓ |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_campaign",
"arguments": {
"campaign_id": "\u2026"
}
}
}
get_segment
Get one segment by id (definition + filter_config + member_count). Requires segments:read.
Required scope: segments:read
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
segment_id | string | ✓ |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_segment",
"arguments": {
"segment_id": "\u2026"
}
}
}
get_template
Get one marketing template by id (full content + variables). Requires templates:read.
Required scope: templates:read
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
template_id | string | ✓ |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_template",
"arguments": {
"template_id": "\u2026"
}
}
}
get_voice_call
Get one voice call by id, including its transcription. Requires communications:read.
Required scope: communications:read
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
call_id | string | ✓ |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_voice_call",
"arguments": {
"call_id": "\u2026"
}
}
}
get_whatsapp_conversation
Get one WhatsApp conversation (thread header) by id. Use list_whatsapp_messages for its messages. Requires communications:read.
Required scope: communications:read
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
conversation_id | string | ✓ |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_whatsapp_conversation",
"arguments": {
"conversation_id": "\u2026"
}
}
}
create_campaign
Create a DRAFT campaign. Required: name, campaign_type, channel (email/sms/whatsapp). Optional: template_id, integration_id, audience_id+audience_name (a segment/audience to target), description, config. Always a draft — use send_campaign to launch. Requires campaigns:write.
Required scope: campaigns:write
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | ✓ | |
campaign_type | string | ✓ | e.g. one_time, broadcast. |
channel | string | ✓ | email | sms | whatsapp. |
template_id | string | ||
integration_id | string | ||
audience_id | string | Segment/audience id to target. | |
audience_name | string | ||
description | string | ||
config | object |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "create_campaign",
"arguments": {
"name": "\u2026",
"campaign_type": "\u2026",
"channel": "\u2026"
}
}
}
create_segment
Create a CRM segment. Required: name, entity_type (contact/company/deal), filter_config (the Filter Builder JSON: {filter_groups:[{conditions:[{entity,field,operator,value}], condition_connector}], group_connector}). Optional description/tags/segment_type/is_public. Created in 'pending' — call evaluate_segment to compute the member count. Tip: use preview_segment first. Requires segments:write.
Required scope: segments:write
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | ✓ | |
entity_type | enum(contact, company, deal) | ✓ | |
filter_config | object | ✓ | Filter Builder config (filter_groups + connectors). |
description | string | ||
segment_type | string | static_onetime (default) | dynamic. | |
is_public | boolean | ||
tags | array<string> |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "create_segment",
"arguments": {
"name": "\u2026",
"entity_type": "contact",
"filter_config": {}
}
}
}
create_template
Create a marketing template. Required: name, channel (email/sms/whatsapp), content. Optional: subject, preheader, category (default 'other'), status (default 'draft'), is_active, integration_id, integration_type. Variables like {{first_name}} are auto-extracted from content/subject. Requires templates:write.
Required scope: templates:write
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | ✓ | |
channel | string | ✓ | email | sms | whatsapp. |
content | string | ✓ | Template body ({{variables}} allowed). |
subject | string | Subject line (email). | |
preheader | string | ||
category | string | ||
status | string | ||
is_active | boolean | ||
description | string | ||
integration_id | string | ||
integration_type | string |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "create_template",
"arguments": {
"name": "\u2026",
"channel": "\u2026",
"content": "\u2026"
}
}
}
update_asset
Update a marketing asset's metadata (name/description/category/tags). Requires assets:write.
Required scope: assets:write
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
asset_id | string | ✓ | |
name | string | ||
description | string | ||
category | string | ||
tags | array<string> |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "update_asset",
"arguments": {
"asset_id": "\u2026"
}
}
}
update_campaign
Update a campaign by id (partial). Requires campaigns:write.
Required scope: campaigns:write
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
campaign_id | string | ✓ | |
name | string | ||
description | string | ||
template_id | string | ||
audience_id | string | ||
audience_name | string | ||
config | object | ||
status | string | ||
scheduled_at | string | ISO timestamp for scheduling. |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "update_campaign",
"arguments": {
"campaign_id": "\u2026"
}
}
}
update_segment
Update a segment by id (partial). Changing filter_config does NOT auto-evaluate — call evaluate_segment to refresh. Requires segments:write.
Required scope: segments:write
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
segment_id | string | ✓ | |
name | string | ||
description | string | ||
filter_config | object | ||
segment_type | string | ||
is_public | boolean | ||
tags | array<string> |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "update_segment",
"arguments": {
"segment_id": "\u2026"
}
}
}
update_template
Update a marketing template by id (partial). Requires templates:write.
Required scope: templates:write
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
template_id | string | ✓ | |
name | string | ||
channel | string | ||
content | string | ||
subject | string | ||
preheader | string | ||
category | string | ||
status | string | ||
is_active | boolean | ||
description | string | ||
integration_id | string | ||
integration_type | string |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "update_template",
"arguments": {
"template_id": "\u2026"
}
}
}
delete_asset
Delete a marketing asset by id. Requires assets:write.
Required scope: assets:write
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
asset_id | string | ✓ |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "delete_asset",
"arguments": {
"asset_id": "\u2026"
}
}
}
delete_campaign
Delete (cancel) a campaign by id. Requires campaigns:write.
Required scope: campaigns:write
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
campaign_id | string | ✓ |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "delete_campaign",
"arguments": {
"campaign_id": "\u2026"
}
}
}
delete_segment
Delete a segment by id. Requires segments:write.
Required scope: segments:write
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
segment_id | string | ✓ |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "delete_segment",
"arguments": {
"segment_id": "\u2026"
}
}
}
delete_template
Delete a marketing template by id. Requires templates:write.
Required scope: templates:write
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
template_id | string | ✓ |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "delete_template",
"arguments": {
"template_id": "\u2026"
}
}
}
list_assets
List/search the org's marketing assets (images, documents, media). Filters: q (name/description/filename), asset_type, category, tags. Paginated (limit/offset). Requires assets:read.
Required scope: assets:read
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | ||
asset_type | string | e.g. image, document, video. | |
category | string | ||
tags | array<string> | ||
limit | integer | ||
offset | integer |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_assets",
"arguments": {
"q": "acme"
}
}
}
list_campaigns
List/search the org's marketing campaigns. Filters: status, campaign_type, channel, q. Paginated. Requires campaigns:read.
Required scope: campaigns:read
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | e.g. draft, scheduled, running, completed. | |
campaign_type | string | ||
channel | string | email | sms | whatsapp. | |
q | string | ||
limit | integer | ||
offset | integer |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_campaigns",
"arguments": {
"q": "acme"
}
}
}
list_segments
List the org's CRM segments (saved audience filters). Optional entity_type (contact/company/deal) and tags. Paginated. Requires segments:read.
Required scope: segments:read
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
entity_type | enum(contact, company, deal) | ||
tags | array<string> | ||
limit | integer | ||
offset | integer |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_segments",
"arguments": {}
}
}
list_sms_messages
List SMS activity records, newest first. Filters: status (sent/delivered/failed/clicked), campaign_id, phone_number, and a start_date/end_date range on created_at. Paginated (limit/offset). Empty if the org has no SMS tracking. Requires communications:read.
Required scope: communications:read
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | sent | delivered | failed | clicked. | |
campaign_id | string | ||
phone_number | string | ||
start_date | string | ISO date/time; created_at >= this. | |
end_date | string | ISO date/time; created_at <= this. | |
limit | integer | ||
offset | integer |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_sms_messages",
"arguments": {}
}
}
list_templates
List/search the org's marketing templates (email/SMS/WhatsApp message templates). Filters: q (name/subject/content), channel, category, status, integration_id. Paginated (limit/offset). Requires templates:read.
Required scope: templates:read
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | Free-text search over name/subject/content. | |
channel | string | e.g. email, sms, whatsapp. | |
category | string | ||
status | string | e.g. draft, active. | |
integration_id | string | ||
limit | integer | ||
offset | integer |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_templates",
"arguments": {
"q": "acme"
}
}
}
list_voice_calls
List the org's voice calls, newest first. Filters: contact_id, direction (inbound/outbound), call_status, call_type, channel (phone/webrtc), provider, and a start_date/end_date range on created_at (ISO). Paginated (limit/offset). Requires communications:read.
Required scope: communications:read
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
contact_id | string | ||
direction | string | inbound | outbound. | |
call_status | string | e.g. completed, failed, in-progress. | |
call_type | string | e.g. human, ai. | |
channel | string | phone | webrtc. | |
provider | string | ||
start_date | string | ISO date/time; created_at >= this. | |
end_date | string | ISO date/time; created_at <= this. | |
limit | integer | ||
offset | integer |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_voice_calls",
"arguments": {}
}
}
list_whatsapp_conversations
List WhatsApp conversations (threads), most-recent activity first. Filters: q (search contact name / phone / last message), status (active/paused/closed/archived), assigned_to (agent email), unread_only, integration_id. Paginated (limit/offset). Requires communications:read.
Required scope: communications:read
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | Free-text search over contact name / phone / last message. | |
status | string | active | paused | closed | archived. | |
assigned_to | string | Agent email the thread is assigned to. | |
unread_only | boolean | ||
integration_id | string | ||
limit | integer | ||
offset | integer |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_whatsapp_conversations",
"arguments": {
"q": "acme"
}
}
}
list_whatsapp_messages
List messages in a WhatsApp conversation, oldest first. Required: conversation_id. Filters: direction (inbound/outbound), message_type (text/image/document/audio/video/…). Paginated (limit/offset). Requires communications:read.
Required scope: communications:read
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
conversation_id | string | ✓ | |
direction | string | inbound | outbound. | |
message_type | string | text | image | document | audio | video | … | |
limit | integer | ||
offset | integer |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_whatsapp_messages",
"arguments": {
"conversation_id": "\u2026"
}
}
}
evaluate_segment
(Re)evaluate a SAVED segment and return its member_count (persists the count, like the product). Pass return_records=true for a capped sample of matched records (records_limit, default 25, max 100) — omit it for a fast count-only answer. Requires segments:read.
Required scope: segments:read
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
segment_id | string | ✓ | |
return_records | boolean | ||
records_limit | integer |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "evaluate_segment",
"arguments": {
"segment_id": "\u2026"
}
}
}
preview_segment
Preview an UNSAVED filter — get the matching count (+ optional capped records) WITHOUT creating a segment. Test audience filters before saving. Required: entity_type, filter_config. return_records/records_limit as for evaluate_segment. Requires segments:read.
Required scope: segments:read
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
entity_type | enum(contact, company, deal) | ✓ | |
filter_config | object | ✓ | Filter Builder config (filter_groups + connectors). |
return_records | boolean | ||
records_limit | integer |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "preview_segment",
"arguments": {
"entity_type": "contact",
"filter_config": {}
}
}
}
send_campaign
Launch a campaign to its audience — REAL, MASS, BILLABLE outbound, no sandbox. Confirm-gated: call without confirm to get a summary + prerequisites (nothing is sent), then re-call with confirm=true to actually launch (Celery-batched send). Blocked for suspended/grace-period orgs. Requires campaigns:send.
Required scope: campaigns:send
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
campaign_id | string | ✓ | |
confirm | boolean | Must be true to actually launch the send. |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "send_campaign",
"arguments": {
"campaign_id": "\u2026"
}
}
}
upload_asset
Upload a marketing asset from a base64-encoded file. Required: file_base64 + filename (extension required). Optional mime_type (guessed from filename otherwise), category, description, tags. Bytes are stored via the org's configured storage integration (Azure Blob) and a marketing_assets row is created. Requires assets:write.
Required scope: assets:write
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
file_base64 | string | ✓ | Base64-encoded file bytes. |
filename | string | ✓ | Original filename incl. extension, e.g. logo.png. |
mime_type | string | Optional MIME type override. | |
category | string | ||
description | string | ||
tags | array<string> |
Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "upload_asset",
"arguments": {
"file_base64": "\u2026",
"filename": "\u2026"
}
}
}