Docs
MCPPricingGo to Sales Montana

MCP server

Signal and lead finding automation tools

Signals are reasons to reach out now. These tools shape what is watched and the automations that find leads.

ToolWhoLevelConfirmsWhat it does
list_signal_topicsAdminsreadnoLists what a campaign searches every morning for new leads: each signal topic, what it searches, whether it is on, and when it last ran.
edit_signal_topicAdminswritenoChanges what a campaign searches every morning.
list_pipelinesAdminsreadnoLists the workspace's lead pipelines.
get_pipelineAdminsreadnoReturns one pipeline's full config, its cursor (state) and its last 10 config versions.
update_pipelineAdminswritenoDeep merges a patch into a pipeline's config and saves it as a new version.
set_pipeline_enabledAdminswritenoTurns a pipeline on or off.
restore_pipeline_versionAdminswritenoPuts a pipeline's config back to an earlier version from get_pipeline.
run_pipeline_nowAdminswriteyesRuns one slice of a pipeline now.
list_pipeline_runsAdminsreadnoLists a pipeline's recent runs, newest first, with their per step counts and any error.
list_pipeline_itemsAdminsreadnoLists the providers (people) a pipeline has seen, with stage, NPI decision, every check value and its evidence, the score and tier, and the lead it became.
get_pipeline_itemAdminsreadnoReturns one pipeline item and every raw record collected for it (directory card, NPI lookup and record, group NPI search, website search), exactly as fetched.
pipeline_reportAdminsreadnoShows a pipeline's results over a number of days: the funnel from sourced to signed, tiers, skip reasons, ready leads, how each yes or no check relates to meetings, and per run and tier calls, connects, conversations and meetings.
lead_loop_reportAdminsreadnoShows the lead loop for a campaign: which kinds of leads turned into conversations and deals, Montana's summary, next week's plan and how past batches did.
plan_lead_loopAdminswritenoScores a campaign's leads over the last 28 days and writes next week's plan of Google Maps searches: mostly more of what worked, about a fifth as a test.
approve_lead_planAdminsactyesApproves a campaign's waiting lead plan and starts the Google Maps searches in the background.
send_lead_batchAdminsactyesWorks on the leads approve_lead_plan found.
set_autonomyAdminswritenoSets how far a campaign's lead loop may act alone: off, ask or self_driving.

Conventions for every tool are on the overview. The order to call them in is on workflows.

Tools

list_signal_topics

Who: Admins. Level: read. Confirms: no.

Lists what a campaign searches every morning for new leads: each signal topic, what it searches, whether it is on, and when it last ran. Use it to get topic numbers for edit_signal_topic.

ArgumentTypeRequiredAccepts, default and limits
campaignstringyesCampaign 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 and topics: each number (1 based, used by edit_signal_topic), id (the signal's own id), name, kind (job_postings or linkedin_posts), searches (one line), on, last_run_at.

Changes: None, read only.

Good to know:

  • on is true only when the topic is not switched off AND its search topic is active. A topic on a campaign that is not live is saved paused, so it shows on: false even after edit_signal_topic op on.
  • Signals linked only through a signal topic row (not in the Settings list) are not shown here; about_campaign shows them.
WhenMessageWhat to do
The campaign is not foundNo 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": "list_signal_topics",
  "arguments": {
    "campaign": "Dental clinics TX"
  }
}

Example result:

{
  "campaign_id": "6c1e...",
  "topics": [
    {
      "number": 1,
      "id": "s_8k2...",
      "name": "Hiring: Dental receptionist",
      "kind": "job_postings",
      "searches": "Job posts for \"Dental receptionist\", Texas, last 14 days",
      "on": true,
      "last_run_at": "2026-12-02T13:00:00Z"
    }
  ]
}

edit_signal_topic

Who: Admins. Level: write. Confirms: no.

Changes what a campaign searches every morning. Add a topic (job posts for a role, or LinkedIn posts with search phrases), update one, switch one on or off, or remove one. It saves through the same backend as the campaign's Settings editor.

ArgumentTypeRequiredAccepts, default and limits
campaignstringyesCampaign id, exact name (any case), or a part of the name that matches only one campaign. Looked up inside the current workspace only.
opstringyesAdd, update, on, off, remove.
topicstringnoTopic number from list_signal_topics, its id, or its exact name (any case) Needed for update, on, off and remove.
namestringnoText. Default: 'Hiring: <role>' or 'LinkedIn posts', or the old name on update.
kindstringnoJob_postings or linkedin_posts. Default: job_postings on add; the old kind on update. Any value other than linkedin_posts is saved as job_postings.
rolestringnoThe role as written in job ads. Default: the old role on update. Required for a job_postings topic.
locationstringnoA city, a state, or United States. Default: the old location on update. Empty text clears it.
daysnumberno7, 14 or 30. Default: the old value, else 14. Other values are ignored. How recent the job posts must be.
searchesarray of stringsnoPhrases; put words in quotes for an exact match. Default: the old searches on update. Required for a linkedin_posts topic.

Returns: campaign_id and topics: the full list after saving, each number, name, searches (one line), on (true unless switched off), problem (why it cannot run, or null).

