Docs
MCPPricingGo to Sales Montana

MCP server

Account, team and undo tools

Start here. These tell an agent who it is acting as, what it may do, and how to take a change back.

ToolWhoLevelConfirmsWhat it does
whoamiAdmins, reps and clientsreadnoSays who this connection acts as: the person, their role, the workspace and its timezone, and what the connection may do.
read_docsAdmins, reps and clientsreadnoReturns one part of this documentation, so an agent without web access can read it.
list_workspacesSales Montana staff onlyreadnoLists every workspace on Sales Montana with its plan, status, head count and calls in the last 7 days.
list_teamAdmins and repsreadnoLists the people in the workspace with their email, role, whether the account is active and their presence.
credits_overviewAdmins, reps and clientsreadnoShows the workspace's credit balance (self serve workspaces only) and the price in credits of every paid action.
recent_actionsAdmins, reps and clientsreadnoLists the caller's own recent changes made through any of their AI connections in this workspace that stored an undo, newest first, with an action_id for each.
undo_actionAdmins and repswritenoReverses one change the caller made through an AI connection, by its action_id from recent_actions or from the change's own result.
treg_key_statusSales Montana staff onlyreadnoSays whether this workspace uses its own Treg account for lead searches, signals and enrichment, or Sales Montana's.
set_treg_keySales Montana staff onlywritenoStores a managed workspace's own Treg key so its lead searches, signals and enrichment are billed to its Treg account.
clear_treg_keySales Montana staff onlywritenoDeletes the workspace's stored Treg key, so lead searches, signals and enrichment go back to Sales Montana's Treg account.
payroll_monthSales Montana staff onlyreadnoShows each rep's pay for a month in this workspace, with the same figures as the Payroll page: salary, working days, days present, absences, idle minutes, deductions and net pay.
payroll_rep_daysSales Montana staff onlyreadnoShows one rep's month day by day: how each day counted, hours worked, calls made, idle minutes, and any day an admin changed by hand with its note.

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

Tools

whoami

Who: Admins, reps and clients. Level: read. Confirms: no.

Says who this connection acts as: the person, their role, the workspace and its timezone, and what the connection may do. Call it first when unsure of the role, the access level or the timezone to show times in.

No arguments.

Returns: data.person {name, email, role}, data.workspace {name, timezone, billing (the workspace service_model)}, data.connection_level (read, write or act), data.all_workspaces (a sentence, Yes or No), data.can {read, write, act} as booleans, data.never (a fixed sentence).

Changes: None, read only

Good to know:

  • can.write is true only when the connection level is write or act and the role is not client. can.act is true only on an act connection and a role other than client.
  • can does not reflect admin rights. Admin only tools still refuse a rep even when can.write is true.
  • Times from every tool are stored in UTC; show them in workspace.timezone.

Example call:

{
  "name": "whoami",
  "arguments": {}
}

Example result:

{
  "person": {
    "name": "Sara Khan",
    "email": "sara@acme.com",
    "role": "agent"
  },
  "workspace": {
    "name": "Acme Roofing",
    "timezone": "America/Chicago",
    "billing": "self_serve"
  },
  "connection_level": "write",
  "all_workspaces": "No. This connection reaches only this workspace.",
  "can": {
    "read": true,
    "write": true,
    "act": false
  },
  "never": "This connection can never place a call, change billing, or change anyone's role."
}

read_docs

Who: Admins, reps and clients. Level: read. Confirms: no.

Returns one part of this documentation, so an agent without web access can read it. With no topic it returns the rules and the list of topics. A topic can be rules, concepts, workflows, tools, a tool's name, or a few words naming a section such as "add a batch to a cadence" or "why are emails not sending".

ArgumentTypeRequiredAccepts, default and limits
topicstringnoRules, concepts, workflows, tools, a tool name such as set_lead_drafts, or words from a section heading. Default: rules and the list of topics.

Returns: topic (what was matched) and text (Markdown). When nothing matches, the list of topics instead.

Changes: None. Reads only.

Undo: Nothing to undo.

