Skip to main content

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

ParameterTypeRequiredDescription
asset_idstring

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

ParameterTypeRequiredDescription
campaign_idstring

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

ParameterTypeRequiredDescription
segment_idstring

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

ParameterTypeRequiredDescription
template_idstring

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

ParameterTypeRequiredDescription
call_idstring

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

ParameterTypeRequiredDescription
conversation_idstring

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

ParameterTypeRequiredDescription
namestring
campaign_typestringe.g. one_time, broadcast.
channelstringemail | sms | whatsapp.
template_idstring
integration_idstring
audience_idstringSegment/audience id to target.
audience_namestring
descriptionstring
configobject

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

ParameterTypeRequiredDescription
namestring
entity_typeenum(contact, company, deal)
filter_configobjectFilter Builder config (filter_groups + connectors).
descriptionstring
segment_typestringstatic_onetime (default) | dynamic.
is_publicboolean
tagsarray<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

ParameterTypeRequiredDescription
namestring
channelstringemail | sms | whatsapp.
contentstringTemplate body ({{variables}} allowed).
subjectstringSubject line (email).
preheaderstring
categorystring
statusstring
is_activeboolean
descriptionstring
integration_idstring
integration_typestring

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

ParameterTypeRequiredDescription
asset_idstring
namestring
descriptionstring
categorystring
tagsarray<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

ParameterTypeRequiredDescription
campaign_idstring
namestring
descriptionstring
template_idstring
audience_idstring
audience_namestring
configobject
statusstring
scheduled_atstringISO 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

ParameterTypeRequiredDescription
segment_idstring
namestring
descriptionstring
filter_configobject
segment_typestring
is_publicboolean
tagsarray<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

ParameterTypeRequiredDescription
template_idstring
namestring
channelstring
contentstring
subjectstring
preheaderstring
categorystring
statusstring
is_activeboolean
descriptionstring
integration_idstring
integration_typestring

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

ParameterTypeRequiredDescription
asset_idstring

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

ParameterTypeRequiredDescription
campaign_idstring

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

ParameterTypeRequiredDescription
segment_idstring

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

ParameterTypeRequiredDescription
template_idstring

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

ParameterTypeRequiredDescription
qstring
asset_typestringe.g. image, document, video.
categorystring
tagsarray<string>
limitinteger
offsetinteger

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

ParameterTypeRequiredDescription
statusstringe.g. draft, scheduled, running, completed.
campaign_typestring
channelstringemail | sms | whatsapp.
qstring
limitinteger
offsetinteger

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

ParameterTypeRequiredDescription
entity_typeenum(contact, company, deal)
tagsarray<string>
limitinteger
offsetinteger

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

ParameterTypeRequiredDescription
statusstringsent | delivered | failed | clicked.
campaign_idstring
phone_numberstring
start_datestringISO date/time; created_at >= this.
end_datestringISO date/time; created_at <= this.
limitinteger
offsetinteger

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

ParameterTypeRequiredDescription
qstringFree-text search over name/subject/content.
channelstringe.g. email, sms, whatsapp.
categorystring
statusstringe.g. draft, active.
integration_idstring
limitinteger
offsetinteger

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

ParameterTypeRequiredDescription
contact_idstring
directionstringinbound | outbound.
call_statusstringe.g. completed, failed, in-progress.
call_typestringe.g. human, ai.
channelstringphone | webrtc.
providerstring
start_datestringISO date/time; created_at >= this.
end_datestringISO date/time; created_at <= this.
limitinteger
offsetinteger

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

ParameterTypeRequiredDescription
qstringFree-text search over contact name / phone / last message.
statusstringactive | paused | closed | archived.
assigned_tostringAgent email the thread is assigned to.
unread_onlyboolean
integration_idstring
limitinteger
offsetinteger

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

ParameterTypeRequiredDescription
conversation_idstring
directionstringinbound | outbound.
message_typestringtext | image | document | audio | video | …
limitinteger
offsetinteger

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

ParameterTypeRequiredDescription
segment_idstring
return_recordsboolean
records_limitinteger

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

ParameterTypeRequiredDescription
entity_typeenum(contact, company, deal)
filter_configobjectFilter Builder config (filter_groups + connectors).
return_recordsboolean
records_limitinteger

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

ParameterTypeRequiredDescription
campaign_idstring
confirmbooleanMust 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

ParameterTypeRequiredDescription
file_base64stringBase64-encoded file bytes.
filenamestringOriginal filename incl. extension, e.g. logo.png.
mime_typestringOptional MIME type override.
categorystring
descriptionstring
tagsarray<string>

Example

{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "upload_asset",
"arguments": {
"file_base64": "\u2026",
"filename": "\u2026"
}
}
}