Changes: Saves the whole topic list through campaign-plan save_signals: creates or updates signal_topics rows (new ones get a cap of 1500 credits a month, 50 a day, 25 checks a run) and the campaign_sources rows. A removed topic stops and lets go of the campaign; its past finds stay. Running topics spend credits on their searches and checks each morning.

Good to know:

  • A topic only searches when the campaign is live. On a draft or paused campaign it is saved paused, so on: true in this result can still read on: false in list_signal_topics.
  • The 'on' in this result ignores the campaign state; list_signal_topics shows the real state.
  • A topic that cannot run (for example no searches) is saved switched off, with the reason in problem.
  • LinkedIn post topics are noisy and cost more per good lead; prefer job posts when the need shows as a hire.
WhenMessageWhat to do
The campaign is not foundNo 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.
Adding a 13th topicA campaign holds up to 12 signal topics.Remove one first.
The topic is not foundNo such topic on this campaign. Use list_signal_topics for the numbers.Use a number from list_signal_topics.
LinkedIn topic with no phrasesGive at least one search phrase.Send searches.
Job topic with no roleName the role the job ad is for.Send role.
Unknown opop is add, update, on, off or remove.Use one of these.
The backend refuses the saveThe error from campaign-plan, or 'The topics could not be saved.'Read the message and fix the input.

Example call:

{
  "name": "edit_signal_topic",
  "arguments": {
    "campaign": "Dental clinics TX",
    "op": "add",
    "kind": "job_postings",
    "role": "Dental receptionist",
    "location": "Texas",
    "days": 14
  }
}

Example result:

{
  "campaign_id": "6c1e...",
  "topics": [
    {
      "number": 1,
      "name": "Hiring: Dental receptionist",
      "searches": "Job posts for \"Dental receptionist\", Texas, last 14 days",
      "on": true,
      "problem": null
    }
  ]
}

list_pipelines

Who: Admins. Level: read. Confirms: no.

Lists the workspace's lead pipelines. A pipeline is a job that pulls people from a source, runs checks, scores them and adds the good ones to a campaign. It shows each one's state, config version, ready leads and last run.

No arguments.

Returns: pipelines: each id, name, adapter, enabled, paused_reason, version, campaign_id (config.output.campaign_id), params (config.source.params), topup, ready_leads, last_tick_at, last_run {id, status, started_at, finished_at, counts, error, params}.

Changes: None, read only.

Good to know:

  • ready_leads counts ingested items in the topup tiers (A and B by default) whose enrollment in the output campaign is queued or paused and was never dialled.
  • Only the headway adapter can run today.

Example call:

{
  "name": "list_pipelines",
  "arguments": {}
}

Example result:

{
  "pipelines": [
    {
      "id": "0a1...",
      "name": "Headway",
      "adapter": "headway",
      "enabled": true,
      "paused_reason": null,
      "version": 14,
      "campaign_id": "6c1e...",
      "params": {
        "states": [
          "GA",
          "FL"
        ]
      },
      "topup": {
        "target_ready": 100,
        "tiers": [
          "A",
          "B"
        ],
        "max_pages_per_day": 20
      },
      "ready_leads": 87,
      "last_tick_at": "2026-12-02T13:05:00Z",
      "last_run": {
        "id": "r9...",
        "status": "done",
        "counts": {
          "pages": 3,
          "leads_created": 22
        },
        "error": null
      }
    }
  ]
}

get_pipeline

Who: Admins. Level: read. Confirms: no.

Returns one pipeline's full config, its cursor (state) and its last 10 config versions. Read it before update_pipeline or restore_pipeline_version.

ArgumentTypeRequiredAccepts, default and limits
pipelinestringyesPipeline id or name (any case, no partial match) If two names match, the first one is used.

Returns: The pipeline row: id, name, adapter, enabled, paused_reason, version, config (source, schedule, batch, checks, scoring, tier_actions, topup, output, metrics and so on), state (the cursor), last_tick_at, updated_at, plus versions (each version, actor, note, changed_by, created_at; newest first, up to 10).

Changes: None, read only.

WhenMessageWhat to do
The pipeline is not foundNo pipeline "<name>" in <workspace>. list_pipelines shows them.Call list_pipelines and use the name or id.
No pipeline namedName a pipeline. list_pipelines shows them.Send pipeline.

Example call:

{
  "name": "get_pipeline",
  "arguments": {
    "pipeline": "Headway"
  }
}

Example result:

{
  "id": "0a1...",
  "name": "Headway",
  "adapter": "headway",
  "enabled": true,
  "paused_reason": null,
  "version": 14,
  "config": {
    "output": {
      "campaign_id": "6c1e..."
    },
    "tier_actions": {
      "A": {
        "enrol": false,
        "channel": "call"
      }
    }
  },
  "state": {
    "cursor": {
      "GA": 12
    }
  },
  "last_tick_at": "2026-12-02T13:05:00Z",
  "updated_at": "2026-12-01T10:00:00Z",
  "versions": [
    {
      "version": 14,
      "actor": "agent",
      "note": "Add FL",
      "changed_by": "p1...",
      "created_at": "2026-12-01T10:00:00Z"
    }
  ]
}

update_pipeline

Who: Admins. Level: write. Confirms: no.