Good to know:

  • Read rules once at the start of a session, then the workflow or tool you need before a change.
  • One section is a few thousand tokens at most; the whole guide is never returned in one call.

Example call:

{
  "name": "read_docs",
  "arguments": {
    "topic": "add a batch to a cadence"
  }
}

Example result:

{
  "topic": "workflows: Add a batch to a cadence and start it",
  "text": "## Add a batch to a cadence and start it ..."
}

list_workspaces

Who: Sales Montana staff only. Level: read. Confirms: no.

Lists every workspace on Sales Montana with its plan, status, head count and calls in the last 7 days. Only a Sales Montana staff connection that may reach every workspace can call it. Use a name or id from here as the workspace argument on other tools.

ArgumentTypeRequiredAccepts, default and limits
include_inactivebooleannoTrue or false (the text "true"/"false" also works). Default: false. Without it only workspaces with active = true are listed.

Returns: data is an array, ordered by name. Each row: id, name, slug, status, plan, service_model, active, created_at, people (profiles that are not superadmin), calls_last_7_days, current (true for the workspace this call runs in).

Changes: None, read only

Good to know:

  • At most 500 workspaces are returned.
  • calls_last_7_days counts calls started in the last 7 times 24 hours, not by the workspace's calendar days.
  • This tool does not take a workspace argument itself.
WhenMessageWhat to do
the connection is not an all workspaces staff connectionThis connection reaches only its own workspace.Not available on this connection.

Example call:

{
  "name": "list_workspaces",
  "arguments": {
    "include_inactive": false
  }
}

Example result:

[
  {
    "id": "7b1c0f7e-1111-4a2b-9c3d-222233334444",
    "name": "Acme Roofing",
    "slug": "acme-roofing",
    "status": "active",
    "plan": "team",
    "service_model": "self_serve",
    "active": true,
    "created_at": "2026-09-14T10:02:11Z",
    "people": 6,
    "calls_last_7_days": 412,
    "current": true
  }
]

list_team

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

Lists the people in the workspace with their email, role, whether the account is active and their presence. Staff (superadmin) are left out. Use it to find a rep's exact name, email or id for other tools.

No arguments.

Returns: data is an array ordered by full_name: id, full_name, email, role, active, presence (the stored presence value).

Changes: None, read only

Good to know:

  • Inactive people are included; check active.
  • There is no limit or paging; the whole team comes back.
WhenMessageWhat to do
a client account calls itA client account can only read.Not available to a client.

Example call:

{
  "name": "list_team",
  "arguments": {}
}

Example result:

[
  {
    "id": "4f0b2c55-aaaa-4bbb-8ccc-0123456789ab",
    "full_name": "Sara Khan",
    "email": "sara@acme.com",
    "role": "agent",
    "active": true,
    "presence": "online"
  }
]

credits_overview

Who: Admins, reps and clients. Level: read. Confirms: no.

Shows the workspace's credit balance (self serve workspaces only) and the price in credits of every paid action. One credit is one cent.

No arguments.

Returns: balance (number, or null for a managed workspace), managed (true when invoiced with no wallet), prices: each key, what (label), credits (may be a decimal), per (unit).

Changes: None, read only.

Good to know:

  • Only rates marked available are listed, ordered by category then sort.
  • Prices are about 1.5 times real cost, in steps of 0.25 credits.
  • A client account can call it (level read, not admin only).

Example call:

{
  "name": "credits_overview",
  "arguments": {}
}

Example result:

{
  "balance": 18420.5,
  "managed": false,
  "prices": [
    {
      "key": "lead_mobile",
      "what": "Mobile number found",
      "credits": 8.5,
      "per": "found"
    },
    {
      "key": "signal_search",
      "what": "Signal search",
      "credits": 0.5,
      "per": "search"
    }
  ]
}

recent_actions

Who: Admins, reps and clients. Level: read. Confirms: no.

Lists the caller's own recent changes made through any of their AI connections in this workspace that stored an undo, newest first, with an action_id for each. Use it to find what to pass to undo_action.

