MCP server
Cadence tools
Every campaign has one cadence. These tools shape its steps, decide who enters it, and start or stop it.
| Tool | Who | Level | Confirms | What it does |
|---|---|---|---|---|
get_cadence | Admins, reps and clients | read | no | Reads a campaign's cadence: every top level step in order with its day, channel, title, subject, body and copy status, plus whether the cadence is sending and how many lead drafts sit in each status. |
cadence_settings | Admins and reps | read | no | Reads one campaign's cadence settings, which mailboxes send for it, who started and who last paused the cadence and when, and the wait before each active step. |
set_cadence_settings | Admins and reps | write | no | Changes one or more cadence settings on a campaign. |
reply_alerts | Admins and reps | read | no | Reads whether a campaign emails people the moment a lead replies: on or off, the addresses, which reply types alert, and the webhook if one is set. |
set_reply_alerts | Admins | write | no | Turns a campaign's reply alerts on or off and sets who gets them, which reply types alert, and an optional webhook. |
draft_cadence | Admins | write | no | Montana writes a whole cadence for the campaign from its setup, audience and intel, using only the channels given, over the number of days given. |
write_cadence | Admins | write | no | Replaces a campaign's whole cadence with the steps you give, in order, words included. |
edit_step | Admins | write | no | Changes one step of a campaign's cadence: its title, its wait (day_gap), its channel, or its subject and body. |
set_step_wait | Admins and reps | write | no | Sets how long the cadence waits before one step. |
approve_step_copy | Admins | write | no | Marks the template words of one step, or of every draft step, as approved. |
preview_cadence | Admins and reps | read | no | Shows everything a cadence will send before anyone approves or starts it: the writing rules and voice, every active top level step in order with its day, wait, words and approval state, and sample emails for up to 3 real leads in the cadence with the mailbox and the time each one would go. |
go_live_check | Admins and reps | read | no | One read of everything that decides whether a campaign's cadence sends: campaign and cadence state, approval mode, pilot mode, writing mode, steps and copy approval, leads by enrollment status, lead drafts by status, the mailboxes with cap and room today, the send window, and a plain list of blockers. |
approve_cadence | Admins | write | yes | Approves the whole cadence once and starts it: every step's copy is approved, every waiting lead email is approved, approve first is turned off so Montana's later emails send as written, and cadence_status becomes active. |
set_cadence_running | Admins | act | yes | on true starts or resumes a campaign's cadence, keeping the approval setting as it is. |
add_lists_to_cadence | Admins | write | yes | Starts a batch of the campaign's leads in its cadence. |
set_cadence_auto_add | Admins | write | no | Switches whether new leads added to the campaign join its cadence by themselves. |
remove_from_cadence | Admins | act | no | Stops the cadence for chosen leads in a campaign so nothing more goes to them from it, and keeps them in the campaign's dial queue as calls only, so reps keep calling them. |
set_cadence_writing | Admins | write | no | Sets three cadence switches. |
list_email_templates | Admins and reps | read | no | Lists the workspace's active email templates from Inbox Templates: name, subject, body as plain text, author and last change. |
save_email_template | Admins and reps | write | no | Creates an email template from a name, subject and plain text body, or changes one when template names an existing one. |
delete_email_template | Admins and reps | write | yes | Deletes one email template by name or id, after a preview. |
use_template_for_step | Admins | write | no | Copies an email template's subject and body into one email step of a cadence as plain text, turning the template's fields into the cadence's fields. |
Conventions for every tool are on the overview. The order to call them in is on workflows.
Tools
get_cadence
Who: Admins, reps and clients. Level: read. Confirms: no.
Reads a campaign's cadence: every top level step in order with its day, channel, title, subject, body and copy status, plus whether the cadence is sending and how many lead drafts sit in each status. Read it before any change to a cadence, and to check whether drafts are still waiting.
| Argument | Type | Required | Accepts, default and limits |
|---|---|---|---|
campaign | string | yes | Campaign id, exact name (any case), or a part of the name that matches only one campaign. Looked up inside the current workspace only. |
Returns: campaign_id, campaign, status (campaign status), cadence_status, sending (true only when the campaign is on and cadence_status is active), state (one plain line such as 'Live, cadence not started'), cadence_started and cadence_paused (only when known, a line with the time and the person), steps (array of number, step_id, step_index, channel, day, title, subject, body, copy_status 'draft' or 'approved', active), and lead_drafts {pending_approval, approved, edited, rejected, linkedin_waiting, waiting_total}. day is the running total of waits in days from step 1.
Changes: None, read only.
Good to know:
- Only top level steps are listed (parent_step_id is null). Branch steps of a graph cadence are not shown.
- Draft counts cover only steps that are on (active). Drafts of switched off steps are not counted.
- linkedin_waiting counts LinkedIn actions in 'draft' status on the campaign's LinkedIn bridge; waiting_total is pending_approval plus linkedin_waiting.
- copy_status 'draft' on an email step means that step sends nothing, not even approved lead drafts, until approve_step_copy or approve_cadence approves it.
- Use 'number' (1 based) when another tool asks for a step.
- These numbers are the step numbers every tool takes and shows (test_send, set_step_wait, edit_step, cadence_results and the rest): switched off steps keep their number.
| When | Message | What to do |
|---|---|---|
| The campaign is not found | No campaign "<name>" in this workspace. | Call list_campaigns and use the exact name or id. |
| A partial name matches more than one campaign | "<name>" matches several campaigns: A; B. Use the exact name or id. | Use the exact name or the id. |
Example call:
{
"name": "get_cadence",
"arguments": {
"campaign": "NSA / IDR (verified)"
}
}
Example result:
{
"campaign_id": "6c1e...",
"campaign": "NSA / IDR (verified)",
"status": "live",
"cadence_status": "draft",
"sending": false,
"state": "Live, cadence not started",
"steps": [
{
"number": 1,
"step_id": "a1...",
"step_index": 0,
"channel": "call",
"day": 0,
"title": "Call",
"subject": null,
"body": null,
"copy_status": "approved",
"active": true
},
{
"number": 2,
"step_id": "b2...",
"step_index": 1,
"channel": "email",
"day": 0,
"title": "Intro email",
"subject": "Quick question",
"body": "Hi {{first_name|there}}, ...",
"copy_status": "draft",
"active": true
}
],
"lead_drafts": {
"pending_approval": 33,
"approved": 12,
"edited": 2,
"rejected": 0,
"linkedin_waiting": 4,
"waiting_total": 37
}
}
cadence_settings
Who: Admins and reps. Level: read. Confirms: no.
Reads one campaign's cadence settings, which mailboxes send for it, who started and who last paused the cadence and when, and the wait before each active step. Use it before changing settings or step waits, or to answer why emails are not sending.
| Argument | Type | Required | Accepts, default and limits |
|---|---|---|---|
campaign | string | yes | Campaign id, exact name (any case), or a part of the name that matches only one campaign in this workspace. |
Returns: campaign_id, campaign, settings (the effective settings: stored values merged over defaults, so every key has a value; keys stop_on_email_reply, stop_on_call_answered, stop_on_auto_reply, rotate_mailboxes, ignore_weekends, skip_email_without_address, skip_call_without_phone, skip_linkedin_without_url, cadence_type, time_zone, email_priority, daily_start_limit, track_opens, track_clicks, montana_writes, plus connected (true when the workspace has any connected mailbox) and mailbox_caps when caps were set). sends_from is a list of "Name <address>" for the chosen connected mailboxes. sends_from_note says if none is picked. cadence_started and cadence_paused are sentences, present only when known. cadence_audit is always there: status, started_by (a name, 'not recorded' or 'never started'), started_at (in the workspace timezone, 'not recorded', or null when never started), last_paused_by (a name, 'not recorded' or 'no pause recorded') and last_paused_at. steps lists active steps in order: step (the number get_cadence shows; switched off steps keep theirs, so numbers can skip), step_id, channel, title, wait_before in words.
Changes: None, read only
Good to know:
- Defaults when never set: stop_on_email_reply true, stop_on_call_answered false, stop_on_auto_reply true, rotate_mailboxes true, ignore_weekends true, all three skip rules true, cadence_type outbound, time_zone the workspace timezone (else America/New_York), email_priority follow_ups_first, daily_start_limit null (no limit), track_opens false, track_clicks false, montana_writes true.
- Only mailboxes chosen for the campaign and still connected are listed. Since 1 December there is no fallback to the lead owner's mailbox: with none chosen and an active email step, no email sends. Use set_cadence_mailboxes to pick.
- Step numbers are the ones get_cadence shows: switched off steps keep their number. Use them, or step_id, with set_step_wait.
- wait_before is the wait after the parent step for a branching step, else the wait after the step before. It reads straight away, N days, N hours or N minutes.
- Email approval (approve_each_email) and write mode are not in these settings. They belong to set_cadence_writing.
- Who started or paused a cadence is recorded since 2 December; earlier switches read 'not recorded'. last_paused_by stays after the cadence is resumed, so it is the last pause, not only a current one.
| When | Message | What to do |
|---|---|---|
| campaign left empty | Name a campaign (its name or id). list_campaigns shows them. | Pass the campaign name or id. |
| a partial name matches more than one campaign | "<text>" matches several campaigns: <names>. Use the exact name or id. | Repeat with the exact name or the id. |
| no campaign matches | No campaign "<text>" in this workspace. | Call list_campaigns and use a name or id from it. |
| the database cannot see the campaign | Campaign not found | Check the campaign is in this workspace. |
Example call:
{
"name": "cadence_settings",
"arguments": {
"campaign": "Dental clinics Texas"
}
}
Example result:
{
"campaign_id": "6f1c2a10-0000-4000-8000-000000000001",
"campaign": "Dental clinics Texas",
"settings": {
"stop_on_email_reply": true,
"stop_on_call_answered": false,
"stop_on_auto_reply": true,
"rotate_mailboxes": true,
"ignore_weekends": true,
"skip_email_without_address": true,
"skip_call_without_phone": true,
"skip_linkedin_without_url": true,
"cadence_type": "outbound",
"time_zone": "America/Chicago",
"email_priority": "follow_ups_first",
"daily_start_limit": null,
"track_opens": false,
"track_clicks": false,
"montana_writes": true,
"connected": true
},
"sends_from": [
"Sam Reed <sam@acme-mail.com>"
],
"sends_from_note": "Chosen mailboxes.",
"cadence_started": "started Nov 28, 2026, 9:14 AM CST by Sam Reed",
"steps": [
{
"step": 1,
"step_id": "a1b2c3d4-0000-4000-8000-000000000011",
"channel": "email",
"title": "Intro email",
"wait_before": "straight away"
},
{
"step": 2,
"step_id": "a1b2c3d4-0000-4000-8000-000000000012",
"channel": "call",
"title": "First call",
"wait_before": "2 days"
}
],
"cadence_audit": {
"status": "active",
"started_by": "Sara Khan",
"started_at": "Dec 2, 2026, 10:14 AM CST",
"last_paused_by": "no pause recorded",
"last_paused_at": null
}
}
set_cadence_settings
Who: Admins and reps. Level: write. Confirms: no.
Changes one or more cadence settings on a campaign. Only the keys you send change, and a key sent as null goes back to its default. It runs as the calling person, so only a workspace admin or a rep on that campaign may do it.
| Argument | Type | Required | Accepts, default and limits |
|---|---|---|---|
campaign | string | yes | Campaign id, exact name (any case), or a part of the name that matches only one campaign in this workspace. |
settings | object | yes | A JSON object of only the keys to change. A JSON text string of the object is also parsed. Allowed keys and values: stop_on_email_reply (boolean, default true); stop_on_call_answered (boolean, default false); stop_on_auto_reply (boolean, default true); rotate_mailboxes (boolean, default true); ignore_weekends (boolean, default true); skip_email_without_address (boolean, default true); skip_call_without_phone (boolean, default true); skip_linkedin_without_url (boolean, default true); track_opens (boolean, default false); track_clicks (boolean, default false); montana_writes (boolean, default true); cadence_type (outbound, inbound, nurture, event or re_engage, default outbound); time_zone (an IANA zone name such as America/New_York, default the workspace timezone); email_priority (follow_ups_first or new_first, default follow_ups_first); daily_start_limit (whole number 1 to 100000, or null for no limit, default null). Booleans must be real JSON true or false inside the object; the text "true" is refused by the database. Any other key is refused. Not accepted here: approve_each_email, email_approval_mode, write mode, mailboxes, send window, auto add. |
Returns: campaign and changed: an object keyed by each setting sent, each with was and now (effective values before and after, so a default shows its real value). Because it returns an undo, the server adds action_id and undo_with: "undo_action".
Changes: Writes campaigns.cadence_settings. stop_on_email_reply is stored on campaigns.cadence_exit_on_response instead. Nothing is sent and nothing is charged. The new values steer future sends: for example track_opens adds the open pixel to cadence emails sent from now on, and montana_writes false stops Montana writing lead drafts on its own for this cadence.
Undo: Yes. The undo calls set_cadence_settings again with each changed key set to its value before the change. A key that was on its default comes back as that value stored explicitly, not as unset. Only while the changed fields still hold what this change set; if someone changed them since, undo refuses and says so.
Good to know:
- All keys are checked by the tool first, then each value by the database. A bad value stops the whole call, so nothing changes.
- daily_start_limit caps how many new leads may start step 1 per day.
- time_zone is used for weekend math and the email send window.
- Tracking only applies to emails sent after the change; earlier emails have no pixel or tracked links.
- Read current values with cadence_settings first if you need to tell the person what changes.
| When | Message | What to do |
|---|---|---|
| campaign left empty | Name a campaign (its name or id). list_campaigns shows them. | Pass the campaign name or id. |
| a partial name matches more than one campaign | "<text>" matches several campaigns: <names>. Use the exact name or id. | Repeat with the exact name or the id. |
| no campaign matches | No campaign "<text>" in this workspace. | Call list_campaigns and use a name or id from it. |
| settings is an empty object | Say which settings to change. | Send at least one key. |
| a key is not a known setting | Not a cadence setting: <keys>. The settings are stop_on_email_reply, stop_on_call_answered, ..., daily_start_limit. | Use only the listed keys. For email approval use set_cadence_writing, for mailboxes set_cadence_mailboxes. |
| the caller is not an admin and not a member of this campaign, or is a client | Not allowed to change this cadence | Ask a workspace admin, or have the person added to the campaign. |
| a boolean key got a non boolean value | <key> must be true or false | Send JSON true or false. |
| bad cadence_type | cadence_type must be outbound, inbound, nurture, event or re_engage | Use one of those. |
| bad email_priority | email_priority must be follow_ups_first or new_first | Use one of those. |
| time_zone is not a known zone | time_zone must be an IANA time zone, like America/New_York | Use a zone name like America/Chicago. |
| daily_start_limit not a whole number from 1 to 100000 | daily_start_limit must be a whole number from 1 to 100000, or null for no limit | Send a whole number, or null for no limit. |
| settings is text that is not valid JSON | Something went wrong: <JSON parse error> | Send settings as an object. |
Example call:
{
"name": "set_cadence_settings",
"arguments": {
"campaign": "Dental clinics Texas",
"settings": {
"track_opens": true,
"daily_start_limit": 40
}
}
}
Example result:
{
"campaign": "Dental clinics Texas",
"changed": {
"track_opens": {
"was": false,
"now": true
},
"daily_start_limit": {
"was": null,
"now": 40
}
},
"action_id": "0b5e7c11-0000-4000-8000-000000000021",
"undo_with": "undo_action"
}
reply_alerts
Who: Admins and reps. Level: read. Confirms: no.
Reads whether a campaign emails people the moment a lead replies: on or off, the addresses, which reply types alert, and the webhook if one is set.
| Argument | Type | Required | Accepts, default and limits |
|---|---|---|---|
campaign | string | yes | Campaign id, exact name (any case), or a part of the name that matches only one campaign in this workspace. |
Returns: campaign_id, campaign, reply_alerts: on (boolean, default false), to (list of addresses), intents (reply types that alert, default interested, question, other), webhook_url (https address or null).
Changes: None. Reads only.
Undo: Nothing to undo.
Good to know:
- The same settings show inside cadence_settings under reply_alerts once they have been saved.
| When | Message | What to do |
|---|---|---|
| campaign left empty | Name a campaign (its name or id). list_campaigns shows them. | Pass the campaign name or id. |
Example call:
{
"name": "reply_alerts",
"arguments": {
"campaign": "Dental clinics Texas"
}
}
Example result:
{
"campaign_id": "6f1c2a10-0000-4000-8000-000000000001",
"campaign": "Dental clinics Texas",
"reply_alerts": {
"on": true,
"to": [
"sam@acme.com"
],
"intents": [
"interested",
"question",
"other"
],
"webhook_url": null
}
}
set_reply_alerts
Who: Admins. Level: write. Confirms: no.
Turns a campaign's reply alerts on or off and sets who gets them, which reply types alert, and an optional webhook. The alert email comes from Sales Montana itself, never from the prospect facing mailbox. Only the keys given change; null puts a key's default back. Workspace admins only, because the alert emails and the webhook carry every reply in the campaign, including replies to other people's mailboxes.
| Argument | Type | Required | Accepts, default and limits |
|---|---|---|---|
campaign | string | yes | Campaign id, exact name (any case), or a part of the name that matches only one campaign in this workspace. |
on | boolean | no | True or false. Default: False. Turned on with no addresses, the caller's own email is added. |
to | array of strings | no | Email addresses. A comma separated string is also split. Default: []. At most 10. |
intents | array of strings | no | Interested, question, objection, not_interested, other (a referral or any other reply from a person), unsubscribe (opt out), auto_reply (out of office included) Default: ['interested', 'question', 'other']. Any other value is refused. |
webhook_url | string | no | An https address. An empty string removes it. 2000 characters. Gets one JSON POST per alert, 8 second timeout, no retries. |
Returns: campaign, reply_alerts (the settings after the change) and changed: each key sent with was and now. Because it returns an undo, the server adds action_id and undo_with: "undo_action".
Changes: Writes campaigns.cadence_settings.reply_alerts. From then on, each reply a person sends to this campaign's outreach, of a type that is picked, emails the listed addresses once (subject "<Person> at <Firm> replied, reply now", with HOT: in front for an interested reply) and posts to the webhook if set. Replies older than a day, our own mail and a second copy of the same message are never alerted.
Undo: Yes, while the alert settings still hold what this change set. undo_action calls set_reply_alerts again with each changed key set to its earlier value; if any of those keys changed since, it refuses and says so.
Good to know:
- The webhook payload has event lead.replied, subject, intent, intent_label, person, person_email, firm, city, campaign, campaign_id, reply_text, reply_subject, received_at, mailbox, replied_to_subject, replied_to_step, thread_url, lead_url and totals (emails_sent, replies, hot_leads).
| When | Message | What to do |
|---|---|---|
| no key given | Say what to change: on, to, intents or webhook_url. | Pass at least one of them. |
| a bad address | Not an email address: <value> | Fix the address. |
| an unknown reply type | Not a reply type: <value>. The types are ... | Use one of the listed types. |
| the caller may not manage this cadence | Not allowed to change this cadence | Ask a workspace admin or a rep on the campaign. |
| The caller is not a workspace admin | Only a workspace admin can do this. | Ask a workspace admin. |
Example call:
{
"name": "set_reply_alerts",
"arguments": {
"campaign": "Dental clinics Texas",
"on": true,
"to": [
"sam@acme.com"
]
}
}
Example result:
{
"campaign": "Dental clinics Texas",
"reply_alerts": {
"on": true,
"to": [
"sam@acme.com"
],
"intents": [
"interested",
"question",
"other"
],
"webhook_url": null
},
"changed": {
"on": {
"was": false,
"now": true
},
"to": {
"was": [],
"now": [
"sam@acme.com"
]
}
},
"action_id": "0b5e7c11-0000-4000-8000-000000000031",
"undo_with": "undo_action"
}
draft_cadence
Who: Admins. Level: write. Confirms: no.
Montana writes a whole cadence for the campaign from its setup, audience and intel, using only the channels given, over the number of days given. The steps are saved as drafts, the cadence is set to draft and approve first is turned on. Nothing sends until approve_cadence.
| Argument | Type | Required | Accepts, default and limits |
|---|---|---|---|
campaign | string | yes | Campaign id, exact name (any case), or a part of the name that matches only one campaign. Looked up inside the current workspace only. |
channels | array of strings | no | Email, call, linkedin_engage, linkedin_connect, linkedin_message, task. Default: linkedin_engage, email, call, linkedin_connect, linkedin_message. Unknown values are dropped by the backend. |
days | number | no | Whole days. Default: 14. 3 to 60, rounded. Advice in the description: 14 for a trigger campaign, 21 otherwise. Pass 21 yourself; the default is 14. |
context | string | no | What the person wants from this outreach, in their words. 1500 characters. |
replace | boolean | no | True. Default: false. Required when the campaign already has any steps. |
Returns: campaign_id, approval_needed (true), steps: each number, day, channel, title, subject, body.
Changes: Runs an AI call (campaign-plan setup_cadence). Deletes every existing step (and by cascade every lead draft for them), inserts the new steps with copy_status draft, and sets the campaign's cadence_status to 'draft' and email_approval_mode to 'approve_first'. Nothing is sent. This code does not charge credits.
Good to know:
- With replace: true on a running cadence it STOPS it: cadence_status goes back to 'draft' and approve first is turned back on.
- All copy lands as draft, so even call steps need approval; approve_cadence approves all steps at once.
- The step count check counts every step row, branch steps included.
| When | Message | What to do |
|---|---|---|
| The campaign is not found | No campaign "<name>" in this workspace. | Call list_campaigns and use the exact name or id. |
| A partial name matches more than one campaign | "<name>" matches several campaigns: A; B. Use the exact name or id. | Use the exact name or the id. |
| The campaign already has steps and replace is not true | <campaign> already has a <n> step cadence. Say replace: true to write a new one, or use edit_step. | Ask the person, then send replace: true. |
| No allowed channel left | Choose at least one channel. | Send valid channels. |
| The AI returned fewer than 2 steps | Montana could not design the cadence just now. Try again. | Try again. |
| Other backend failure | The backend's error, or 'Montana could not write the cadence just now.' | Try again later. |
Example call:
{
"name": "draft_cadence",
"arguments": {
"campaign": "Dental clinics TX",
"channels": [
"email",
"call",
"linkedin_connect"
],
"days": 21,
"context": "Book a 15 minute demo of the AI receptionist."
}
}
Example result:
{
"campaign_id": "6c1e...",
"approval_needed": true,
"steps": [
{
"number": 1,
"day": 1,
"channel": "email",
"title": "Intro",
"subject": "Missed calls at {{company}}",
"body": "Hi {{first_name|there}}, ..."
},
{
"number": 2,
"day": 3,
"channel": "call",
"title": "Call",
"subject": null,
"body": null
}
]
}
write_cadence
Who: Admins. Level: write. Confirms: no.
Replaces a campaign's whole cadence with the steps you give, in order, words included. Every old step is deleted, and with it every lead draft written for the old steps. Use it to build a cadence from scratch. To change one step use edit_step.
| Argument | Type | Required | Accepts, default and limits |
|---|---|---|---|
campaign | string | yes | Campaign id, exact name (any case), or a part of the name that matches only one campaign. Looked up inside the current workspace only. |
steps | array of objects | yes | Objects { channel, day_gap, title, subject, body }; JSON text of the array is also read. 1 to 15 steps. channel one of call, task, email, sms, linkedin_connect, linkedin_message, linkedin_engage (missing means call). day_gap whole days 0 to 60, rounded. title up to 60 characters. subject up to 200, kept only on email steps. body up to 4000, kept only on email, sms, linkedin_message and linkedin_connect steps. Day_gap is the wait after the step before. The first step's wait is always 0. A missing or non numeric day_gap on a later step becomes 2 days (delay_minutes is also read if day_gap is absent). Default titles: 'Call', 'Email N' or 'Step N'. |
Returns: campaign_id, campaign, replaced_steps (how many steps were there before), steps (each step_id, step_index, channel, day, title, subject, body, copy_status, active).
Changes: Deletes every step of the campaign (branch steps too) and inserts the new ones. Deleting a step deletes every lead draft (cadence_drafts) written for it, by a cascade in the database. Sends nothing and charges nothing.
Good to know:
- Email, sms and linkedin_message steps always land with copy_status 'draft'. A linkedin_connect step is 'draft' only if it has a body. call, task and linkedin_engage steps land 'approved'.
- Nothing sends on a draft email step until approve_step_copy or approve_cadence approves it. Montana only writes lead drafts for approved steps.
- It does not change cadence_status. On a running cadence, leads keep their step position and carry on with whatever step now sits at that position.
- There is no transaction: the old steps are deleted before the new ones are inserted, so a failed insert leaves the campaign with no steps.
- Templates should use only {{first_name|there}}, {{first_name}}, {{company}} and {{sender_first_name}}. This is not checked here, but approve_step_copy and approve_cadence refuse other placeholders and gaps left by a fill.
- Ask the person first when get_cadence shows lead drafts, because they are all deleted.
| When | Message | What to do |
|---|---|---|
| The campaign is not found | No campaign "<name>" in this workspace. | Call list_campaigns and use the exact name or id. |
| A partial name matches more than one campaign | "<name>" matches several campaigns: A; B. Use the exact name or id. | Use the exact name or the id. |
| steps is empty or not a list | Give at least one step. | Send a list of steps. |
| More than 15 steps | Keep a cadence to 15 steps or fewer. | Cut the cadence to 15 steps. |
| A channel is not known | Unknown channel "<x>". Use call, task, email, sms, linkedin_connect, linkedin_message, linkedin_engage. | Use one of the listed channels. |
Example call:
{
"name": "write_cadence",
"arguments": {
"campaign": "Dental clinics TX",
"steps": [
{
"channel": "email",
"day_gap": 0,
"title": "Intro",
"subject": "Front desk calls",
"body": "Hi {{first_name|there}},\n\n...\n\n{{sender_first_name}}"
},
{
"channel": "call",
"day_gap": 2,
"title": "Call"
}
]
}
}
Example result:
{
"campaign_id": "6c1e...",
"campaign": "Dental clinics TX",
"replaced_steps": 4,
"steps": [
{
"step_id": "c3...",
"step_index": 0,
"channel": "email",
"day": 0,
"title": "Intro",
"subject": "Front desk calls",
"body": "Hi {{first_name|there}}, ...",
"copy_status": "draft",
"active": true
},
{
"step_id": "d4...",
"step_index": 1,
"channel": "call",
"day": 2,
"title": "Call",
"subject": null,
"body": null,
"copy_status": "approved",
"active": true
}
]
}
edit_step
Who: Admins. Level: write. Confirms: no.
Changes one step of a campaign's cadence: its title, its wait (day_gap), its channel, or its subject and body. Changing the subject or body puts the step's copy back to draft. Use it for small fixes instead of rewriting the cadence.
| Argument | Type | Required | Accepts, default and limits |
|---|---|---|---|
campaign | string | yes | Campaign id, exact name (any case), or a part of the name that matches only one campaign. Looked up inside the current workspace only. |
step | string | yes | Step number (1 is the first) or step id. Numbers count top level steps by step_index. |
title | string | no | Text. 60 characters. Empty text keeps the old title. |
day_gap | number | no | Whole days. 0 to 60, rounded; a non number becomes 0. Always 0 on step 1. |
channel | string | no | Call, task, email, sms, linkedin_connect, linkedin_message, linkedin_engage. Changing the channel alone does not touch subject, body or copy_status. |
subject | string | no | Text. 200 characters. Empty text clears it. Sets copy_status to draft. |
body | string | no | Text. 4000 characters. Empty text clears it. Sets copy_status to draft. |
Returns: campaign_id, campaign, and steps: the whole cadence after the change (step_id, step_index, channel, day, title, subject, body, copy_status, active). action_id and undo_with are added.
Changes: Updates one campaign_steps row. Lead drafts already written for the step keep their text. Sends nothing.
Undo: Yes. undo_action puts back the step's title, wait, channel, subject, body and copy_status as they were.
Good to know:
- Changing the words of an email step on a running cadence holds every send on that step, approved lead drafts included, until the copy is approved again with approve_step_copy (the sender holds a step whose copy_status is draft).
- The wait (day_gap) is days only. set_step_wait in another file takes days and hours.
| When | Message | What to do |
|---|---|---|
| The campaign is not found | No campaign "<name>" in this workspace. | Call list_campaigns and use the exact name or id. |
| A partial name matches more than one campaign | "<name>" matches several campaigns: A; B. Use the exact name or id. | Use the exact name or the id. |
| The step number or id is not one of the campaign's steps | No step <ref> in this campaign. Steps are numbered 1 to <n> (switched off steps keep their number); get_cadence lists them. | Read get_cadence and use the number shown there. |
| Unknown channel | Unknown channel "<x>". | Use one of the seven channels. |
| Nothing to change was sent | Say what to change: title, day_gap, channel, subject or body. | Send at least one field. |
Example call:
{
"name": "edit_step",
"arguments": {
"campaign": "Dental clinics TX",
"step": "2",
"day_gap": 3,
"body": "Hi {{first_name|there}}, a shorter version..."
}
}
Example result:
{
"campaign_id": "6c1e...",
"campaign": "Dental clinics TX",
"steps": [
{
"step_id": "d4...",
"step_index": 1,
"channel": "email",
"day": 3,
"title": "Follow up",
"subject": "Re: front desk",
"body": "Hi {{first_name|there}}, a shorter version...",
"copy_status": "draft",
"active": true
}
],
"action_id": "9f2...",
"undo_with": "undo_action"
}
set_step_wait
Who: Admins and reps. Level: write. Confirms: no.
Sets how long the cadence waits before one step. For a straight line cadence the wait counts from the step before; for a branching step it counts from its parent step. Give days, hours or both. Only a workspace admin or a rep on the campaign may change it.
| Argument | Type | Required | Accepts, default and limits |
|---|---|---|---|
campaign | string | yes | Campaign id, exact name (any case), or a part of the name that matches only one campaign in this workspace. |
step | string | yes | Step number as get_cadence shows it (1 is the first, switched off steps keep their number), or the step id from cadence_settings. A number sent as a JSON number also works. A non whole number such as 1.5 finds no step. |
days | number | no | Whole days. Default: 0 when only hours is given. Rounded to a whole number, clamped 0 to 365; text that is not a number counts as 0. |
hours | number | no | Whole hours. Default: 0 when only days is given. Rounded to a whole number, clamped 0 to 8760. The total wait must be at most 525600 minutes (365 days), or the database refuses it. |
Returns: campaign, step (number), title, wait_was and wait_now in words (straight away, N days, N hours, N minutes). The server adds action_id and undo_with: "undo_action".
Changes: Updates campaign_steps.delay_minutes, or wait_minutes_after_parent for a branching step. Nothing is sent or charged. The code does not move the next time already set for leads waiting on that step.
Undo: Yes. The undo calls set_step_wait with the step id and the old wait as whole days and rounded hours, so an old wait with odd minutes comes back rounded to the hour. Only while the changed fields still hold what this change set; if someone changed them since, undo refuses and says so.
Good to know:
- Step numbers are the same in every tool: the place among the top level steps, switched off ones included, as get_cadence shows them.
- When ignore_weekends is on (the default), the wait skips Saturday and Sunday in the cadence time zone.
- Sending days: 0 and no hours makes the step go straight away.
| When | Message | What to do |
|---|---|---|
| campaign left empty | Name a campaign (its name or id). list_campaigns shows them. | Pass the campaign name or id. |
| a partial name matches more than one campaign | "<text>" matches several campaigns: <names>. Use the exact name or id. | Repeat with the exact name or the id. |
| no campaign matches | No campaign "<text>" in this workspace. | Call list_campaigns and use a name or id from it. |
| the step number or id does not match a step | No step <x> in <campaign>. Steps are numbered 1 to <n> (switched off steps keep their number); get_cadence lists them. | Read the steps with cadence_settings. |
| neither days nor hours given | Give days or hours. | Send days, hours or both. Send days: 0 for straight away. |
| total wait above 365 days | minutes must be from 0 to 525600 | Use a shorter wait. |
| caller may not manage this cadence | Not allowed to change this cadence | Ask a workspace admin, or have the person added to the campaign. |
Example call:
{
"name": "set_step_wait",
"arguments": {
"campaign": "Dental clinics Texas",
"step": "2",
"days": 3
}
}
Example result:
{
"campaign": "Dental clinics Texas",
"step": 2,
"title": "First call",
"wait_was": "2 days",
"wait_now": "3 days",
"action_id": "0b5e7c11-0000-4000-8000-000000000031",
"undo_with": "undo_action"
}
approve_step_copy
Who: Admins. Level: write. Confirms: no.
Marks the template words of one step, or of every draft step, as approved. Approved email and LinkedIn note or message steps are what Montana writes each lead's own drafts from, and on a running cadence an approved step can send. Show the person preview_cadence first.
| Argument | Type | Required | Accepts, default and limits |
|---|---|---|---|
campaign | string | yes | Campaign id, exact name (any case), or a part of the name that matches only one campaign. Looked up inside the current workspace only. |
step | string | no | Step number or step id. Default: every step whose copy is draft. |
Returns: approved_steps (number of rows set to approved) and what_will_send: leads_in_cadence, steps (lines like '2. email "Intro" (copy not approved)'), emails_per_lead, approve_each_email, lead_emails_waiting_approval, sends_from, no_sender, send_window, cadence_now, starts, first_email, see_everything.
Changes: Sets copy_status to approved on the chosen draft steps. Once an email or LinkedIn step is approved, Montana's background writer may start writing each lead's own drafts for it (when the cadence setting montana_writes is not false). Sends nothing by itself, but on a running cadence approved steps can send.
Good to know:
- The blanks check looks at the one step given, or at active draft steps when no step is given. Without a step, the update also approves draft steps that are switched off, and those are not checked.
- Blanks it refuses: unknown {{fields}} or {single} braces, two spaces inside a line, a space before a comma or full stop, a line ending on 'by' or 'for', empty brackets, a line ending on 'ID' or 'No.'. Allowed fields: first_name, company, company_name, sender_first_name, sender_name, my_name.
- An email, sms or linkedin_message step with an empty body stays draft (a database trigger), but it may still be counted in approved_steps.
- If you plan to load your own lead drafts with set_lead_drafts, turn Montana's writing off first (set_cadence_settings montana_writes false), because approving the copy is what lets Montana start writing.
| When | Message | What to do |
|---|---|---|
| The campaign is not found | No campaign "<name>" in this workspace. | Call list_campaigns and use the exact name or id. |
| A partial name matches more than one campaign | "<name>" matches several campaigns: A; B. Use the exact name or id. | Use the exact name or the id. |
| The step number or id is not one of the campaign's steps | No step <ref> in this campaign. Steps are numbered 1 to <n> (switched off steps keep their number); get_cadence lists them. | Read get_cadence and use the number shown there. |
| The words have a gap or an unknown placeholder left by a fill | Not approved: the copy still has blanks a fill left behind. step 2 (Intro) body: unfilled placeholder {{city}}. Fix the words (edit_step) and approve again. Only {{first_name}}, {{first_name/...}}, {{company}} and {{sender_first_name}} are filled at send time. | Fix the words with edit_step, then approve again. |
Example call:
{
"name": "approve_step_copy",
"arguments": {
"campaign": "Dental clinics TX"
}
}
Example result:
{
"approved_steps": 3,
"what_will_send": {
"leads_in_cadence": 120,
"steps": [
"1. email \"Intro\"",
"2. call \"Call\"",
"3. email \"Follow up\""
],
"emails_per_lead": 2,
"approve_each_email": true,
"lead_emails_waiting_approval": 0,
"sends_from": [
"anna@clinicgrowth.co"
],
"send_window": "weekdays 9:00 to 17:00, each lead's own time",
"cadence_now": "draft",
"starts": "When the cadence starts (approve_cadence, set_pilot_mode on, or set_cadence_running on).",
"first_email": "Step 1, as soon as a lead reaches it inside the send window"
}
}
preview_cadence
Who: Admins and reps. Level: read. Confirms: no.
Shows everything a cadence will send before anyone approves or starts it: the writing rules and voice, every active top level step in order with its day, wait, words and approval state, and sample emails for up to 3 real leads in the cadence with the mailbox and the time each one would go. Leads with no saved drafts get a fresh AI written preview that is never saved. Use it before approve_cadence or set_cadence_running.
| Argument | Type | Required | Accepts, default and limits |
|---|---|---|---|
campaign | string | yes | Campaign id, exact name (case does not matter), or a part of the name that matches only one campaign in the workspace. |
leads | array of strings | no | Up to 3 leads: id, phone, exact name or a unique part of the name. Only the first 3 are used. Each lead must have an enrollment in this campaign with status queued, in_progress or paused, or the call fails. When given, sample_leads is ignored. |
sample_leads | number | no | 0 to 3. Default: 3. Clamped to 0..3. Used only when leads is not given. Picks from the first 40 enrollments (queued or in_progress, oldest enrolled first), leads with a contact email first. |
write_samples | boolean | no | True or false. Default: true. True: leads with any written step (email, LinkedIn connect note, LinkedIn message) that has no saved draft get a preview written now by the AI writer, not saved. false: the step templates are shown instead and samples_note says how many leads have no saved emails. |
Returns: An object: campaign_id, campaign, cadence_status, how_emails_are_written (writer_rules, workspace_writing_rules, voice, campaign_brief, what_the_writer_knows_about_the_business, cold_email_method, checks_before_an_email_can_go), steps (number, day, wait_before, channel, title, approval, plus subject and body for email, note_or_message for LinkedIn, purpose, call_script and voicemail_script for calls), runs_over_days, timing_note, samples (per lead: lead, company_id, writes_to, in_cadence, not_in_cadence, lead_time_zone, error, steps timeline with words_from, to, subject, subject_note, body, from, when, waits_for), samples_note, what_will_send (the sendSummary: leads_in_cadence, leads_not_in_cadence, not_in_cadence, steps, emails_per_lead, approve_each_email, lead_emails_waiting_approval, sends_from, no_sender, send_window, cadence_now, starts, first_email). Empty fields are left out.
Changes: Read only in the data: nothing is sent, saved or approved. With write_samples true it makes AI calls to write the previews (AI usage is recorded); no credit charge is made in this code path.
Good to know:
- Times are worked out with the campaign's send window and each lead's zone as this tool reads it (cadence time_zone setting first, then the phone). The real sender uses the phone zone, else the workspace zone, and ignores the cadence time_zone, so times can differ. See C-facts.md.
- A follow up email is shown with 'Re: <first subject>' because the sender replies in the first email's thread.
- After a call step the timeline stops giving clock times: later steps say 'after the step N call is made'.
- checks_before_an_email_can_go says a flagged email waits for a person whatever the approval setting. In the email sender code a lead draft with status pending_approval is sent as written when approval is off (auto), and nothing reads the qa_flag, so with approval off a flagged email may send. Treat that line with care.
- Up to 3 samples; the AI preview helper writes for at most 5 enrollments.
- Sample leads come from the leads in the cadence. When none are in it, leads only in the campaign are used: their timeline says 'once this lead is added to the cadence (add_lists_to_cadence)' instead of a time, and not_in_cadence says nothing goes to them yet.
- from is the first chosen mailbox that is connected and not paused. With none it says 'no mailbox can send'. There is no fallback to the lead owner's mailbox.
| When | Message | What to do |
|---|---|---|
| No campaign argument | Name a campaign (its name or id). list_campaigns shows them. | Pass the campaign name or id. |
| A partial name matches several campaigns | "<ref>" matches several campaigns: A; B. Use the exact name or id. | Use the exact name or the id. |
| Nothing matches | No campaign "<ref>" in this workspace. | Check list_campaigns. Staff may need to pass workspace. |
| The campaign has no active top level steps | <campaign> has no steps yet. write_cadence or draft_cadence first. | Build the cadence first. |
| A lead in leads is not in this cadence (no queued, in_progress or paused enrollment) | <lead> is not in <campaign>'s cadence. | Pick a lead that is in the cadence, or leave leads out. |
| A lead reference matches several leads | "<ref>" matches several leads: ... Use the id. | Use the lead id. |
Example call:
{
"name": "preview_cadence",
"arguments": {
"campaign": "Happy Billing Q1",
"sample_leads": 2
}
}
Example result:
{
"campaign_id": "6f1c0d2e-1111-4a3b-9c2d-0a1b2c3d4e5f",
"campaign": "Happy Billing Q1",
"cadence_status": "draft",
"steps": [
{
"number": 1,
"day": 1,
"wait_before": "starts when the lead enters the cadence",
"channel": "email",
"title": "Intro",
"approval": "approved",
"subject": "Billing at {{company}}",
"body": "Hi {{first_name|there}}, ..."
},
{
"number": 2,
"day": 4,
"wait_before": "3 days after step 1",
"channel": "email",
"title": "Follow up",
"approval": "copy not approved",
"subject": "",
"body": "Quick nudge ..."
}
],
"runs_over_days": 4,
"samples": [
{
"lead": "Acme Dental",
"company_id": "a1b2c3d4-0000-4000-8000-000000000001",
"writes_to": "jo@acmedental.com",
"lead_time_zone": "America/Chicago",
"steps": [
{
"step": 1,
"channel": "email",
"words_from": "preview of what Montana would write (not saved)",
"to": "jo@acmedental.com",
"subject": "Billing at Acme Dental",
"body": "Hi Jo, ...",
"from": "Sam Lee <sam@happybilling.com>",
"when": "Tue, Dec 3, 9:00 AM (America/Chicago)"
},
{
"step": 2,
"channel": "email",
"subject": "Re: Billing at Acme Dental",
"subject_note": "Sent as a reply in the first email's thread, so it keeps that subject.",
"from": "Sam Lee <sam@happybilling.com>",
"waits_for": "the step copy to be approved"
}
]
}
],
"what_will_send": {
"leads_in_cadence": 42,
"emails_per_lead": 2,
"approve_each_email": true,
"sends_from": [
"sam@happybilling.com"
],
"cadence_now": "draft"
}
}
go_live_check
Who: Admins and reps. Level: read. Confirms: no.
One read of everything that decides whether a campaign's cadence sends: campaign and cadence state, approval mode, pilot mode, writing mode, steps and copy approval, leads by enrollment status, lead drafts by status, the mailboxes with cap and room today, the send window, and a plain list of blockers. Read it before and after every go live step.
| Argument | Type | Required | Accepts, default and limits |
|---|---|---|---|
campaign | string | yes | Campaign id, exact name (case does not matter), or a part of the name that matches only one campaign in the workspace. |
Returns: An object: campaign_id, campaign, workspace, campaign_status, campaign_on, cadence_status, sending_now, approve_each_email, pilot_mode, montana_writes, steps (number, channel, title, copy, wait_days_before), leads {queued, in_progress, held_or_paused, finished, left} (leads in the cadence only), leads_in_campaign_not_in_cadence, not_in_cadence (a sentence, when some leads in the campaign are not in the cadence), new_leads_join_cadence, lead_drafts {waiting_approval, approved, edited, rejected}, emails_due_waiting_to_send (open cadence email tasks), mailboxes (mailbox, name, status, sending on/paused/not connected, paused_reason, health, cap_here, mailbox_daily_limit, gap_minutes, sent_here_last_24h, sent_all_last_24h, room_today), mailboxes_chosen, send_window, send_window_is_campaigns_own, time_zone, daily_start_limit, rotate_mailboxes, blocks_sending (list of strings, empty when ready), when_it_runs, next, link. Read blocks_sending first.
Changes: None, read only.
Good to know:
- room_today = max(0, min(mailbox daily limit minus everything it sent in the last 24 hours, this cadence's cap minus what it sent for this campaign in the last 24 hours)). The mailbox limit is shared by every cadence and every manual send; the cap is per cadence.
- When no mailbox is chosen, the mailboxes list still shows the workspace's connected mailboxes that have an owner. None of them will send: blocks_sending says no mailbox is chosen.
- finished counts enrollments with status completed: the lead passed its last step. For an email step that means it was handed to the sender, not that the email went out. emails_due_waiting_to_send shows email tasks still waiting.
- time_zone shows the cadence's time_zone setting if set. The email sender does not use it for the send window (it uses the lead's phone zone, else the workspace zone).
- pilot_mode is true when review_until is in the past and approval is off.
- montana_writes reads cadence_settings.write_mode only. The separate cadence setting montana_writes false (set_cadence_settings) also stops automatic writing and is not shown here.
- when_it_runs says with approve first on 'a lead with no own email gets the approved step template'. For steps Montana writes (template_key montana) the dispatcher holds the step until the lead's own draft is approved, so this is only true for steps not written by Montana.
- Lead counts are leads in the cadence (in_cadence true). Leads that are in the campaign but not added to the cadence are counted apart in leads_in_campaign_not_in_cadence. When none are in the cadence, blocks_sending says so plainly, for example: "146 leads are in this campaign but not in the cadence, so nothing sends. Add them with add_lists_to_cadence (or set_cadence_auto_add on so new leads join on their own)."
- sending_now is true when the campaign and cadence run, at least one shown mailbox can send and at least one lead in the cadence is queued or in progress. It does not check copy approval or drafts waiting.
- After each cadence email a mailbox waits the time left in today's send window divided by the emails it still has room for today, moved up to a fifth either way at random, never less than the mailbox's own gap and never less than a random 10 to 15 minutes, so each mailbox can reach its daily limit by the end of the window. The wait is worked out again on every send.
- A bounce is the recipient's server saying the address does not take mail (550 5.1.1, user unknown, no such domain). The email is stored bounced, the address goes on the do not email list, the lead leaves that cadence, it counts in the mailbox's bounced_7d and the cadence's bounced, and no later step or other mailbox ever sends to it. A refusal is a provider turning the email down because of our side: before it went (an invalid address, the mailbox's sign in, quota or a block) or after (SPF, DKIM, DMARC, spam). It is stored blocked, shown as refused with the reason, suppresses nothing, the lead stays in the cadence, and the step holds: until a person sends it from Tasks when the address was refused, an hour when the mailbox was. Many refusals in a day pause the mailbox. The bounce is read from the delivery report itself, never from the copy of our own message under it.
| When | Message | What to do |
|---|---|---|
| No campaign argument | Name a campaign (its name or id). list_campaigns shows them. | Pass the campaign name or id. |
| A partial name matches several campaigns | "<ref>" matches several campaigns: A; B. Use the exact name or id. | Use the exact name or the id. |
| Nothing matches | No campaign "<ref>" in this workspace. | Check list_campaigns. Staff may need to pass workspace. |
Example call:
{
"name": "go_live_check",
"arguments": {
"campaign": "Happy Billing Q1"
}
}
Example result:
{
"campaign": "Happy Billing Q1",
"workspace": "Happy Billing",
"campaign_status": "live",
"campaign_on": true,
"cadence_status": "draft",
"sending_now": false,
"approve_each_email": true,
"pilot_mode": false,
"montana_writes": "every lead, on its own",
"leads": {
"queued": 40,
"in_progress": 2,
"held_or_paused": 0,
"finished": 0,
"left": 1
},
"lead_drafts": {
"waiting_approval": 12,
"approved": 30,
"edited": 0,
"rejected": 0
},
"emails_due_waiting_to_send": 0,
"mailboxes": [
{
"mailbox": "sam@happybilling.com",
"status": "connected",
"sending": "on",
"health": "ok",
"cap_here": 15,
"mailbox_daily_limit": 40,
"gap_minutes": 5,
"sent_here_last_24h": 0,
"sent_all_last_24h": 6,
"room_today": 15
}
],
"mailboxes_chosen": true,
"send_window": "Mon, Tue, Wed, Thu, Fri, 09:00 to 17:00 in each lead's own time zone",
"blocks_sending": [
"The cadence is draft, not running (approve_cadence, or set_cadence_running on).",
"12 lead emails wait for approval (list_lead_drafts, approve_lead_drafts)."
]
}
approve_cadence
Who: Admins. Level: write. Confirms: yes, preview first, then the same call with confirm: true.
Approves the whole cadence once and starts it: every step's copy is approved, every waiting lead email is approved, approve first is turned off so Montana's later emails send as written, and cadence_status becomes active. The first call returns a preview. Use set_cadence_running instead to keep approving each lead's email.
| Argument | Type | Required | Accepts, default and limits |
|---|---|---|---|
campaign | string | yes | Campaign id, exact name (any case), or a part of the name that matches only one campaign. Looked up inside the current workspace only. |
confirm | boolean | no | True or false. Default: false. |
Returns: Preview: campaign, steps (active steps), leads_enrolled, starts_sending (always true), approving_also, what_will_send, needs, plus cannot_approve_yet and steps_with_blanks when the words have gaps. Done: campaign_id, steps (active step count), approval 'auto', cadence_status 'active', with action_id and undo_with.
Changes: Through campaign-plan approve_cadence: sets copy_status approved on every step, runs cadence_repoint so waiting leads sit on the approved steps' channels, approves every pending_approval lead draft, sets email_approval_mode 'auto', cadence_status 'active' and who started it. Then Montana writes lead emails in the background (up to 10 rounds of 12 leads). Emails, LinkedIn steps and call tasks then go out as leads come due. Writing and sending use no credits in this code.
Undo: Partly. undo_action runs set_pilot_mode with on: false: approve first comes back on, new finding leads go back to review, and the LinkedIn bridge asks for approval again. It does NOT stop the cadence, and drafts and step copy stay approved. Use set_cadence_running off to stop it. Only while the changed fields still hold what this change set; if someone changed them since, undo refuses and says so.
Good to know:
- All checks (steps, mailbox, empty steps, blanks) run before anything changes, so a refused approval leaves the cadence as it was.
- The preview does not check the mailbox or empty steps. Read what_will_send.sends_from and no_sender before confirming.
- A paused cadence (cadence_status 'paused') is started again by this call.
- In auto mode a lead's draft sends as written even if it still reads pending_approval. Rejected drafts never send.
- It does not change the LinkedIn bridge's approve first setting or its draft actions; set_pilot_mode does.
- Show preview_cadence to the person before confirming.
| When | Message | What to do |
|---|---|---|
| The campaign is not found | No campaign "<name>" in this workspace. | Call list_campaigns and use the exact name or id. |
| A partial name matches more than one campaign | "<name>" matches several campaigns: A; B. Use the exact name or id. | Use the exact name or the id. |
| The campaign has no active steps | This campaign has no cadence to approve yet. | Write a cadence first (write_cadence or draft_cadence). |
| There is an active email step but no connected, unpaused mailbox is chosen for the cadence | No mailbox is assigned to this cadence, so it cannot be started. Pick a connected mailbox in the cadence settings, under Sending, first. | Pick mailboxes with set_cadence_mailboxes and resume them if paused, then confirm again. |
| An active email, sms or linkedin_message step has no body | Step <n> (<title>) is an email with no words yet. Write it or turn the step off, then approve. | Write the words with edit_step or switch the step off. |
| The words have blanks left by a fill | Not approved: the copy still has blanks a fill left behind. ... | Fix with edit_step, then confirm again. |
Example call:
{
"name": "approve_cadence",
"arguments": {
"campaign": "Dental clinics TX",
"confirm": true
}
}
Example result:
{
"campaign_id": "6c1e...",
"steps": 6,
"approval": "auto",
"cadence_status": "active",
"action_id": "5d0...",
"undo_with": "undo_action"
}
set_cadence_running
Who: Admins. Level: act. Confirms: yes, preview first, then the same call with confirm: true.
on true starts or resumes a campaign's cadence, keeping the approval setting as it is. Only leads in the cadence get its steps; a cadence with no leads in it still starts, and the result says plainly that nothing will send until leads are added. on false pauses the cadence so no new step starts and no email goes; the campaign itself stays as it is. Both need confirmation, and the start preview says what goes first, from which mailboxes, and what is missing.
| Argument | Type | Required | Accepts, default and limits |
|---|---|---|---|
campaign | string | yes | Campaign id, exact name (case does not matter), or a part of the name that matches only one campaign in the workspace. |
on | boolean | yes | True or false. |
allow_owner_mailboxes | boolean | no | Ignored. No longer used. Emails never go from lead owners' own mailboxes. |
confirm | boolean | no | True, or the text "true". Default: not set (returns the preview). Leave it out first and show the preview to the person. Call again with the same arguments plus confirm: true only after they agree. |
Returns: Start preview: campaign, cadence_now, campaign_status, leads_that_start (leads in the cadence), leads_not_in_cadence, no_leads (when none are in the cadence), not_in_cadence (when some are and others are not), first_step, approve_each_email, steps_with_unapproved_copy, sends_from, send_window, campaign_paused_note, no_sender, needs. Pause preview: campaign, would_pause, emails_due_that_wait, campaign_stays, needs. After confirm: campaign, cadence_status ('active' or 'paused'), no_leads, no_sender, next, plus action_id and undo_with; the summary line repeats no_leads and no_sender. Pausing a cadence that is not active returns campaign and cadence_status with nothing changed.
Changes: Sets campaigns.cadence_status to active or paused and records who did it (cadence_activated_by or cadence_paused_by; a trigger stamps the time). Once active, the schedulers start moving leads that are in the cadence and emails go out at mailbox pace inside the send window.
Undo: Yes. undo_action puts the previous cadence_status back on the campaign row. Only while the changed fields still hold what this change set; if someone changed them since, undo refuses and says so.
Good to know:
- The preview does not refuse anything. The refusal comes at confirm, from the database, when the cadence has an active email step and none of its chosen mailboxes is connected and unpaused. The preview's no_sender line warns about this.
- A paused campaign (status paused) still sends nothing after the cadence starts. set_campaign_paused resumes it.
- Unlike approve_cadence it does not approve step copy or change the approval mode. Steps with copy not approved hold their emails.
- Pausing stops new steps and email sends; due email tasks wait and send after a restart.
- Only leads added to the cadence (in_cadence) move. leads_that_start counts only those. Started with none in it, the result reads: "Started the cadence on <campaign>. 146 leads are in this campaign but not in the cadence, so nothing sends. Add them with add_lists_to_cadence (or set_cadence_auto_add on so new leads join on their own)."
| When | Message | What to do |
|---|---|---|
| No campaign argument | Name a campaign (its name or id). list_campaigns shows them. | Pass the campaign name or id. |
| A partial name matches several campaigns | "<ref>" matches several campaigns: A; B. Use the exact name or id. | Use the exact name or the id. |
| Nothing matches | No campaign "<ref>" in this workspace. | Check list_campaigns. Staff may need to pass workspace. |
| The caller's role is not org_admin or superadmin (checked by the server before run) | Only a workspace admin can do this. | Ask a workspace admin. |
| The person is not an admin of this workspace (checked in the database with mcp_is_org_admin; superadmins pass) | Only an admin of <workspace> can do this. | Ask a workspace admin to do it. |
| The campaign is the workspace's 'No campaign' | "No campaign" never runs a cadence. | Pick a real campaign. |
| on true and no active top level steps | <campaign> has no steps. write_cadence or draft_cadence first. | Build the cadence first. |
| on true with an active email step and no chosen mailbox that is connected and not paused (database trigger campaigns_cadence_start_needs_mailbox) | No mailbox is assigned to this cadence, so it cannot be started. Pick a connected mailbox in the cadence settings, under Sending, first. | Choose a mailbox with set_cadence_mailboxes, or resume one with resume_mailbox_sending, then start again. |
Example call:
{
"name": "set_cadence_running",
"arguments": {
"campaign": "Happy Billing Q1",
"on": true,
"confirm": true
}
}
Example result:
{
"campaign": "Happy Billing Q1",
"cadence_status": "active",
"next": "upcoming_sends shows what goes and when.",
"action_id": "f5f5f5f5-aaaa-4f4f-8a8a-0123456789ab",
"undo_with": "undo_action"
}
add_lists_to_cadence
Who: Admins. Level: write. Confirms: yes, preview first, then the same call with confirm: true.
Starts a batch of the campaign's leads in its cadence. A batch is a lead list; pick lists by id, a week, or every list. Leads in those lists that are in the campaign, waiting (status queued) and not yet in the cadence start at step 1 now. The first call returns a preview.
| Argument | Type | Required | Accepts, default and limits |
|---|---|---|---|
campaign | string | yes | Campaign id, exact name (any case), or a part of the name that matches only one campaign. Looked up inside the current workspace only. |
lists | array of strings | no | Lead list ids (from list_lead_lists) Non id values are dropped. Wins over week and all_ready. |
week | string | no | Any date YYYY-MM-DD in the week. Takes the lists whose list_date is Monday to Sunday of that week (UTC). |
all_ready | boolean | no | True. Default: false. Up to 500 lists. Every list of the campaign. |
confirm | boolean | no | True or false. Default: false. |
Returns: Preview: campaign, lists (how many lists matched), would_start, what_will_send, needs. Done: started (leads that joined), lists.
Changes: Calls cadence_add_lists: sets in_cadence true, cadence_list_id, cadence_added_at, step_index and next_channel to the first active step (not on a graph cadence) and next_touch_at now on each matching enrollment. If the cadence is active it logs an 'entered' event per lead and sending starts as the steps come due.
Good to know:
- Only enrollments with status 'queued' and in_cadence false join. Leads already in the cadence carry on where they are; paused or in progress ones are not moved.
- A lead that is not a member of any of the chosen lists cannot be added this way.
- If the cadence is not active, the leads are marked in the cadence but nothing sends until it starts (approve_cadence, set_cadence_running or set_pilot_mode).
- The preview reads at most 5000 list members, so would_start can be lower than the real count on very large batches.
- Montana writes lead drafts only for leads in the cadence, so adding a batch is also what starts its writing.
- Calls only leads (calls_only true) are left out and not counted in the preview.
| When | Message | What to do |
|---|---|---|
| The campaign is not found | No campaign "<name>" in this workspace. | Call list_campaigns and use the exact name or id. |
| A partial name matches more than one campaign | "<name>" matches several campaigns: A; B. Use the exact name or id. | Use the exact name or the id. |
| No lists, week or all_ready given | Give lists, a week, or all_ready true. | Send one of the three. |
| week is not a date | week must be a date, YYYY-MM-DD. | Use YYYY-MM-DD. |
| No list matched | No such lists in this campaign. | Check list_lead_lists for this campaign. |
Example call:
{
"name": "add_lists_to_cadence",
"arguments": {
"campaign": "Dental clinics TX",
"week": "2026-11-30",
"confirm": true
}
}
Example result:
{
"started": 84,
"lists": 5
}
set_cadence_auto_add
Who: Admins. Level: write. Confirms: no.
Switches whether new leads added to the campaign join its cadence by themselves. On: each lead added from now on enters the cadence at once. Off: new leads wait in their list until the batch is added with add_lists_to_cadence.
| Argument | Type | Required | Accepts, default and limits |
|---|---|---|---|
campaign | string | yes | Campaign id, exact name (any case), or a part of the name that matches only one campaign. Looked up inside the current workspace only. |
on | boolean | yes | True or false (text 'true' or 'false' is read) Anything other than true means off. |
Returns: auto_add (the new value).
Changes: Sets campaigns.cadence_auto_add. A database trigger reads it when an enrollment is inserted: off makes the new enrollment in_cadence false.
Good to know:
- It only affects leads added after the switch. Leads already waiting outside the cadence stay out until add_lists_to_cadence adds them.
- Campaigns made before 1 December 2026 started with it on; newer campaigns start with it off.
- Leads added while on are filed under their day's list as the batch that brought them in.
| When | Message | What to do |
|---|---|---|
| The campaign is not found | No campaign "<name>" in this workspace. | Call list_campaigns and use the exact name or id. |
| A partial name matches more than one campaign | "<name>" matches several campaigns: A; B. Use the exact name or id. | Use the exact name or the id. |
Example call:
{
"name": "set_cadence_auto_add",
"arguments": {
"campaign": "Dental clinics TX",
"on": true
}
}
Example result:
{
"auto_add": true
}
remove_from_cadence
Who: Admins. Level: act. Confirms: no.
Stops the cadence for chosen leads in a campaign so nothing more goes to them from it, and keeps them in the campaign's dial queue as calls only, so reps keep calling them. exit_campaign: true takes them out of the campaign altogether instead (out of the dial queue too). The lead, its history and its own unsent emails stay. To stop everyone, use set_cadence_running off or set_campaign_paused.
| Argument | Type | Required | Accepts, default and limits |
|---|---|---|---|
campaign | string | yes | Campaign id, exact name (case does not matter), or a part of the name that matches only one campaign in the workspace. |
leads | array of strings | yes | Lead ids, phones, exact names or unique parts of names. First 500 used. |
exit_campaign | boolean | no | True or false. Default: false. True ends the live enrollment (exited, withdrawn), so the lead leaves the dial queue too. |
Returns: Default: campaign, removed, still_in_dial_queue true, waiting_items_dropped, not_in_this_campaign, not_found, note. With exit_campaign: campaign, removed, exited_campaign true, not_in_this_campaign, not_found, add_back_with.
Changes: Default: the live enrollment in this campaign (queued, in_progress or paused) gets in_cadence false and calls_only true, so it stays in the dial queue and never rejoins the cadence on its own; its open cadence tasks (emails waiting to send, texts, task steps) are closed as 'taken out of the cadence' and its LinkedIn steps finish. Call tasks and reply follow ups stay. With exit_campaign true: the enrollment is set to exited with exit reason 'withdrawn', which closes its open cadence tasks too. No confirmation step.
Good to know:
- This acts at once. There is no preview, even though it is an act level tool.
- Emails a reply or a call stopped (stop on reply) are parked rather than lost; if the lead is added back they return waiting for approval, since the lead answered after they were written.
- The default keeps the lead in the campaign as calls only. To take it out of the dial queue as well, pass exit_campaign: true.
| When | Message | What to do |
|---|---|---|
| No campaign argument | Name a campaign (its name or id). list_campaigns shows them. | Pass the campaign name or id. |
| A partial name matches several campaigns | "<ref>" matches several campaigns: A; B. Use the exact name or id. | Use the exact name or the id. |
| Nothing matches | No campaign "<ref>" in this workspace. | Check list_campaigns. Staff may need to pass workspace. |
| The caller's role is not org_admin or superadmin (checked by the server before run) | Only a workspace admin can do this. | Ask a workspace admin. |
| The person is not an admin of this workspace (checked in the database with mcp_is_org_admin; superadmins pass) | Only an admin of <workspace> can do this. | Ask a workspace admin to do it. |
| None of the leads resolve | None of those leads were found: <refs>. | Check the references with search_leads. |
Example call:
{
"name": "remove_from_cadence",
"arguments": {
"campaign": "Happy Billing Q1",
"leads": [
"Acme Dental",
"+15125550123"
]
}
}
Example result:
{
"campaign": "Happy Billing Q1",
"removed": 1,
"not_in_this_cadence": 1,
"add_back_with": "add_leads_to_campaign"
}
set_cadence_writing
Who: Admins. Level: write. Confirms: no.
Sets three cadence switches. write_mode all lets Montana's background writer write every lead's own emails and LinkedIn notes; manual writes only when asked with write_lead_emails. approve_each_email true makes each lead's email wait for a person's approval; false lets Montana's emails send as written. send_step_template true sends a lead with no own email the step's shared template (and Montana writes none on its own); false, the default, holds that lead's step until it has its own email.
| Argument | Type | Required | Accepts, default and limits |
|---|---|---|---|
campaign | string | yes | Campaign id, exact name (case does not matter), or a part of the name that matches only one campaign in the workspace. |
write_mode | string | no | All or manual. Enum: all, manual. Stored in cadence_settings.write_mode. |
approve_each_email | boolean | no | True or false. True sets campaigns.email_approval_mode to approve_first, false sets it to auto. |
send_step_template | boolean | no | True or false. True stores cadence_settings.email_copy = 'template'; false removes it (the default: leads without their own email are held, never sent the template). |
Returns: An object: campaign, changed (plain lines), cadence_status. Plus action_id and undo_with.
Changes: Updates campaigns.cadence_settings.write_mode and or campaigns.email_approval_mode. With approval switched off on a running cadence, lead drafts already waiting for approval start sending as written on the next send run. send_step_template sets or clears campaigns.cadence_settings.email_copy.
Undo: Yes. undo_action runs set_cadence_writing again with the old write_mode (all when none was set), the old approval setting and the old send_step_template. Only while the changed fields still hold what this change set; if someone changed them since, undo refuses and says so.
Good to know:
- Approval off (auto): the sender sends a lead's own draft whatever its status except rejected, including drafts waiting for approval and drafts the quality check flagged. Drafts Montana writes while approval is off are saved as approved when they pass the check.
- Approval on (approve_first): only approved or edited lead drafts send. For steps Montana writes, a lead with no approved draft is held, not sent the template.
- There is a second, separate switch: cadence_settings.montana_writes (set_cadence_settings). When it is false the background writer and write_lead_emails without a step or lead write nothing. write_mode manual stops only the background sweep.
- It writes the campaign row directly, not through the cadence_writing_set database function.
| When | Message | What to do |
|---|---|---|
| No campaign argument | Name a campaign (its name or id). list_campaigns shows them. | Pass the campaign name or id. |
| A partial name matches several campaigns | "<ref>" matches several campaigns: A; B. Use the exact name or id. | Use the exact name or the id. |
| Nothing matches | No campaign "<ref>" in this workspace. | Check list_campaigns. Staff may need to pass workspace. |
| The caller's role is not org_admin or superadmin (checked by the server before run) | Only a workspace admin can do this. | Ask a workspace admin. |
| The person is not an admin of this workspace (checked in the database with mcp_is_org_admin; superadmins pass) | Only an admin of <workspace> can do this. | Ask a workspace admin to do it. |
| write_mode is not all or manual | write_mode must be all or manual. | Use all or manual. |
| Nothing given | Give write_mode, approve_each_email or send_step_template. | Pass at least one. |
Example call:
{
"name": "set_cadence_writing",
"arguments": {
"campaign": "Happy Billing Q1",
"approve_each_email": false
}
}
Example result:
{
"campaign": "Happy Billing Q1",
"changed": [
"emails send as written"
],
"cadence_status": "active",
"action_id": "e4e4e4e4-9999-4e4e-8f8f-0123456789ab",
"undo_with": "undo_action"
}
list_email_templates
Who: Admins and reps. Level: read. Confirms: no.
Lists the workspace's active email templates from Inbox Templates: name, subject, body as plain text, author and last change. Use it before use_template_for_step or save_email_template.
| Argument | Type | Required | Accepts, default and limits |
|---|---|---|---|
search | string | no | Part of a template name. Matches the name only, not the subject or body. |
full_body | boolean | no | True or false. Default: false. False cuts each body to 400 characters. |
Returns: An object: templates (id, name, subject, body, by, updated_at), fields (the merge fields a template may use: {{first_name|there}}, {{contact}}, {{company}}, {{rep}}, {{org}}).
Changes: None, read only.
Good to know:
- At most 200 templates, sorted by name. HTML bodies are turned into plain text.
- If the author join fails the list comes back without by.
| When | Message | What to do |
|---|---|---|
| The database read fails twice | <database message> | Try again later. |
Example call:
{
"name": "list_email_templates",
"arguments": {
"search": "intro"
}
}
Example result:
{
"templates": [
{
"id": "1b2c3d4e-cccc-4b5b-8c6c-0123456789ab",
"name": "Intro, billing",
"subject": "Billing at {{company}}",
"body": "Hi {{first_name|there}},\n\nQuick question ...",
"by": "Sam Lee",
"updated_at": "2026-11-28T10:12:00Z"
}
],
"fields": [
"{{first_name|there}}",
"{{contact}}",
"{{company}}",
"{{rep}}",
"{{org}}"
]
}
save_email_template
Who: Admins and reps. Level: write. Confirms: no.
Creates an email template from a name, subject and plain text body, or changes one when template names an existing one. Anyone in the workspace (not a client) can create; only the writer or an admin can change.
| Argument | Type | Required | Accepts, default and limits |
|---|---|---|---|
template | string | no | Existing template id, exact name, or unique part of the name. Leave out to create a new template. |
name | string | no | Any text. Cut to 120 characters. Required to create. |
subject | string | no | Any text. On change, an empty string clears the subject. |
body | string | no | Plain text with blank lines between paragraphs. Required to create. Stored as given. On change, empty is ignored. |
Returns: Create: id, name. Change: id, changed (list of fields changed).
Changes: Inserts or updates a message_templates row (channel email). Sends nothing.
Good to know:
- Admin here means the profile role org_admin or superadmin.
- Fields a template can use: {{first_name|there}}, {{contact}}, {{company}}, {{rep}}, {{org}}. use_template_for_step turns them into the cadence's fields.
| When | Message | What to do |
|---|---|---|
| Changing a template the caller did not write and the caller is not an admin | Only the person who wrote it or an admin can change it. | Ask the writer or an admin. |
| Change with nothing to change | Give a new name, subject or body. | Pass name, subject or body. |
| Create without name or body | A new template needs a name and a body. | Pass name and body. |
| template matches several | "<ref>" matches several templates: A; B. | Use the exact name or id. |
| template not found | No email template "<ref>" in this workspace. | Check list_email_templates. |
Example call:
{
"name": "save_email_template",
"arguments": {
"name": "Intro, billing",
"subject": "Billing at {{company}}",
"body": "Hi {{first_name|there}},\n\nQuick question about billing at {{company}}.\n\n{{rep}}"
}
}
Example result:
{
"id": "1b2c3d4e-cccc-4b5b-8c6c-0123456789ab",
"name": "Intro, billing"
}
delete_email_template
Who: Admins and reps. Level: write. Confirms: yes, preview first, then the same call with confirm: true.
Deletes one email template by name or id, after a preview. The writer or an admin can do it. Cadence steps that copied its words keep them.
| Argument | Type | Required | Accepts, default and limits |
|---|---|---|---|
template | string | yes | Template id, exact name, or unique part of the name. |
confirm | boolean | no | True, or the text "true". Default: not set (returns the preview). Leave it out first and show the preview to the person. Call again with the same arguments plus confirm: true only after they agree. |
Returns: Preview: would_delete (name), subject, needs. After confirm: deleted (name).
Changes: Deletes the message_templates row for good (a hard delete, not a switch off).
Good to know:
- Only active templates can be found and deleted.
| When | Message | What to do |
|---|---|---|
| Not the writer and not an admin | Only the person who wrote it or an admin can delete it. | Ask the writer or an admin. |
| template matches several | "<ref>" matches several templates: A; B. | Use the exact name or id. |
| template not found | No email template "<ref>" in this workspace. | Check list_email_templates. |
Example call:
{
"name": "delete_email_template",
"arguments": {
"template": "Intro, billing",
"confirm": true
}
}
Example result:
{
"deleted": "Intro, billing"
}
use_template_for_step
Who: Admins. Level: write. Confirms: no.
Copies an email template's subject and body into one email step of a cadence as plain text, turning the template's fields into the cadence's fields. The step goes back to draft and needs approve_step_copy before it sends. Lead drafts already written for the step keep their own words.
| Argument | Type | Required | Accepts, default and limits |
|---|---|---|---|
campaign | string | yes | Campaign id, exact name (case does not matter), or a part of the name that matches only one campaign in the workspace. |
step | string | yes | Step number as get_cadence shows it (1 is the first, switched off steps keep their number), or a step id. |
template | string | yes | Template id, exact name, or unique part of the name. |
Returns: An object: campaign, step (number), subject, body, copy_status 'draft', next. Plus action_id and undo_with.
Changes: Updates the campaign_steps row: subject (max 200 characters, null when empty), body (max 4000 characters), copy_status draft. While the copy is draft, emails for this step that use the template hold (lead drafts that are approved still send).
Undo: Yes. undo_action puts back the step's previous subject, body and copy_status.
Good to know:
- Field mapping: {{contact}} becomes {{full_name}}, {{rep}} becomes {{sender_name}}, {{org}} is replaced with the workspace's name, {{first_name|...}} and {{company}} stay as they are. Fallbacks after | are kept.
- HTML is turned into plain text, a line per paragraph.
- No admin check in the database for this tool; the server's admin check applies.
| When | Message | What to do |
|---|---|---|
| No campaign argument | Name a campaign (its name or id). list_campaigns shows them. | Pass the campaign name or id. |
| A partial name matches several campaigns | "<ref>" matches several campaigns: A; B. Use the exact name or id. | Use the exact name or the id. |
| Nothing matches | No campaign "<ref>" in this workspace. | Check list_campaigns. Staff may need to pass workspace. |
| The caller's role is not org_admin or superadmin (checked by the server before run) | Only a workspace admin can do this. | Ask a workspace admin. |
| step not found | No step <ref>. Steps are numbered 1 to <n> (switched off steps keep their number); get_cadence lists them. | Use get_cadence for the number. |
| The step is not an email step | Step <n> is a <channel> step; a template goes on an email step. | Pick an email step. |
| template not found or ambiguous | No email template "<ref>" in this workspace. / "<ref>" matches several templates: ... | Use the exact name or id. |
Example call:
{
"name": "use_template_for_step",
"arguments": {
"campaign": "Happy Billing Q1",
"step": "1",
"template": "Intro, billing"
}
}
Example result:
{
"campaign": "Happy Billing Q1",
"step": 1,
"subject": "Billing at {{company}}",
"body": "Hi {{first_name|there}},\n\nQuick question about billing at {{company}}.\n\n{{sender_name}}",
"copy_status": "draft",
"next": "approve_step_copy when it reads right.",
"action_id": "2c3d4e5f-dddd-4c6c-8d7d-0123456789ab",
"undo_with": "undo_action"
}