Deep merges a patch into a pipeline's config and saves it as a new version. Objects merge key by key, arrays and plain values replace, and null removes a key. Use get_pipeline first. A patch that sets output.campaign_id or output.owner_id must name a campaign or a person in this workspace.

ArgumentTypeRequiredAccepts, default and limits
pipelinestringyesPipeline id or name (any case, no partial match) If two names match, the first one is used.
patchobjectyesA JSON object, e.g. {"source":{"params":{"states":["GA","FL"]}}}. Must be an object; JSON text is not parsed.
notestringnoWhy, in words. Kept in the version history.

Returns: pipeline_id, version (new), previous_version, with action_id and undo_with.

Changes: Updates lead_pipelines.config and version and writes a lead_pipeline_versions row with the actor ('agent' when the connection's client name looks like an AI assistant, else 'human'). The next run uses the new config; turning on enrol for a tier puts its leads into the campaign without review.

Undo: Yes. undo_action restores the version before, saved as a new version.

Good to know:

  • Arrays replace whole: send the full list (for example all states, all scoring rules).
  • The database checks the same on every config change, restores included, and the pipeline run refuses to enrol into a campaign or give leads to an owner outside its workspace.
WhenMessageWhat to do
The pipeline is not foundNo pipeline "<name>" in <workspace>. list_pipelines shows them.Call list_pipelines and use the name or id.
patch is not an objectpatch must be a JSON object.Send an object, not text.
A tier's enrol is set true with no output campaignSet output.campaign_id before turning on enrol for a tier.Include output.campaign_id in the patch or set it first.
output.campaign_id is not a campaign in this workspaceoutput.campaign_id must be a campaign id in this workspace.Use an id from list_campaigns.
output.owner_id is not a person in this workspaceoutput.owner_id must be the id of a person in this workspace.Use an id from list_team.

Example call:

{
  "name": "update_pipeline",
  "arguments": {
    "pipeline": "Headway",
    "patch": {
      "topup": {
        "target_ready": 150
      }
    },
    "note": "More ready leads for two new reps"
  }
}

Example result:

{
  "pipeline_id": "0a1...",
  "version": 15,
  "previous_version": 14,
  "action_id": "8e2...",
  "undo_with": "undo_action"
}

set_pipeline_enabled

Who: Admins. Level: write. Confirms: no.

Turns a pipeline on or off. Turning it on also clears a pause, such as the one set after a bot challenge, so only do that once the person has checked it.

ArgumentTypeRequiredAccepts, default and limits
pipelinestringyesPipeline id or name (any case, no partial match) If two names match, the first one is used.
enabledbooleanyesTrue or false. Anything other than true means off.

Returns: enabled (new value) and was_paused (the paused_reason before, or null), with action_id and undo_with.

Changes: Updates lead_pipelines.enabled (and clears paused_reason when switching on). An enabled pipeline runs on its schedule and tops up its campaign.

Undo: Yes. undo_action puts back the old enabled value and paused_reason.

Good to know:

  • Switching off keeps any paused_reason as it is.
WhenMessageWhat to do
The pipeline is not foundNo pipeline "<name>" in <workspace>. list_pipelines shows them.Call list_pipelines and use the name or id.

Example call:

{
  "name": "set_pipeline_enabled",
  "arguments": {
    "pipeline": "Headway",
    "enabled": true
  }
}

Example result:

{
  "enabled": true,
  "was_paused": "captcha: https://...",
  "action_id": "4f7...",
  "undo_with": "undo_action"
}

restore_pipeline_version

Who: Admins. Level: write. Confirms: no.

Puts a pipeline's config back to an earlier version from get_pipeline. It is saved as a new version, so no history is lost.

ArgumentTypeRequiredAccepts, default and limits
pipelinestringyesPipeline id or name (any case, no partial match) If two names match, the first one is used.
versionnumberyesA version number from get_pipeline.
notestringnoText. Default: 'restored version <n>'. Recorded as actor 'agent' only if the note starts with 'agent'.

Returns: pipeline_id, version (new), previous_version, restored_version, with action_id and undo_with.

Changes: Replaces the config with that version's and writes a new version row.

Undo: Yes. undo_action restores the version that was current before.

Good to know:

  • get_pipeline lists only the last 10 versions; older ones still exist.
WhenMessageWhat to do
The pipeline is not foundNo pipeline "<name>" in <workspace>. list_pipelines shows them.Call list_pipelines and use the name or id.
The version does not existUnknown version <n> for pipeline <id>Pick a version from get_pipeline.

Example call:

{
  "name": "restore_pipeline_version",
  "arguments": {
    "pipeline": "Headway",
    "version": 12
  }
}

Example result:

{
  "pipeline_id": "0a1...",
  "version": 16,
  "previous_version": 15,
  "restored_version": 12,
  "action_id": "6a3...",
  "undo_with": "undo_action"
}

run_pipeline_now

Who: Admins. Level: write. Confirms: yes, preview first, then the same call with confirm: true.

Runs one slice of a pipeline now. A dry run (the default) fetches one source page and runs every check on a few providers without saving anything. With dry_run false it starts or continues a real run outside the schedule and adds qualifying leads to the campaign.

ArgumentTypeRequiredAccepts, default and limits
pipelinestringyesPipeline id or name (any case, no partial match) If two names match, the first one is used.
dry_runbooleannoTrue or false. Default: true. Only false makes a real run.
max_itemsnumbernoWhole number. Default: 5. 1 to 40. Providers handled this call.
confirmbooleannoTrue. Default: false. Leave out to see what will happen.

Returns: Preview: will, next. Done: the lead-pipeline function's answer {ms, pipelines: [...]}. A dry run item has pipeline, dry_run, page, cards_on_page (or nppes), items (slug, person, stage, npi, npi_status, tier, score_raw, segment, factors, facts, would_store). A real run has pipeline, run_id, started (reason, e.g. 'manual'), pages, items_processed, run_finished, or stopped 'captcha'. Skips show as skipped 'paused: ...' and failures as error.

Changes: Dry run: outside lookups only (directory page, NPI registry, web search), nothing saved. Real run: creates or continues a lead_pipeline_runs row, saves items, creates leads and enrollments in the output campaign (held for review unless a tier has enrol on). A bot challenge pauses the pipeline and posts a Slack alert. This code does not charge workspace credits.

Good to know:

  • confirm is checked as truthy here, not strictly true.
  • A paused pipeline (paused_reason set) still does a dry run, but a real run comes back as skipped 'paused: <reason>'. Clear it with set_pipeline_enabled on after checking.
  • A disabled pipeline still runs when called here by id.
  • A real run continues an open run if one is 'running' instead of starting a new one.
  • Errors inside a pipeline (for example a missing browser key) come back as error in the result, not as a tool error.
WhenMessageWhat to do
The pipeline is not foundNo pipeline "<name>" in <workspace>. list_pipelines shows them.Call list_pipelines and use the name or id.
The lead-pipeline function returns an error statusThe pipeline answered <status>: <body>Read the body; try a dry run.

Example call:

{
  "name": "run_pipeline_now",
  "arguments": {
    "pipeline": "Headway",
    "dry_run": true,
    "max_items": 3,
    "confirm": true
  }
}

Example result:

{
  "ms": 48210,
  "pipelines": [
    {
      "pipeline": "Headway",
      "dry_run": true,
      "page": {
        "state": "GA",
        "page": 13
      },
      "cards_on_page": 20,
      "items": [
        {
          "slug": "jane-doe-lpc",
          "stage": "scored",
          "npi_status": "matched",
          "tier": "A",
          "score_raw": 82
        }
      ]
    }
  ]
}

list_pipeline_runs

Who: Admins. Level: read. Confirms: no.

Lists a pipeline's recent runs, newest first, with their per step counts and any error.

ArgumentTypeRequiredAccepts, default and limits
pipelinestringyesPipeline id or name (any case, no partial match) If two names match, the first one is used.
limitnumbernoWhole number. Default: 10. 1 to 50.

Returns: runs: each id, status, started_at, finished_at, config_version, params (source params plus reason), counts (pages, cards, NPI matched and so on), error.

Changes: None, read only.

WhenMessageWhat to do
The pipeline is not foundNo pipeline "<name>" in <workspace>. list_pipelines shows them.Call list_pipelines and use the name or id.

Example call:

{
  "name": "list_pipeline_runs",
  "arguments": {
    "pipeline": "Headway",
    "limit": 5
  }
}

Example result:

{
  "runs": [
    {
      "id": "r9...",
      "status": "done",
      "started_at": "2026-12-02T13:00:00Z",
      "finished_at": "2026-12-02T13:40:00Z",
      "config_version": 14,
      "params": {
        "states": [
          "GA"
        ],
        "reason": "daily"
      },
      "counts": {
        "pages": 3,
        "cards": 60,
        "npi_matched": 51,
        "leads_created": 22
      },
      "error": null
    }
  ]
}

list_pipeline_items

Who: Admins. Level: read. Confirms: no.

Lists the providers (people) a pipeline has seen, with stage, NPI decision, every check value and its evidence, the score and tier, and the lead it became. Filter by run, stage, tier or skip reason.

ArgumentTypeRequiredAccepts, default and limits
pipelinestringyesPipeline id or name (any case, no partial match) If two names match, the first one is used.
run_idstringnoA run id.
stagestringnoSourced, npi_done, group_done, site_done, scored, ingested, skipped, error.
tierstringnoA, B, C (any case) Upper cased.
skip_reasonstringnoNpi_none, npi_ambiguous, no_phone, dnc, existing_customer.
limitnumbernoWhole number. Default: 25. 1 to 100.

Returns: items: each id, external_id, run_id, stage, skip_reason, person, npi, npi_status, facts, score, score_raw, tier, segment, factors, score_version, company_id, enrolled, last_error, updated_at. Sorted by score_raw high to low (empty last), then newest.

Changes: None, read only.

Good to know:

  • Filter values are not checked; a wrong value returns no items.
WhenMessageWhat to do
The pipeline is not foundNo pipeline "<name>" in <workspace>. list_pipelines shows them.Call list_pipelines and use the name or id.

Example call:

{
  "name": "list_pipeline_items",
  "arguments": {
    "pipeline": "Headway",
    "tier": "a",
    "limit": 10
  }
}

Example result:

{
  "items": [
    {
      "id": "i1...",
      "external_id": "jane-doe-lpc",
      "stage": "ingested",
      "npi": "1234567890",
      "npi_status": "matched",
      "tier": "A",
      "score_raw": 82,
      "company_id": "c7...",
      "enrolled": false
    }
  ]
}

get_pipeline_item

Who: Admins. Level: read. Confirms: no.

Returns one pipeline item and every raw record collected for it (directory card, NPI lookup and record, group NPI search, website search), exactly as fetched.

ArgumentTypeRequiredAccepts, default and limits
item_idstringyesItem id, the directory slug (external_id), or the company id of the lead it became. Searched across every pipeline in the workspace.

Returns: item (every column of the lead_pipeline_items row) and records: each id, source, record_type, external_id, status, payload, last_fetched_at.

Changes: None, read only.

Good to know:

  • There is no pipeline argument; if one company came from two pipelines, one item is returned.
WhenMessageWhat to do
Nothing matchesNo pipeline item with that id, slug or company.Use list_pipeline_items to find the id.

Example call:

{
  "name": "get_pipeline_item",
  "arguments": {
    "item_id": "jane-doe-lpc"
  }
}

Example result:

{
  "item": {
    "id": "i1...",
    "external_id": "jane-doe-lpc",
    "stage": "ingested",
    "tier": "A",
    "record_ids": [
      "x1...",
      "x2..."
    ]
  },
  "records": [
    {
      "id": "x1...",
      "source": "nppes",
      "record_type": "npi_record",
      "status": "ok",
      "payload": {
        "number": "1234567890"
      },
      "last_fetched_at": "2026-12-02T13:10:00Z"
    }
  ]
}

pipeline_report

Who: Admins. Level: read. Confirms: no.

Shows a pipeline's results over a number of days: the funnel from sourced to signed, tiers, skip reasons, ready leads, how each yes or no check relates to meetings, and per run and tier calls, connects, conversations and meetings.

ArgumentTypeRequiredAccepts, default and limits
pipelinestringyesPipeline id or name (any case, no partial match) If two names match, the first one is used.
daysnumbernoDays back. Default: 30. At least 1, no upper limit.

Returns: funnel {stages (key, label, count for sourced, npi_matched, tier_ab, ingested, contacted, conversation, meeting, signed), tiers, skipped, checks (key, label, yes, yes_meetings, no, no_meetings), ready} and by_run_and_tier (each run_id, started_at, tier, leads, called, connects, conversations, meetings).

Changes: None, read only.

Good to know:

  • The funnel counts items created in the window; the per run table counts runs started in the window.
  • Meetings mean deals in the stages listed in config.metrics.meeting_stages.
  • If the per run query fails, by_run_and_tier is an empty list with no error.
WhenMessageWhat to do
The pipeline is not foundNo pipeline "<name>" in <workspace>. list_pipelines shows them.Call list_pipelines and use the name or id.

Example call:

{
  "name": "pipeline_report",
  "arguments": {
    "pipeline": "Headway",
    "days": 14
  }
}

Example result:

{
  "funnel": {
    "stages": [
      {
        "key": "sourced",
        "label": "Sourced",
        "count": 640
      },
      {
        "key": "meeting",
        "label": "Discovery calls",
        "count": 9
      }
    ],
    "tiers": {
      "A": 120,
      "B": 210,
      "C": 90
    },
    "skipped": {
      "npi_none": 80
    },
    "checks": [
      {
        "key": "npi_match",
        "label": "NPI match",
        "yes": 300,
        "yes_meetings": 8,
        "no": 20,
        "no_meetings": 0
      }
    ],
    "ready": 87
  },
  "by_run_and_tier": [
    {
      "run_id": "r9...",
      "tier": "A",
      "leads": 22,
      "called": 18,
      "connects": 9,
      "conversations": 5,
      "meetings": 2
    }
  ]
}

lead_loop_report

Who: Admins. Level: read. Confirms: no.

Shows the lead loop for a campaign: which kinds of leads turned into conversations and deals, Montana's summary, next week's plan and how past batches did. Without a campaign it lists recent lead loop plans across the workspace. Read only.

ArgumentTypeRequiredAccepts, default and limits
campaignstringnoActive campaign name or id. Leave out to list plans for all campaigns.

Returns: With a campaign: { campaign: { id, name, organization, organization_id }, autonomy, week_starting, status, summary, new_leads_wanted, searches, what_worked, past_batches }. After a search ran it also has leads_found, leads_sent_to_reps, error. Superadmins also see treg_searches, treg_cost_usd and spent_usd. what_worked is the saved report: measure, base, groups (each with dim, value, called, connected, deals, rates, verdict), called_last_week, backlog. past_batches rows: run_id, added, called, connected, deals. With no plan yet: { campaign, autonomy, note }. Without a campaign: an array of up to 40 runs, each { campaign_id, week_start, status, summary, lead_target, leads_added, campaigns: { name }, organizations: { name }, autonomy }, newest week first.

Changes: None, read only.

Good to know:

  • Campaigns are looked up only among active campaigns of the workspace the call runs in, by id or by part of the name (an exact name wins).
  • what_worked is the snapshot saved when the plan was last built by plan_lead_loop or the weekly job, not a live count.
  • autonomy is off, ask or self_driving; a campaign with no settings row reads as ask.
  • Status values seen: ready, nothing_to_do, running, review, approved, sent, failed, skipped, discarded.
WhenMessageWhat to do
campaign is emptyName a campaign.Pass a campaign name or id.
Several active campaigns match and none matches exactly"<text>" matches several campaigns: <name (workspace, id); ...>. Use the id.Use the id.
No active campaign matchesNo active campaign "<text>".Check the name; inactive campaigns are not found here.
The caller is not a workspace adminOnly a workspace admin can do this.Ask a workspace admin to do it.
The caller has the client roleA client account can only read.A client cannot use this tool.

Example call:

{
  "name": "lead_loop_report",
  "arguments": {
    "campaign": "Dental clinics Ohio"
  }
}

Example result:

{
  "campaign": {
    "id": "5b1f0c3e-2a77-4f61-9d0e-0c6f2b8e4a11",
    "name": "Dental clinics Ohio",
    "organization": "Acme Calls",
    "organization_id": "9e2d0000-0000-4000-8000-000000000001"
  },
  "autonomy": "ask",
  "week_starting": "2026-12-07",
  "status": "ready",
  "summary": "Family dental practices in the suburbs booked the most meetings. Downtown chains did not.",
  "new_leads_wanted": 120,
  "searches": [
    {
      "query": "family dentist",
      "location": "Dublin, OH",
      "kind": "more",
      "why": "Family dentists: 9% of 140 called reached a deal.",
      "pages": 3
    }
  ],
  "what_worked": {
    "measure": "deals",
    "called_last_week": 180,
    "backlog": 60,
    "groups": [
      {
        "dim": "city",
        "value": "Dublin",
        "called": 140,
        "deals": 13,
        "verdict": "winner"
      }
    ]
  },
  "past_batches": [
    {
      "run_id": "77aa0000-0000-4000-8000-000000000002",
      "added": 95,
      "called": 80,
      "connected": 31,
      "deals": 4
    }
  ]
}

plan_lead_loop

Who: Admins. Level: write. Confirms: no.

Scores a campaign's leads over the last 28 days and writes next week's plan of Google Maps searches: mostly more of what worked, about a fifth as a test. Nothing is searched until approve_lead_plan. Use it before approve_lead_plan.

ArgumentTypeRequiredAccepts, default and limits
campaignstringyesActive campaign name or id.
leadsnumbernoA number of new leads. Default: decided from last week: leads called last week minus leads still waiting in the queue. Capped by the campaign's weekly_max_leads (300 by default) Forces that many even if the queue is full.

Returns: { campaign, week_starting, status, summary, new_leads_wanted, searches: [{ query, location, kind (more or test), why, pages }] }. Superadmins also see treg_searches and treg_cost_usd. status is ready when there are searches, else nothing_to_do.

Changes: Upserts the lead_loop_runs row for next week (the coming Monday, UTC), replacing a plan that is ready, nothing_to_do, failed, skipped or discarded. Uses one AI call. No Treg search, no credits.

Good to know:

  • Campaigns are looked up only among active campaigns of the workspace the call runs in, by id or by part of the name (an exact name wins).
  • With fewer than 20 leads called in 28 days the plan is nothing_to_do with no searches, unless leads is given and the campaign has a search hint (what to look for) in its lead loop settings.
  • If the target is under 20 leads (the queue is full) there are no searches and the status is nothing_to_do.
  • Pages are limited by the weekly budget (0.50 USD by default) and at most 6 per search; one page is up to 20 businesses.
WhenMessageWhat to do
campaign is emptyName a campaign.Pass a campaign name or id.
Several active campaigns match and none matches exactly"<text>" matches several campaigns: <name (workspace, id); ...>. Use the id.Use the id.
No active campaign matchesNo active campaign "<text>".Check the name; inactive campaigns are not found here.
Next week's run is already running, in review, approved or sentNext week's plan for this campaign is already <status>.Use lead_loop_report to see it; send or wait.
Other failures while buildingThe error text.Read the message.
The caller is not a workspace adminOnly a workspace admin can do this.Ask a workspace admin to do it.
The caller has the client roleA client account can only read.A client cannot use this tool.
The connection level is lower than writeThis connection is "<level>" and this needs "write". Make a connection with more access in Sales Montana settings.Make a connection with more access in Sales Montana settings.

Example call:

{
  "name": "plan_lead_loop",
  "arguments": {
    "campaign": "Dental clinics Ohio",
    "leads": 100
  }
}

Example result:

{
  "campaign": {
    "id": "5b1f0c3e-2a77-4f61-9d0e-0c6f2b8e4a11",
    "name": "Dental clinics Ohio",
    "organization": "Acme Calls",
    "organization_id": "9e2d0000-0000-4000-8000-000000000001"
  },
  "week_starting": "2026-12-07",
  "status": "ready",
  "summary": "Suburban family dentists did best. Next week looks for more of them nearby and tests orthodontists.",
  "new_leads_wanted": 100,
  "searches": [
    {
      "query": "family dentist",
      "location": "Westerville, OH",
      "kind": "more",
      "why": "Family dentists: 9% of 140 called reached a deal.",
      "pages": 3
    },
    {
      "query": "orthodontist",
      "location": "Columbus, OH",
      "kind": "test",
      "why": "Tests whether orthodontists book like dentists.",
      "pages": 1
    }
  ]
}

approve_lead_plan

Who: Admins. Level: act. Confirms: yes, preview first, then the same call with confirm: true.

Approves a campaign's waiting lead plan and starts the Google Maps searches in the background. Businesses already in the workspace or on a do not call list are dropped; the finds wait for review in send_lead_batch. The first call returns the cost; the same call with confirm: true starts the search.

ArgumentTypeRequiredAccepts, default and limits
campaignstringyesActive campaign name or id.
confirmbooleannoTrue or false; the text "true" or "false" also works. Default: not set, which returns a preview. Leave it out first. Call again with confirm: true only after the person agrees.

Returns: Preview: { preview: true, campaign, the plan fields (as in plan_lead_loop), cost, next }. cost is text: for a self serve workspace "up to N credits (rate a lead, charged only for leads you send to the reps; balance B)", otherwise the Treg search count and dollar cap. Confirmed: { campaign, status: "running", note }.

Changes: On confirm: marks the run running with the approver, then runs paid Treg Maps searches in the background, stopping at the lead target or the weekly budget. Found businesses are held in lead_loop_leads; the run becomes review, or failed if nothing new was found. No credits are charged here.

Good to know:

  • Campaigns are looked up only among active campaigns of the workspace the call runs in, by id or by part of the name (an exact name wins).
  • Only a superadmin, or an admin of a self serve workspace, may approve.
  • Wait a minute or two, then call send_lead_batch without confirm to see the finds.
  • The latest run by week is the one checked; an older ready run is not approved.
WhenMessageWhat to do
campaign is emptyName a campaign.Pass a campaign name or id.
Several active campaigns match and none matches exactly"<text>" matches several campaigns: <name (workspace, id); ...>. Use the id.Use the id.
No active campaign matchesNo active campaign "<text>".Check the name; inactive campaigns are not found here.
A managed workspace and the caller is not a superadminSales Montana runs lead finding for this workspace. Your account manager approves the plan; lead_loop_report shows it.Leave it to Sales Montana staff.
No planNo plan for <campaign>. Use plan_lead_loop first.Run plan_lead_loop.
The latest plan is not readyThe latest plan for <campaign> is <status>, not waiting for approval.Check lead_loop_report.
Self serve wallet too small for the whole targetThese <n> leads cost up to <x> credits and the workspace has <y>. Top up in Settings, Billing.Top up, or plan fewer leads.
Platform Treg daily limit would be passedThis would pass today's lead data limit: $<spent> spent of $<cap>. Try tomorrow.Try tomorrow; the plan stays ready.
The plan changed in the meantimeThat plan is not waiting for approval any more.Read lead_loop_report.
The caller is not a workspace adminOnly a workspace admin can do this.Ask a workspace admin to do it.
The caller has the client roleA client account can only read.A client cannot use this tool.
The connection level is lower than actThis connection is "<level>" and this needs "act". Make a connection with more access in Sales Montana settings.Make a connection with more access in Sales Montana settings.

Example call:

{
  "name": "approve_lead_plan",
  "arguments": {
    "campaign": "Dental clinics Ohio",
    "confirm": true
  }
}

Example result:

{
  "campaign": {
    "id": "5b1f0c3e-2a77-4f61-9d0e-0c6f2b8e4a11",
    "name": "Dental clinics Ohio",
    "organization": "Acme Calls",
    "organization_id": "9e2d0000-0000-4000-8000-000000000001"
  },
  "status": "running",
  "note": "Searching now; it takes a minute or two. The leads then wait for review: send_lead_batch shows them, and sends them to the reps once the person agrees."
}

send_lead_batch

Who: Admins. Level: act. Confirms: yes, preview first, then the same call with confirm: true.

Works on the leads approve_lead_plan found. Without confirm it lists them for review; ids in remove are taken out first. With confirm: true the rest become leads in the workspace and join the campaign queue, and a self serve workspace is charged per lead sent.

ArgumentTypeRequiredAccepts, default and limits
campaignstringyesActive campaign name or id.
removearray of stringsnoids of found leads from the preview list; a JSON text of the array also works. Values that are not ids are ignored. Removal is saved at once, on the preview call too, and cannot be undone here.
confirmbooleannoTrue or false; the text "true" or "false" also works. Default: not set, which returns a preview. Leave it out first. Call again with confirm: true only after the person agrees.

Returns: Preview: { preview: true, campaign, leads: [{ id, name, phone, type, city, state, rating, reviews, website, found_by }], cost? (self serve only), next }. Up to 500 leads listed. Confirmed: { campaign, sent, skipped }. skipped counts finds that are now already in the workspace or on a do not call list.

Changes: remove marks those found leads removed. On confirm: inserts companies (source 'lead-loop'), queues them on the campaign, marks the run sent, and debits a self serve workspace's credits at the Maps lead rate per lead sent (not when its own Treg key paid).

Good to know:

  • Campaigns are looked up only among active campaigns of the workspace the call runs in, by id or by part of the name (an exact name wins).
  • Use the ids from the preview list in remove, not lead names.
  • Workspace and do not call checks run again at send time, since days may have passed.
WhenMessageWhat to do
campaign is emptyName a campaign.Pass a campaign name or id.
Several active campaigns match and none matches exactly"<text>" matches several campaigns: <name (workspace, id); ...>. Use the id.Use the id.
No active campaign matchesNo active campaign "<text>".Check the name; inactive campaigns are not found here.
A managed workspace and the caller is not a superadminSales Montana runs lead finding for this workspace. Your account manager reviews and sends the leads.Leave it to Sales Montana staff.
No run in reviewNo found leads are waiting for review on <campaign>.Wait for approve_lead_plan to finish, or check lead_loop_report.
The batch was sent or discarded meanwhileThat batch is not waiting for review any more.Check lead_loop_report.
Insert or queue failsThe database error text.The run goes back to review; retry.
The caller is not a workspace adminOnly a workspace admin can do this.Ask a workspace admin to do it.
The caller has the client roleA client account can only read.A client cannot use this tool.
The connection level is lower than actThis connection is "<level>" and this needs "act". Make a connection with more access in Sales Montana settings.Make a connection with more access in Sales Montana settings.

Example call:

{
  "name": "send_lead_batch",
  "arguments": {
    "campaign": "Dental clinics Ohio",
    "remove": [
      "4d5e6f70-8192-4a3b-9c4d-5e6f70819203"
    ]
  }
}

Example result:

{
  "preview": true,
  "campaign": {
    "id": "5b1f0c3e-2a77-4f61-9d0e-0c6f2b8e4a11",
    "name": "Dental clinics Ohio",
    "organization": "Acme Calls",
    "organization_id": "9e2d0000-0000-4000-8000-000000000001"
  },
  "leads": [
    {
      "id": "a1b2c3d4-e5f6-4071-8293-a4b5c6d7e8f9",
      "name": "Westerville Family Dental",
      "phone": "+16145550199",
      "type": "Dentist",
      "city": "Westerville",
      "state": "OH",
      "rating": 4.8,
      "reviews": 212,
      "website": "https://wfd.example",
      "found_by": "More: family dentist in Westerville, OH"
    }
  ],
  "cost": "7.5 credits (0.75 a lead), balance 500",
  "next": "Show the person these leads. Ids they do not want go in remove. When they agree, call send_lead_batch again with confirm: true."
}

set_autonomy

Who: Admins. Level: write. Confirms: no.

Sets how far a campaign's lead loop may act alone: off, ask or self_driving. off and ask never change a queue without a person. self_driving lets the loop reorder the queue and pause failing arms inside fixed guardrails, and only a superadmin can set it.

ArgumentTypeRequiredAccepts, default and limits
campaign_idstringyesActive campaign id or name (despite the argument's name)
autonomystringyesOff, ask or self_driving (case does not matter) Off, ask, self_driving.
notestringnoWhy the mode is changing. Saved as autonomy_note on the settings row.

Returns: { campaign: { id, name, organization, organization_id }, autonomy, note }.

Changes: Calls set_loop_autonomy: upserts lead_loop_settings (autonomy, note). Leaving self_driving switches off the loop's share set and, if the loop had turned smart ordering on, turns it off and restores the original queue order (or rebuilds the owner's own smart order).

Good to know:

  • Campaigns are looked up only among active campaigns of the workspace the call runs in, by id or by part of the name (an exact name wins).
  • No undo is returned. To go back, call it again with the earlier mode (lead_loop_report shows the current one).
  • updated_by is left empty because the server calls the database without a signed in user.
WhenMessageWhat to do
autonomy not off, ask or self_drivingAutonomy is off, ask or self_driving.Use one of the three.
self_driving by someone who is not a superadminOnly a superadmin can set a campaign self-driving.Use off or ask.
The database refusesThe database error text.Read the message.
campaign is emptyName a campaign.Pass a campaign name or id.
Several active campaigns match and none matches exactly"<text>" matches several campaigns: <name (workspace, id); ...>. Use the id.Use the id.
No active campaign matchesNo active campaign "<text>".Check the name; inactive campaigns are not found here.
The caller is not a workspace adminOnly a workspace admin can do this.Ask a workspace admin to do it.
The caller has the client roleA client account can only read.A client cannot use this tool.
The connection level is lower than writeThis connection is "<level>" and this needs "write". Make a connection with more access in Sales Montana settings.Make a connection with more access in Sales Montana settings.

Example call:

{
  "name": "set_autonomy",
  "arguments": {
    "campaign_id": "Dental clinics Ohio",
    "autonomy": "ask",
    "note": "Back to asking while we test new scripts."
  }
}

Example result:

{
  "campaign": {
    "id": "5b1f0c3e-2a77-4f61-9d0e-0c6f2b8e4a11",
    "name": "Dental clinics Ohio",
    "organization": "Acme Calls",
    "organization_id": "9e2d0000-0000-4000-8000-000000000001"
  },
  "autonomy": "ask",
  "note": "Back to asking while we test new scripts."
}