ArgumentTypeRequiredAccepts, default and limits
limitnumbernoA number. Default: 20. Clamped to 1 to 50.

Returns: data is an array: action_id, tool, what (the summary line), from (the client name), at, can_undo (false once undone), undone_at.

Changes: None, read only

Good to know:

  • Only successful actions that stored an undo are listed. Actions without an undo (sends, stage edits, restores, reads) never appear.
  • Covers every connection the person has, not only this one, but only in the current workspace.
  • can_undo only says it has not been undone yet. undo_action can still refuse if someone changed the record since.

Example call:

{
  "name": "recent_actions",
  "arguments": {
    "limit": 5
  }
}

Example result:

[
  {
    "action_id": "a1b2c3d4-0000-4000-8000-000000000010",
    "tool": "move_deal",
    "what": "Moved the deal to Quote sent.",
    "from": "Claude",
    "at": "2026-12-02T10:15:00Z",
    "can_undo": true,
    "undone_at": null
  }
]

undo_action

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

Reverses one change the caller made through an AI connection, by its action_id from recent_actions or from the change's own result. Before writing anything back it checks that the record still holds what the change set, and refuses when a person (or the system, for example a mailbox health pause) changed it since.

ArgumentTypeRequiredAccepts, default and limits
action_idstringyesAn action_id from recent_actions or a tool result.

Returns: data {done (a sentence saying what was put back)}.

Changes: Reverses the stored change and marks the action undone_at. What exactly changes depends on the original tool.

Good to know:

  • Only the caller's own actions in the current workspace can be undone, from any of their connections.
  • Some undos are partial and still count as done: schedule_callback (task and next touch checked separately), archive_leads (only untouched leads and queues come back), and batch undos. Read data.done to see what was put back; the action is marked undone either way.
  • When an undo refuses with an error, the action is not marked undone.
  • Settings undos (update_campaign, set_send_window, set_cadence_running, set_campaign_paused, set_lead_finding, set_pilot_mode, approve_cadence, set_cadence_mailboxes, set_mailbox_limits, pause_mailbox_sending, resume_mailbox_sending, set_cadence_writing, set_cadence_settings, set_step_wait, set_reply_alerts) store what the change set and put the earlier values back only while every changed field still holds that value.
WhenMessageWhat to do
the id is not one of the caller's actions in this workspaceNo action of yours with that id. recent_actions lists them.Use recent_actions.
already undoneThat one has already been undone.Nothing to do.
the action stored no undoThat action has nothing to undo.Change it back with the matching tool.
the record changed sinceMessages such as "The deal has moved since, so it stays where it is.", "That task has been completed since, so it stays.", "That lead has been worked since it was enrolled, so it stays in the queue."Leave it, or change it by hand with the matching tool.
an undo shape this server does not knowNo way to undo that.Change it back by hand.
A setting changed since the action (settings undos)It has changed since (<fields>), so it stays as it is now. Change it directly if it should go back.Leave it, or change it with the matching tool.
A settings change made before 3 December 2026, when these checks beganThis change was made before undo could check for later changes, so it is not undone automatically. Change the setting directly instead.Change it with the matching tool.

Example call:

{
  "name": "undo_action",
  "arguments": {
    "action_id": "a1b2c3d4-0000-4000-8000-000000000019"
  }
}

Example result:

{
  "done": "Deal stage put back."
}

treg_key_status

Who: Sales Montana staff only. Level: read. Confirms: no.

Says whether this workspace uses its own Treg account for lead searches, signals and enrichment, or Sales Montana's. Shows only the last four characters of the key. Sales Montana staff only.

No arguments.

Returns: { set, last4, set_at }. set is true when the workspace has its own key.

Changes: None, read only.

Good to know:

  • run() also refuses non superadmins with "Only Sales Montana staff can manage the Treg key."
WhenMessageWhat to do
The caller is not a superadminOnly Sales Montana staff can do this.Only Sales Montana staff can use it.
The caller has the client roleA client account can only read.A client cannot use this tool.

Example call:

{
  "name": "treg_key_status",
  "arguments": {}
}

Example result:

{
  "set": true,
  "last4": "9f2c",
  "set_at": "2026-11-02T10:14:00Z"
}

set_treg_key

Who: Sales Montana staff only. Level: write. Confirms: no.

Stores a managed workspace's own Treg key so its lead searches, signals and enrichment are billed to its Treg account. The key is checked live with Treg, stored encrypted, and never shown again. Sales Montana staff only.

ArgumentTypeRequiredAccepts, default and limits
keystringyesThe Treg API key. 16 to 200 characters, no spaces. Redacted in the action log.

Returns: { set, last4, set_at } after saving.

Changes: Upserts the workspace's source_connections row for source 'treg' with the encrypted key. Replaces any earlier key. Makes one free check call to Treg.

Good to know:

  • The setting runs in the workspace the call runs in; use the workspace argument to set it for another workspace.
  • run() also refuses non superadmins with "Only Sales Montana staff can manage the Treg key."
WhenMessageWhat to do
Key emptyPaste the key first.Pass the key.
Key too short, too longThat does not look like a Treg key.Check the key.
Key has spacesA Treg key has no spaces in it.Remove spaces.
Workspace is not managedOwn Treg keys are for managed workspaces only.Self serve workspaces pay in credits; do not set a key.
Treg could not be reachedCould not reach Treg to check that key. Try again in a minute.Retry later.
Treg refused the keyTreg rejected that key.Get a valid key at treg.to.
The caller is not a superadminOnly Sales Montana staff can do this.Only Sales Montana staff can use 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_treg_key",
  "arguments": {
    "key": "treg_live_xxxxxxxxxxxxxxxx9f2c"
  }
}

Example result:

{
  "set": true,
  "last4": "9f2c",
  "set_at": "2026-12-02T09:00:00Z"
}

clear_treg_key

Who: Sales Montana staff only. Level: write. Confirms: no.

Deletes the workspace's stored Treg key, so lead searches, signals and enrichment go back to Sales Montana's Treg account. Sales Montana staff only.

No arguments.

Returns: { set: false, last4: null, set_at: null }.

Changes: Deletes the workspace's source_connections row for source 'treg'.

Good to know:

  • It succeeds even when no key was stored.
  • A self serve workspace is charged credits again; a managed one is billed to Sales Montana's Treg account again.
  • run() also refuses non superadmins with "Only Sales Montana staff can manage the Treg key."
WhenMessageWhat to do
The delete failsThe database error text.Read the message.
The caller is not a superadminOnly Sales Montana staff can do this.Only Sales Montana staff can use 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": "clear_treg_key",
  "arguments": {}
}

Example result:

{
  "set": false,
  "last4": null,
  "set_at": null
}

payroll_month

Who: Sales Montana staff only. Level: read. Confirms: no.

Shows each rep's pay for a month in this workspace, with the same figures as the Payroll page: salary, working days, days present, absences, idle minutes, deductions and net pay. Optionally one rep only. Sales Montana staff only.

ArgumentTypeRequiredAccepts, default and limits
monthstringnoYYYY-MM, a month name (jan, january, "oct 2026"), "this month", "last month" or "previous month". Default: this month, in the workspace timezone. A month name without a year that is later than the current month means last year.
repstringnoPart of a rep's name, or their profile id. Must match exactly one person on that month's payroll.

Returns: { month (YYYY-MM), workspace, currency, total_net, reps: [{ rep, monthly_salary, working_days, present, half_days, absent, paid_leave, still_to_come, dialed_without_clocking_in, idle_minutes, day_deduction, idle_deduction, deduction, net }] }.

Changes: None, read only.

Good to know:

  • Day deduction is a day's pay for each absent or not employed working day plus half a day for each half day. Idle deduction is idle minutes at the per minute rate. The total deduction never exceeds the salary.
  • dialed_without_clocking_in counts working days marked absent where the rep made calls and no admin changed the day by hand.
  • currency defaults to PKR when the workspace has no payroll settings.
  • People on payroll are those with a payroll record, plus active agents.
WhenMessageWhat to do
The caller is not a superadminOnly Sales Montana staff can do this.Only Sales Montana staff can read payroll.
month cannot be readGive the month as YYYY-MM, a month name, "this month" or "last month".Use YYYY-MM.
YYYY-MM month above 12 or 0That month does not exist.Use a real month.
The person is not an admin of the workspaceOnly an admin of this workspace can read its payroll.Check the workspace argument.
The caller has the client roleA client account can only read.A client cannot use this tool.
rep matches several people"<text>" matches several people: <names>. Be more specific.Use more of the name.
rep matches nobodyNobody called "<text>" is on this workspace's payroll that month. payroll_month lists who is.Call without rep to see names.

Example call:

{
  "name": "payroll_month",
  "arguments": {
    "month": "2026-11"
  }
}

Example result:

{
  "month": "2026-11",
  "workspace": "Acme Calls",
  "currency": "PKR",
  "total_net": 182500,
  "reps": [
    {
      "rep": "Sara Khan",
      "monthly_salary": 95000,
      "working_days": 21,
      "present": 19,
      "half_days": 1,
      "absent": 1,
      "paid_leave": 0,
      "still_to_come": 0,
      "dialed_without_clocking_in": 1,
      "idle_minutes": 42,
      "day_deduction": 6785.71,
      "idle_deduction": 452.38,
      "deduction": 7238.09,
      "net": 87761.91
    }
  ]
}

payroll_rep_days

Who: Sales Montana staff only. Level: read. Confirms: no.

Shows one rep's month day by day: how each day counted, hours worked, calls made, idle minutes, and any day an admin changed by hand with its note. Sales Montana staff only.

ArgumentTypeRequiredAccepts, default and limits
repstringyesPart of a rep's name, or their profile id. Must match exactly one person on that month's payroll.
monthstringnoYYYY-MM, a month name (jan, january, "oct 2026"), "this month", "last month" or "previous month". Default: this month, in the workspace timezone. A month name without a year that is later than the current month means last year.

Returns: { rep, month, net, currency, days: [{ day, kind, status, hours_worked, calls, changed_by_hand, note, idle_minutes }] }. kind is workday, weekend or holiday. status is present, half, absent, paid_leave (or another status an admin set), not_employed, holiday, off, extra, upcoming, today or in_progress.

Changes: None, read only.

Good to know:

  • hours_worked is rounded to one decimal. idle_minutes is shown for every day, including idle that was not charged (days set by hand, weekends, leave).
  • Present needs the full day hours (7 by default); half needs the half day hours (3.5 by default).
WhenMessageWhat to do
The caller is not a superadminOnly Sales Montana staff can do this.Only Sales Montana staff can read payroll.
month cannot be readGive the month as YYYY-MM, a month name, "this month" or "last month".Use YYYY-MM.
YYYY-MM month above 12 or 0That month does not exist.Use a real month.
The person is not an admin of the workspaceOnly an admin of this workspace can read its payroll.Check the workspace argument.
The caller has the client roleA client account can only read.A client cannot use this tool.
rep matches several people"<text>" matches several people: <names>. Be more specific.Use more of the name.
rep matches nobodyNobody called "<text>" is on this workspace's payroll that month. payroll_month lists who is.Call payroll_month to see names.
The days read failsThe database error text.Read the message.

Example call:

{
  "name": "payroll_rep_days",
  "arguments": {
    "rep": "Sara",
    "month": "last month"
  }
}

Example result:

{
  "rep": "Sara Khan",
  "month": "2026-11",
  "net": 87761.91,
  "currency": "PKR",
  "days": [
    {
      "day": "2026-11-03",
      "kind": "workday",
      "status": "present",
      "hours_worked": 7.4,
      "calls": 112,
      "changed_by_hand": false,
      "note": null,
      "idle_minutes": 6
    },
    {
      "day": "2026-11-04",
      "kind": "workday",
      "status": "absent",
      "hours_worked": 0,
      "calls": 0,
      "changed_by_hand": false,
      "note": null,
      "idle_minutes": 0
    }
  ]
}