conduyt-mcp 4.105.39 → 4.105.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -299,7 +299,7 @@ export function registerAiExtendedTools(server, client) {
299
299
  const result = await client.post("/api/v1/ai/tasks", { type: "segment_and_act", ...params, dryRun: true });
300
300
  return formatResult(result);
301
301
  });
302
- server.tool("conduyt_ai_task_pipeline_cleanup", "AI task (PREVIEW ONLY): preview finding stale deals in a pipeline and tagging, moving, notifying, or reporting on them. Returns the stale deals and what WOULD happen, without persisting. Executing a mutating action is intentionally restricted to a human session in the app; agent/API-key callers can only preview.", {
302
+ server.tool("conduyt_ai_task_pipeline_cleanup", "AI task (PREVIEW ONLY): preview finding stale deals in a pipeline and tagging, moving, notifying, or reporting on them. Returns the stale deals and what WOULD happen, without persisting. Executing a mutating action is intentionally restricted to a human session in the app; agent/API-key callers can only preview. (batch60, stageparked53) The preview scans stale WORK only: a card in a finished-work stage (isParked, status open) is a record and is never listed, so the preview shows none of them and a live run never reports, notifies or moves one.", {
303
303
  pipelineId: z.string().describe("Pipeline UUID to scan"),
304
304
  staleDays: z.number().optional().describe("Days without activity to consider a deal stale (default 30)"),
305
305
  action: z.enum(["tag", "move_stage", "notify", "report_only"]).optional().describe("Action to preview against stale deals (default report_only)"),
@@ -10,8 +10,14 @@ export declare const SEND_ONCE_EMAIL_NOTE = " Send once per contact: send_email
10
10
  export declare const AUTOMATION_KEY_REFUSALS_NOTE = " Unknown action keys are refused, never ignored: an action config key the action does not read (a typo such as `laneSoruce`) answers code `unknown_action_config_key` with the node, the key and, when one is close, a suggestion (\"Did you mean `laneSource`?\"); an action `type` no registry entry defines answers `unknown_action_type` (with 'Did you mean' when a registered type is close). Create and update answer 400 (an update that does not write `actions` is never refused for a key stored earlier), conduyt_workflow_validate answers 200 with valid false and the `errors` list (nodeId, field, code, message), and publish / a version restore answer 422 (the preflight refusal wraps `data.message`, `data.errors`, `data.warnings`). Read the suggestion, fix the key and send again; a stored workflow is never refused on read. A trigger condition or trigger node naming a deal MIRROR key (deal.customFields.<key>) answers 422 mirror_not_triggerable (#1292): trigger on the source field's own change (Contact Updated / Company Updated).";
11
11
  /** (idleoff57) the conditional switch-off, documented for an agent; (idleroute58) sent to POST /automations/:id/deactivate-if-idle */
12
12
  export declare const IF_IDLE_DOC = "Conditional switch-off: send ONLY isActive false with ifIdle true (it is sent to POST /api/v1/automations/:id/deactivate-if-idle, never as a PATCH: an app build without the feature answers 404 there and changes nothing, so an older server can never turn it into an unconditional switch-off; the result's data.isActive is false either way, and an automation that was already off answers the same success). The automation is switched off only if none of its work is in flight (a run that has not finished, a parked step such as a delay / wait / retry, a queued chase, a queued tag or consent hand-off, a contact held at a drip step, a due schedule slot, an event wake, an n8n delivery being retried, an e-mail of the automation that has no outcome yet (a draft, queued, scheduled or sending message)), decided in one transaction that also keeps any new run from starting until the switch-off commits. Nothing in flight: the same result as isActive false alone. 409: in-flight work, or a concurrent change; retry. Either way the API changes NOTHING. With code automation_has_inflight_work it is in-flight work: its inFlight object counts each class, earliestResumeAt is the earliest due time; wait and call again. A 409 without that code is a concurrent change (another change to the automation committed at the same moment): read it again and call again. 503 code automation_lock_timeout (Retry-After seconds): the automation was busy, nothing changed, call again. Without ifIdle, isActive false switches off unconditionally (a parked run is then dropped at its next step).";
13
+ /** (parity60, twinmerge59; app lib/drip-campaign-lock.ts DripEnrollmentTwinError, route.ts and publish/route.ts) the drip-twin 409: its code, the app's wording and the recovery */
14
+ export declare const ENROLLMENT_TWIN_409_DOC = "409 code automation_would_duplicate_enrollment: the write would make this automation enroll the same contacts as another ACTIVE automation on a drip campaign they did not share before (the same drip campaign, on the same tag or a merged alias of it, or with a trigger that fires for every tag); the app says: This would enroll the same contacts as \"<name>\", which is already active. Switch one of them off first. The error names it and `automation` is { id, name }. A retry cannot fix this. Recovery: switch that other automation off (conduyt_update_automation isActive false), OR change either workflow so the two no longer enroll the same contacts on that campaign AND PUBLISH that change (conduyt_publish_automation): a v2 workflow's edit stays a draft until it is published, and switching on resumes the PUBLISHED graph, never a draft, so an unpublished edit leaves the ownership unchanged and the same 409 comes back. Workflows that already overlapped before the write are never refused for it, but switching one of them off and on again is a new switch-on and is refused";
15
+ /** (parity60, twinmerge59; app lib/automation-inflight.ts AUTOMATION_BUSY_MESSAGE) the retryable lock timeout of any save, publish or switch-on */
16
+ export declare const AUTOMATION_LOCK_503_DOC = "503 code automation_lock_timeout (Retry-After seconds, retryable): another change in the workspace (such as a tag merge) held a lock this change needs (the enrollment lock wait is bounded at 3 s); nothing was changed, call again after Retry-After";
17
+ /** (parity60) what a SAVE or a PUBLISH that changes what a live drip-enrollment automation enrolls on can answer, besides the key refusals */
18
+ export declare const AUTOMATION_ENROLLMENT_REFUSALS_NOTE = " Enrollment refusals: 409 code automation_would_duplicate_enrollment: the write would make this automation enroll the same contacts as another ACTIVE automation on a drip campaign they did not share before (the same drip campaign, on the same tag or a merged alias of it, or with a trigger that fires for every tag); the app says: This would enroll the same contacts as \"<name>\", which is already active. Switch one of them off first. The error names it and `automation` is { id, name }. A retry cannot fix this. Recovery: switch that other automation off (conduyt_update_automation isActive false), OR change either workflow so the two no longer enroll the same contacts on that campaign AND PUBLISH that change (conduyt_publish_automation): a v2 workflow's edit stays a draft until it is published, and switching on resumes the PUBLISHED graph, never a draft, so an unpublished edit leaves the ownership unchanged and the same 409 comes back. Workflows that already overlapped before the write are never refused for it, but switching one of them off and on again is a new switch-on and is refused. 409 without a code: the automation's tag or drip campaign changed while it was being saved (the app says: This automation changed while it was being saved (another change moved its tag or drip campaign). Nothing was saved; try again.): read it again and call again. 503 code automation_lock_timeout (Retry-After seconds, retryable): another change in the workspace (such as a tag merge) held a lock this change needs (the enrollment lock wait is bounded at 3 s); nothing was changed, call again after Retry-After.";
13
19
  /** (toggleon58) what isActive does, documented for an agent: the app's switch-on RESUMES the published workflow */
14
- export declare const IS_ACTIVE_DOC = "false switches the automation off (unconditionally; see ifIdle for the conditional switch-off). true switches a PUBLISHED automation back on: send ONLY isActive true (no other field; the API answers 400 automation_activation_alone otherwise, and this tool refuses before sending). It RESUMES what was published (never the draft: to put draft edits live, use conduyt_publish_automation), after the same readiness checks as a publish: 422 automation_not_ready names what blocks it now (for example a step's tag or template deleted since). 400 automation_never_published: it was never published, publish it instead. 403: the key lacks automations.execute. Two different 409s. (a) The workflow changed while it was being switched on (the app says: The workflow changed while it was being switched on. Try again.): read it and call again. (b) Another ACTIVE drip-enrollment workflow owns the same tag and campaign (the app says: an ACTIVE automation '<name>' (<id>) already owns this drip enrollment (same tag + campaign), two live copies would double-fire every enrollment side effect. Deactivate it first, or edit it instead.): a retry cannot fix this. Recovery: switch that other automation off (conduyt_update_automation isActive false), OR change either workflow so the two no longer own the same tag and campaign AND PUBLISH that change (conduyt_publish_automation): a v2 workflow's edit stays a draft until it is published, and switching on resumes the PUBLISHED graph, never a draft, so an unpublished edit leaves the ownership unchanged and the same 409 comes back. Then switch this one on. Already on: success, nothing changed.";
20
+ export declare const IS_ACTIVE_DOC: string;
15
21
  /** GET /automations/:id answers { data: { ...automation, configRevision } } (jsonResponse wraps): the revision lives under `data` */
16
22
  export declare function configRevisionOf(raw: unknown): number | undefined;
17
23
  export declare function registerAutomationTools(server: McpServer, client: ConduytClient): void;
@@ -11,8 +11,14 @@ export const SEND_ONCE_EMAIL_NOTE = " Send once per contact: send_email config {
11
11
  export const AUTOMATION_KEY_REFUSALS_NOTE = " Unknown action keys are refused, never ignored: an action config key the action does not read (a typo such as `laneSoruce`) answers code `unknown_action_config_key` with the node, the key and, when one is close, a suggestion (\"Did you mean `laneSource`?\"); an action `type` no registry entry defines answers `unknown_action_type` (with 'Did you mean' when a registered type is close). Create and update answer 400 (an update that does not write `actions` is never refused for a key stored earlier), conduyt_workflow_validate answers 200 with valid false and the `errors` list (nodeId, field, code, message), and publish / a version restore answer 422 (the preflight refusal wraps `data.message`, `data.errors`, `data.warnings`). Read the suggestion, fix the key and send again; a stored workflow is never refused on read. A trigger condition or trigger node naming a deal MIRROR key (deal.customFields.<key>) answers 422 mirror_not_triggerable (#1292): trigger on the source field's own change (Contact Updated / Company Updated).";
12
12
  /** (idleoff57) the conditional switch-off, documented for an agent; (idleroute58) sent to POST /automations/:id/deactivate-if-idle */
13
13
  export const IF_IDLE_DOC = "Conditional switch-off: send ONLY isActive false with ifIdle true (it is sent to POST /api/v1/automations/:id/deactivate-if-idle, never as a PATCH: an app build without the feature answers 404 there and changes nothing, so an older server can never turn it into an unconditional switch-off; the result's data.isActive is false either way, and an automation that was already off answers the same success). The automation is switched off only if none of its work is in flight (a run that has not finished, a parked step such as a delay / wait / retry, a queued chase, a queued tag or consent hand-off, a contact held at a drip step, a due schedule slot, an event wake, an n8n delivery being retried, an e-mail of the automation that has no outcome yet (a draft, queued, scheduled or sending message)), decided in one transaction that also keeps any new run from starting until the switch-off commits. Nothing in flight: the same result as isActive false alone. 409: in-flight work, or a concurrent change; retry. Either way the API changes NOTHING. With code automation_has_inflight_work it is in-flight work: its inFlight object counts each class, earliestResumeAt is the earliest due time; wait and call again. A 409 without that code is a concurrent change (another change to the automation committed at the same moment): read it again and call again. 503 code automation_lock_timeout (Retry-After seconds): the automation was busy, nothing changed, call again. Without ifIdle, isActive false switches off unconditionally (a parked run is then dropped at its next step).";
14
+ /** (parity60, twinmerge59; app lib/drip-campaign-lock.ts DripEnrollmentTwinError, route.ts and publish/route.ts) the drip-twin 409: its code, the app's wording and the recovery */
15
+ export const ENROLLMENT_TWIN_409_DOC = "409 code automation_would_duplicate_enrollment: the write would make this automation enroll the same contacts as another ACTIVE automation on a drip campaign they did not share before (the same drip campaign, on the same tag or a merged alias of it, or with a trigger that fires for every tag); the app says: This would enroll the same contacts as \"<name>\", which is already active. Switch one of them off first. The error names it and `automation` is { id, name }. A retry cannot fix this. Recovery: switch that other automation off (conduyt_update_automation isActive false), OR change either workflow so the two no longer enroll the same contacts on that campaign AND PUBLISH that change (conduyt_publish_automation): a v2 workflow's edit stays a draft until it is published, and switching on resumes the PUBLISHED graph, never a draft, so an unpublished edit leaves the ownership unchanged and the same 409 comes back. Workflows that already overlapped before the write are never refused for it, but switching one of them off and on again is a new switch-on and is refused";
16
+ /** (parity60, twinmerge59; app lib/automation-inflight.ts AUTOMATION_BUSY_MESSAGE) the retryable lock timeout of any save, publish or switch-on */
17
+ export const AUTOMATION_LOCK_503_DOC = "503 code automation_lock_timeout (Retry-After seconds, retryable): another change in the workspace (such as a tag merge) held a lock this change needs (the enrollment lock wait is bounded at 3 s); nothing was changed, call again after Retry-After";
18
+ /** (parity60) what a SAVE or a PUBLISH that changes what a live drip-enrollment automation enrolls on can answer, besides the key refusals */
19
+ export const AUTOMATION_ENROLLMENT_REFUSALS_NOTE = ` Enrollment refusals: ${ENROLLMENT_TWIN_409_DOC}. 409 without a code: the automation's tag or drip campaign changed while it was being saved (the app says: This automation changed while it was being saved (another change moved its tag or drip campaign). Nothing was saved; try again.): read it again and call again. ${AUTOMATION_LOCK_503_DOC}.`;
14
20
  /** (toggleon58) what isActive does, documented for an agent: the app's switch-on RESUMES the published workflow */
15
- export const IS_ACTIVE_DOC = "false switches the automation off (unconditionally; see ifIdle for the conditional switch-off). true switches a PUBLISHED automation back on: send ONLY isActive true (no other field; the API answers 400 automation_activation_alone otherwise, and this tool refuses before sending). It RESUMES what was published (never the draft: to put draft edits live, use conduyt_publish_automation), after the same readiness checks as a publish: 422 automation_not_ready names what blocks it now (for example a step's tag or template deleted since). 400 automation_never_published: it was never published, publish it instead. 403: the key lacks automations.execute. Two different 409s. (a) The workflow changed while it was being switched on (the app says: The workflow changed while it was being switched on. Try again.): read it and call again. (b) Another ACTIVE drip-enrollment workflow owns the same tag and campaign (the app says: an ACTIVE automation '<name>' (<id>) already owns this drip enrollment (same tag + campaign), two live copies would double-fire every enrollment side effect. Deactivate it first, or edit it instead.): a retry cannot fix this. Recovery: switch that other automation off (conduyt_update_automation isActive false), OR change either workflow so the two no longer own the same tag and campaign AND PUBLISH that change (conduyt_publish_automation): a v2 workflow's edit stays a draft until it is published, and switching on resumes the PUBLISHED graph, never a draft, so an unpublished edit leaves the ownership unchanged and the same 409 comes back. Then switch this one on. Already on: success, nothing changed.";
21
+ export const IS_ACTIVE_DOC = "false switches the automation off (unconditionally; see ifIdle for the conditional switch-off). true switches a PUBLISHED automation back on: send ONLY isActive true (no other field; the API answers 400 automation_activation_alone otherwise, and this tool refuses before sending). It RESUMES what was published (never the draft: to put draft edits live, use conduyt_publish_automation), after the same readiness checks as a publish: 422 automation_not_ready names what blocks it now (for example a step's tag or template deleted since). 400 automation_never_published: it was never published, publish it instead. 403: the key lacks automations.execute. Two different 409s. (a) Without a code: the workflow changed while it was being switched on (the app says: The workflow changed while it was being switched on. Try again.): read it and call again. (b) " + ENROLLMENT_TWIN_409_DOC + ". Then switch this one on. " + AUTOMATION_LOCK_503_DOC + ". Already on: success, nothing changed.";
16
22
  /** GET /automations/:id answers { data: { ...automation, configRevision } } (jsonResponse wraps): the revision lives under `data` */
17
23
  export function configRevisionOf(raw) {
18
24
  const row = raw && typeof raw === "object" && "data" in raw ? raw.data : raw;
@@ -57,7 +63,7 @@ export function registerAutomationTools(server, client) {
57
63
  const result = await client.post("/api/v1/automations", params);
58
64
  return formatResult(result);
59
65
  });
60
- server.tool("conduyt_update_automation", "Update an existing automation — change trigger, actions, schedule, or activation status." + AUTOMATION_KEY_REFUSALS_NOTE + WEBHOOK_NAME_TAG_DOC, {
66
+ server.tool("conduyt_update_automation", "Update an existing automation — change trigger, actions, schedule, or activation status." + AUTOMATION_KEY_REFUSALS_NOTE + AUTOMATION_ENROLLMENT_REFUSALS_NOTE + WEBHOOK_NAME_TAG_DOC, {
61
67
  id: z.string().describe("Automation UUID"),
62
68
  name: z.string().optional().describe("Updated name"),
63
69
  description: z.string().optional().describe("Updated description"),
@@ -104,7 +110,7 @@ export function registerAutomationTools(server, client) {
104
110
  const result = await client.patch(`/api/v1/automations/${id}`, updates);
105
111
  return formatResult(result);
106
112
  });
107
- server.tool("conduyt_publish_automation", "Publish an automation — copies the draft actions to the live published version. The automation must have actions defined. The publish is bound to the draft revision you reviewed (fetched automatically unless you pass expectedConfigRevision)." + AUTOMATION_KEY_REFUSALS_NOTE, {
113
+ server.tool("conduyt_publish_automation", "Publish an automation — copies the draft actions to the live published version. The automation must have actions defined. The publish is bound to the draft revision you reviewed (fetched automatically unless you pass expectedConfigRevision)." + AUTOMATION_KEY_REFUSALS_NOTE + AUTOMATION_ENROLLMENT_REFUSALS_NOTE, {
108
114
  id: z.string().describe("Automation UUID"),
109
115
  expectedConfigRevision: z.number().int().nonnegative().optional().describe("The configRevision of the draft you reviewed (from conduyt_get_automation); fetched automatically when omitted"),
110
116
  }, async ({ id, expectedConfigRevision }) => {
@@ -70,7 +70,9 @@ export function registerBulkTools(server, client) {
70
70
  });
71
71
  server.tool("conduyt_export_deals", "Export deals as JSON (GET /api/v1/deals/export, owner or admin only: otherwise 403) with the board's filters: search, status, pipeline, assigned_to (user UUIDs or `unassigned`, at most 25 distinct owners), tag_ids (tag UUIDs, ANY match, at most 25), contact_timezone, created_after / created_before (YYYY-MM-DD in the account time zone, day-inclusive, or an ISO datetime with offset), value_min / value_max, needsAction, stale, health (one Pipeline health check). Answer: { deals, meta { total, exported_at, filters_applied } }; Secure custom field values are masked. The whole filtered book is read in one request (not streamed): at most 50,000 rows, past that 413 and nothing is exported (narrow the filters); rate limited to 5 exports a minute per workspace and address (429). Each repeated filter is sent as repeated query parameters, never comma-joined; the owner and tag caps are also checked here, before any request. The API judges the query names first (batch33): a name the export does not read is 400 unknown_query_param { message, unknown[], accepted[], didYouMean } (it used to be ignored and the whole book exported) and two different values of format, search, status, pipeline, value_min / minValue, value_max / maxValue, needsAction or stale 400 query_param_conflict { message, param }, both before the numeric codes; this tool sends only accepted names. The deal value bounds are judged too: value_min / minValue and value_max / maxValue that are non-numeric or outside the deal value column range (-9999999999.99..9999999999.99) are 400 invalid_value_min / invalid_value_max { message, param, accepted } (absent or empty = no filter; an alias spelling answers the same code with the sent spelling in param). TIME ZONE (#1312): " + CONTACT_TIMEZONE_NOTE + " The export applies the same rule as conduyt_list_deals." + LIST_USERS_DOC, {
72
72
  search: z.string().optional().describe("Search deal titles"),
73
- status: z.string().optional().describe("Filter by status (open, won, lost)"),
73
+ status: z.string().optional().describe("Filter by status (open, won, lost, or all for every status). open = open WORK: cards in a finished-work stage (isParked) are left out, as on the board"),
74
+ include_parked: z.boolean().optional().describe("(stageparked53) true or false; the API's default is false = open work. With status open: true also returns the cards in a finished-work stage (isParked), i.e. every not-closed record (sent as include_parked=true); use it to find or share a card. Without status open it changes nothing, as in the API (the export route's own default is also false). Alias: includeParked."),
75
+ includeParked: z.boolean().optional().describe("camelCase alias of include_parked."),
74
76
  pipeline: z.string().optional().describe("Filter by pipeline UUID"),
75
77
  contact_timezone: contactTimezoneSchema,
76
78
  ...dealExportFilterShape,
@@ -80,6 +82,10 @@ export function registerBulkTools(server, client) {
80
82
  qp.set("search", params.search);
81
83
  if (params.status)
82
84
  qp.set("status", params.status);
85
+ if (params.include_parked !== undefined && params.includeParked !== undefined && params.include_parked !== params.includeParked)
86
+ throw new Error("Conflicting include_parked values — pass only one.");
87
+ if ((params.include_parked ?? params.includeParked) === true)
88
+ qp.set("include_parked", "true");
83
89
  if (params.pipeline)
84
90
  qp.set("pipeline", params.pipeline);
85
91
  appendContactTimezone(qp, params.contact_timezone);
@@ -96,7 +102,7 @@ export function registerBulkTools(server, client) {
96
102
  industry: z.string().optional().describe("Filter by industry"),
97
103
  ownerId: z.string().uuid().optional().describe("Filter by owner user UUID"),
98
104
  lifecycleStage: z.string().optional().describe("Filter by lifecycle stage"),
99
- hasOpenDeals: z.boolean().optional().describe("true = only companies with an open deal (false sends nothing)"),
105
+ hasOpenDeals: z.boolean().optional().describe("true = only companies with an open-WORK deal (status open, not in a finished-work stage) (false sends nothing)"),
100
106
  ids: z.array(z.string().uuid()).min(1).max(1000).optional().describe("Only these company UUIDs (1 to 1000; omit for no id filter: an empty list is refused, never an unfiltered export)"),
101
107
  }, async (params) => {
102
108
  const qp = new URLSearchParams({ format: "json" });
@@ -1,6 +1,6 @@
1
1
  import { formatResult } from "../client.js";
2
2
  export function registerDashboardTools(server, client) {
3
- server.tool("conduyt_dashboard", "Get a full CRM dashboard summary — pipeline stages with deal values, recent activities, contact/deal/task counts, admin metrics (overdue tasks, stale deals, unassigned items, team workload), billing summary, contacts needing follow-up, and overdue tasks.", {}, async () => {
3
+ server.tool("conduyt_dashboard", "Get a full CRM dashboard summary — pipeline stages with deal values, recent activities, contact/deal/task counts, admin metrics (overdue tasks, stale deals, unassigned items, team workload), billing summary, contacts needing follow-up, and overdue tasks. (batch60, stageparked53) The open counts, the pipeline value, the per-rep workload and the stage breakdown count open WORK: a card in a finished-work stage (isParked, status open) is left out, and the breakdown lists no such stage.", {}, async () => {
4
4
  const result = await client.get("/api/v1/dashboard");
5
5
  return formatResult(result);
6
6
  });
@@ -61,7 +61,7 @@ function boardSnapshotColumns(a, f) {
61
61
  return a.board_columns.map((c) => (c.limit === undefined ? c.stageId : `${c.stageId}:${c.limit}`)).join(",");
62
62
  }
63
63
  export function registerDealTools(server, client) {
64
- strictInput(server.tool("conduyt_list_deals", "List deals with filtering by pipeline, stage, assignee, or status. Returns deal title, value, stage, contact, and dates. Filter by pipeline/stage NAME (the same names you import with) or by UUID — both camelCase (pipelineName) and snake_case (pipeline_name) argument names are accepted. An unknown name returns a clear error, never the whole account. Each deal row carries hasNextStep (boolean: an open task or a booked appointment from a day ago on; the Needs next action rule's own answer) and nextAppointmentAt (ISO string or null; null unless your key can view the calendar, even when hasNextStep is true). PIPELINE HEALTH: pass health_summary=true to get the Pipeline health strip for the same filtered set instead of the deal list: { totalOpenDeals, atRiskValue, checks[] (key, label, severity, color, rule, count, value; the six checks high_value_idle, stale, unassigned, needs_action, missing_close_date, missing_contact, ordered by money at risk), deals }. Add health_check to also get that check's first page of deals (highest value first) as deals: { check, offset, items, hasMore, nextCursor, total }; deals is null without a check. Page with health_cursor (the previous nextCursor, passed back UNCHANGED: an opaque signed token) or health_offset, and health_rows_only=true to get just the page without the summary: the answer is {data:{deals:{check, offset, items, hasMore, nextCursor}}} (the page sits under data.deals). " + HEALTH_ERRORS + " " + BOARD_SNAPSHOT_DOC + " " + BUSY_503_DOC + MIRROR_READ_DOC + " A mirror key is not filterable (422 mirror_not_filterable). The API judges the query NAMES (batch32, #1313): a name GET /deals does not read is 400 unknown_query_param { message, unknown[], accepted[] (every name it reads), didYouMean { name: accepted twin } for the camelCase / snake_case twin of an accepted name } and is never silently ignored (it used to answer the unfiltered list); two different values for a single-value name (status, contact_id, search, stale, needsAction, summary, latest_updated, system_occupancy, sort, order, page, per_page, value_min / minValue, value_max / maxValue) are 400 query_param_conflict { message, param }, an exact repeat is accepted. This tool sends only accepted names (pipeline, pipeline_name, stage, stage_name, assigned_to, status, search, contact_timezone, page, per_page, sort, order, list_order, board_snapshot, board_columns, health_summary, health_check, health_limit, health_offset, health_cursor, health_rows_only), so these two codes mean an older or newer server than this MCP expects; they reach you as `Conduyt API 400: <message>` with the code. The API judges sort and order (batch32): an unknown sort field, or an order other than asc / desc, is 400 sort_invalid { message, param, accepted } (the sent spelling in param) and is never silently replaced by the default order. The deal value bounds are judged too: value_min / minValue and value_max / maxValue that are non-numeric or outside the deal value column range (-9999999999.99..9999999999.99) are 400 invalid_value_min / invalid_value_max { message, param, accepted } (absent or empty = no filter; an alias spelling answers the same code with the sent spelling in param)." + " " + ROLE_COLUMNS_NOTE + " TIME ZONE (#1312): " + CONTACT_TIMEZONE_NOTE + LIST_USERS_DOC, {
64
+ strictInput(server.tool("conduyt_list_deals", "List deals with filtering by pipeline, stage, assignee, or status. Returns deal title, value, stage, contact, and dates. Filter by pipeline/stage NAME (the same names you import with) or by UUID — both camelCase (pipelineName) and snake_case (pipeline_name) argument names are accepted. An unknown name returns a clear error, never the whole account. Each deal row carries hasNextStep (boolean: an open task or a booked appointment from a day ago on; the Needs next action rule's own answer) and nextAppointmentAt (ISO string or null; null unless your key can view the calendar, even when hasNextStep is true). PIPELINE HEALTH: pass health_summary=true to get the Pipeline health strip for the same filtered set instead of the deal list: { totalOpenDeals, atRiskValue, checks[] (key, label, severity, color, rule, count, value; the six checks high_value_idle, stale, unassigned, needs_action, missing_close_date, missing_contact, ordered by money at risk), deals }. Add health_check to also get that check's first page of deals (highest value first) as deals: { check, offset, items, hasMore, nextCursor, total }; deals is null without a check. Page with health_cursor (the previous nextCursor, passed back UNCHANGED: an opaque signed token) or health_offset, and health_rows_only=true to get just the page without the summary: the answer is {data:{deals:{check, offset, items, hasMore, nextCursor}}} (the page sits under data.deals). " + HEALTH_ERRORS + " " + BOARD_SNAPSHOT_DOC + " " + BUSY_503_DOC + MIRROR_READ_DOC + " A mirror key is not filterable (422 mirror_not_filterable). The API judges the query NAMES (batch32, #1313): a name GET /deals does not read is 400 unknown_query_param { message, unknown[], accepted[] (every name it reads), didYouMean { name: accepted twin } for the camelCase / snake_case twin of an accepted name } and is never silently ignored (it used to answer the unfiltered list); two different values for a single-value name (status, contact_id, search, stale, needsAction, summary, latest_updated, system_occupancy, sort, order, page, per_page, value_min / minValue, value_max / maxValue) are 400 query_param_conflict { message, param }, an exact repeat is accepted. This tool sends only accepted names (pipeline, pipeline_name, stage, stage_name, assigned_to, status, include_parked, search, contact_timezone, view_id, page, per_page, sort, order, list_order, board_snapshot, board_columns, health_summary, health_check, health_limit, health_offset, health_cursor, health_rows_only), so these two codes mean an older or newer server than this MCP expects; they reach you as `Conduyt API 400: <message>` with the code. The API judges sort and order (batch32): an unknown sort field, or an order other than asc / desc, is 400 sort_invalid { message, param, accepted } (the sent spelling in param) and is never silently replaced by the default order. The deal value bounds are judged too: value_min / minValue and value_max / maxValue that are non-numeric or outside the deal value column range (-9999999999.99..9999999999.99) are 400 invalid_value_min / invalid_value_max { message, param, accepted } (absent or empty = no filter; an alias spelling answers the same code with the sent spelling in param)." + " " + ROLE_COLUMNS_NOTE + " TIME ZONE (#1312): " + CONTACT_TIMEZONE_NOTE + LIST_USERS_DOC, {
65
65
  pipeline: z.string().optional().describe("Filter by pipeline UUID (canonical). Aliases: pipelineId, pipeline_id."),
66
66
  pipelineId: z.string().optional().describe("Filter by pipeline UUID (alias of pipeline)."),
67
67
  pipeline_id: z.string().optional().describe("snake_case alias of pipelineId."),
@@ -73,7 +73,9 @@ export function registerDealTools(server, client) {
73
73
  stageName: z.string().optional().describe("Filter by stage NAME within the pipeline — resolved to its UUID; errors if not found. Alias: stage_name."),
74
74
  stage_name: z.string().optional().describe("snake_case alias of stageName."),
75
75
  assignedTo: z.string().optional().describe("Filter by assigned user UUID"),
76
- status: z.enum(["open", "won", "lost"]).optional().describe("Filter by deal status"),
76
+ status: z.enum(["open", "won", "lost", "all"]).optional().describe("Filter by deal status. open = open WORK: a card in a finished-work stage (a stage with isParked, e.g. 'Handed Off') keeps status open but is NOT returned for open. all = every status (the same as omitting it). To read a rep's finished-work cards: stage=<that stage's id>, status all (or omitted), assignedTo=<rep>."),
77
+ include_parked: z.boolean().optional().describe("(stageparked53) true or false; the API's default is false = open work. With status open: true also returns the cards in a finished-work stage (isParked), i.e. every not-closed record (sent as include_parked=true); use it to find or share a card. Without status open it changes nothing, as in the API. Alias: includeParked."),
78
+ includeParked: z.boolean().optional().describe("camelCase alias of include_parked."),
77
79
  search: z.string().optional().describe("Search deal titles"),
78
80
  contact_timezone: contactTimezoneSchema,
79
81
  view_id: z.string().optional().describe("Apply this SAVED DEAL VIEW (a UUID from conduyt_list_deal_views; sent as view_id, the canonical name in the OpenAPI, which also documents the alias viewId): the list is the set the view defines, ANDed with every other filter given here (the API combines them; nothing is resolved by this tool). 404 when the view does not exist, is disabled or is not visible to you; 422 when its stored rules are invalid or unsupported; 400 for a blank or non-UUID id (forwarded as given). Works with health_summary and board_snapshot too."),
@@ -115,6 +117,13 @@ export function registerDealTools(server, client) {
115
117
  // prefer a non-blank original; else keep a blank so the server can reject it
116
118
  return present.find((v) => v.trim() !== "") ?? present[0];
117
119
  };
120
+ // include_parked is a boolean alias pair: two different values are a contradictory request, refused before any request
121
+ const coalesceBool = (label, ...vals) => {
122
+ const present = vals.filter((v) => v !== undefined);
123
+ if (new Set(present).size > 1)
124
+ throw new Error(`Conflicting ${label} values — pass only one.`);
125
+ return present[0];
126
+ };
118
127
  const { assignedTo, status, search, page, per_page } = a;
119
128
  const pipelineV = coalesce("pipeline id", a.pipeline, a.pipelineId, a.pipeline_id);
120
129
  const pipelineNameV = coalesce("pipeline name", a.pipelineName, a.pipeline_name);
@@ -133,6 +142,9 @@ export function registerDealTools(server, client) {
133
142
  params.set("assigned_to", assignedTo);
134
143
  if (status)
135
144
  params.set("status", status);
145
+ const includeParkedV = coalesceBool("include_parked", a.include_parked, a.includeParked);
146
+ if (includeParkedV === true)
147
+ params.set("include_parked", "true");
136
148
  if (search)
137
149
  params.set("search", search);
138
150
  appendContactTimezone(params, a.contact_timezone);
@@ -196,7 +208,7 @@ export function registerDealTools(server, client) {
196
208
  const result = qs ? await client.get("/api/v1/deals/inspection?" + qs) : await client.get("/api/v1/deals/inspection");
197
209
  return formatResult(result);
198
210
  }));
199
- strictInput(server.tool("conduyt_get_deals_forecast", "Weighted pipeline value and the probability forecast (GET /api/v1/deals/forecast): per pipeline and stage, the year's monthly open and won values, win rate. Needs deals.view (an API key needs the deals scope) and a Professional-or-above plan: a lower plan, a free trial included, is 403 code plan_required; an account whose billing is not active is 402. `pipeline` limits it to one pipeline (a UUID that is not one is 400; a hidden or unknown one is 404 Pipeline not found); omit it for every visible active pipeline. The API judges the query names: a name the route does not read is 400 unknown_query_param { message, unknown[], accepted[], didYouMean } (it used to be ignored and every pipeline was forecast); this tool sends only `pipeline`. Read-only.", {
211
+ strictInput(server.tool("conduyt_get_deals_forecast", "Weighted pipeline value and the probability forecast (GET /api/v1/deals/forecast): per pipeline and stage, the year's monthly open and won values, win rate. Needs deals.view (an API key needs the deals scope) and a Professional-or-above plan: a lower plan, a free trial included, is 403 code plan_required; an account whose billing is not active is 402. `pipeline` limits it to one pipeline (a UUID that is not one is 400; a hidden or unknown one is 404 Pipeline not found); omit it for every visible active pipeline. The API judges the query names: a name the route does not read is 400 unknown_query_param { message, unknown[], accepted[], didYouMean } (it used to be ignored and every pipeline was forecast); this tool sends only `pipeline`. (batch60, stageparked53) A finished-work stage (isParked) is not open work: it has no row in the stage breakdown and its cards are not in the totals or the weighted value (the answer's stage rows carry no isParked field); it still counts as a rung of the default probability ladder, so flagging a stage never renumbers the other stages' probabilities. Read-only.", {
200
212
  pipeline: z.string().uuid().optional().describe("Pipeline UUID; omit for every visible active pipeline."),
201
213
  }, async ({ pipeline }) => {
202
214
  // literal paths on purpose: the coverage scanner reads the first string after client.get(
@@ -242,7 +254,7 @@ export function registerDealTools(server, client) {
242
254
  const result = await client.post("/api/v1/tasks", { checkOrigin, dealId, expectedDealUpdatedAt, title, description, dueDate, priority, status, assignedTo, contactId }, idempotencyKey !== undefined ? { headers: { "Idempotency-Key": idempotencyKey } } : undefined);
243
255
  return formatResult(result);
244
256
  }));
245
- server.tool("conduyt_get_deal", "Get a single deal with full details — value, currency, probability, stage, contact, expected close date, custom-field values, activities, tasks, and history. Use this to read structured custom-field data back out of a deal (e.g. for a P&L or balance-sheet model). Deal rows also carry hasNextStep and nextAppointmentAt (null unless your key can view the calendar) when the API returns them." + MIRROR_READ_DOC + " " + USER_FIELD_READ_DOC, {
257
+ server.tool("conduyt_get_deal", "Get a single deal with full details — value, currency, probability, stage, contact, expected close date, custom-field values, activities, tasks, and history. Use this to read structured custom-field data back out of a deal (e.g. for a P&L or balance-sheet model). Deal rows also carry hasNextStep and nextAppointmentAt (null unless your key can view the calendar) when the API returns them. Every deal answer (list rows, get, create, update) carries stage.isParked: true = the card sits in a finished-work stage (done work, status open, in no open-work count)." + MIRROR_READ_DOC + " " + USER_FIELD_READ_DOC, {
246
258
  id: z.string().describe("Deal UUID"),
247
259
  }, async ({ id }) => {
248
260
  const result = await client.get(`/api/v1/deals/${id}`);
@@ -9,7 +9,7 @@ export const ARCHIVE_ERROR_CODES = "A refusal carries a machine-readable code in
9
9
  /** above the archive route's 60 s transaction (up to 500 deal moves) plus post-commit events; the client default is 30 s */
10
10
  export const ARCHIVE_PIPELINE_TIMEOUT_MS = 75_000;
11
11
  export function registerPipelineTools(server, client) {
12
- server.tool("conduyt_list_pipelines", "List all active sales pipelines with their stages (soft-deleted stages are never included). Use this to discover pipeline and stage UUIDs before creating or moving deals. Each stage carries entryByAutomationOnly (boolean; true = only an automation can move or create a deal INTO it, every other entry is refused 422 stage_automation_only; set it with conduyt_set_stage_rules). Each pipeline carries color (one of the 10 palette hex colours, or null until the settings page saves one), automationOnly and sortOrder (the board-menu order); an archived pipeline's pre-archive name is archivedFromName (see conduyt_list_archived_pipelines).", {}, async () => {
12
+ server.tool("conduyt_list_pipelines", "List all active sales pipelines with their stages (soft-deleted stages are never included). Use this to discover pipeline and stage UUIDs before creating or moving deals. Each stage carries isParked (boolean; true = a finished-work stage: its cards stay open records but are not open work; set it with conduyt_update_stage) and entryByAutomationOnly (boolean; true = only an automation can move or create a deal INTO it, every other entry is refused 422 stage_automation_only; set it with conduyt_set_stage_rules). Each pipeline carries color (one of the 10 palette hex colours, or null until the settings page saves one), automationOnly and sortOrder (the board-menu order); an archived pipeline's pre-archive name is archivedFromName (see conduyt_list_archived_pipelines).", {}, async () => {
13
13
  const result = await client.get("/api/v1/pipelines");
14
14
  return formatResult(result);
15
15
  });
@@ -30,6 +30,7 @@ export function registerPipelineTools(server, client) {
30
30
  isWon: z.boolean().optional().describe("Marks this as a won/closed-won stage"),
31
31
  isLost: z.boolean().optional().describe("Marks this as a lost/dead stage"),
32
32
  isSystem: z.boolean().optional().describe("A system holding stage (automation bridges route deals through it): hidden from the stage pickers reps use, still visible to automations"),
33
+ isParked: z.boolean().optional().describe("A finished-work stage (e.g. \"Handed Off\"): its cards keep status open (no Won / Lost side effects) and stay on the board with their own column count, but are not open work: not in open totals, ?status=open, stale / needs-next-action / pipeline health, aging, dashboard workload or the forecast. Never on a Won or Lost stage (400)."),
33
34
  }))
34
35
  .optional()
35
36
  .describe("Ordered list of stages to create with the pipeline. A stage cannot be both isWon and isLost."),
@@ -112,17 +113,19 @@ export function registerPipelineTools(server, client) {
112
113
  isWon: z.boolean().optional().describe("Marks this as a won stage"),
113
114
  isLost: z.boolean().optional().describe("Marks this as a lost/dead stage"),
114
115
  isSystem: z.boolean().optional().describe("A system holding stage (automation bridges route deals through it): hidden from the stage pickers reps use, still visible to automations"),
115
- }, async ({ pipelineId, name, color, isWon, isLost, isSystem }) => {
116
+ isParked: z.boolean().optional().describe("A finished-work stage (e.g. \"Handed Off\"): its cards keep status open (no Won / Lost side effects) and stay on the board with their own column count, but are not open work: not in open totals, ?status=open, stale / needs-next-action / pipeline health, aging, dashboard workload or the forecast. Never on a Won or Lost stage (400)."),
117
+ }, async ({ pipelineId, name, color, isWon, isLost, isSystem, isParked }) => {
116
118
  const result = await client.post(`/api/v1/pipelines/${pipelineId}/stages`, {
117
119
  name,
118
120
  color,
119
121
  isWon,
120
122
  isLost,
121
123
  isSystem,
124
+ isParked,
122
125
  });
123
126
  return formatResult(result);
124
127
  });
125
- server.tool("conduyt_update_stage", "Update a stage within a pipeline — rename, recolor, reorder (sortOrder), or change its won/lost/system flags. A soft-deleted stage (conduyt_delete_stage) answers 404. The \"Entry by automation only\" flag is not set here (the API reads it from the stage rules): use conduyt_set_stage_rules; conduyt_list_pipelines shows it as entryByAutomationOnly on each stage.", {
128
+ server.tool("conduyt_update_stage", "Update a stage within a pipeline — rename, recolor, reorder (sortOrder), or change its won/lost/system/finished-work (isParked) flags. A soft-deleted stage (conduyt_delete_stage) answers 404. The \"Entry by automation only\" flag is not set here (the API reads it from the stage rules): use conduyt_set_stage_rules; conduyt_list_pipelines shows it as entryByAutomationOnly on each stage.", {
126
129
  pipelineId: z.string().describe("Pipeline UUID"),
127
130
  stageId: z.string().describe("Stage UUID to update"),
128
131
  name: z.string().optional().describe("Updated stage name"),
@@ -131,6 +134,7 @@ export function registerPipelineTools(server, client) {
131
134
  isWon: z.boolean().optional().describe("Updated won flag"),
132
135
  isLost: z.boolean().optional().describe("Updated lost flag"),
133
136
  isSystem: z.boolean().optional().describe("Updated system flag: true hides the stage from rep-facing stage pickers (automation holding stage)"),
137
+ isParked: z.boolean().optional().describe("Updated finished-work flag. A finished-work stage (e.g. \"Handed Off\"): its cards keep status open (no Won / Lost side effects) and stay on the board with their own column count, but are not open work: not in open totals, ?status=open, stale / needs-next-action / pipeline health, aging, dashboard workload or the forecast. Never on a Won or Lost stage (400). To turn a finished-work stage Won or Lost, send isParked: false in the same call."),
134
138
  }, async ({ pipelineId, stageId, ...updates }) => {
135
139
  const result = await client.patch(`/api/v1/pipelines/${pipelineId}/stages/${stageId}`, updates);
136
140
  return formatResult(result);
@@ -1,3 +1,5 @@
1
1
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
2
  import { ConduytClient } from "../client.js";
3
+ /** (toggleon58 r3) what a merge does and the 409s it can answer (app POST /api/v1/tags/merge) */
4
+ export declare const MERGE_TAGS_DOC = "Merge two tags: moves every contact, deal and company from the source tag to the target and rewrites every reference to the source (automations, lists, views); the source stays as an alias of the target. Useful for deduplicating tags. Refused with NOTHING changed: 409 tag_merge_would_duplicate_enrollment when the merge would make two ACTIVE automations enroll the same contacts (the same drip campaign, on the same tag after the merge, or with a trigger that fires for every tag): the error names both, `automations` lists them; switch one off, then merge (an inactive duplicate is fine; two that already overlapped before the merge do not refuse it). 409 tag_merge_automations_changed: automations using these tags changed during the merge; nothing was merged, call again. 409 without a code, nothing changed (app/api/v1/tags/merge/route.ts): the source tag was already merged (list the tags again); the target tag was merged into another tag (merge into that tag instead); or an import side effect, or automation / outbox / drip work naming the tag, is running right now (the app says: ... retry the merge once they settle): wait, then call again.";
3
5
  export declare function registerTagTools(server: McpServer, client: ConduytClient): void;
@@ -1,5 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { formatResult } from "../client.js";
3
+ /** (toggleon58 r3) what a merge does and the 409s it can answer (app POST /api/v1/tags/merge) */
4
+ export const MERGE_TAGS_DOC = "Merge two tags: moves every contact, deal and company from the source tag to the target and rewrites every reference to the source (automations, lists, views); the source stays as an alias of the target. Useful for deduplicating tags. Refused with NOTHING changed: 409 tag_merge_would_duplicate_enrollment when the merge would make two ACTIVE automations enroll the same contacts (the same drip campaign, on the same tag after the merge, or with a trigger that fires for every tag): the error names both, `automations` lists them; switch one off, then merge (an inactive duplicate is fine; two that already overlapped before the merge do not refuse it). 409 tag_merge_automations_changed: automations using these tags changed during the merge; nothing was merged, call again. 409 without a code, nothing changed (app/api/v1/tags/merge/route.ts): the source tag was already merged (list the tags again); the target tag was merged into another tag (merge into that tag instead); or an import side effect, or automation / outbox / drip work naming the tag, is running right now (the app says: ... retry the merge once they settle): wait, then call again.";
3
5
  export function registerTagTools(server, client) {
4
6
  server.tool("conduyt_list_tags", "List all tags in the account with contact counts. Use this to discover tag names and IDs.", {
5
7
  page: z.number().optional().describe("Page number (default 1)"),
@@ -34,8 +36,8 @@ export function registerTagTools(server, client) {
34
36
  const result = await client.del(`/api/v1/tags/${id}`);
35
37
  return formatResult(result);
36
38
  });
37
- server.tool("conduyt_merge_tags", "Merge two tags — moves all contacts from source tag to target tag, then deletes the source. Useful for deduplicating tags.", {
38
- sourceTagId: z.string().describe("Tag UUID to merge FROM (will be deleted)"),
39
+ server.tool("conduyt_merge_tags", MERGE_TAGS_DOC, {
40
+ sourceTagId: z.string().describe("Tag UUID to merge FROM (it becomes an alias of the target)"),
39
41
  targetTagId: z.string().describe("Tag UUID to merge INTO (will be kept)"),
40
42
  }, async (params) => {
41
43
  const result = await client.post("/api/v1/tags/merge", params);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conduyt-mcp",
3
- "version": "4.105.39",
3
+ "version": "4.105.40",
4
4
  "mcpName": "com.conduyt/mcp",
5
5
  "description": "MCP server for Conduyt CRM — expose CRM operations as AI-accessible tools",
6
6
  "type": "module",
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-11-22T21:26:10.104Z",
2
+ "generatedAt": "2026-11-22T21:49:11.441Z",
3
3
  "toolCount": 452,
4
4
  "totalEndpoints": 1229,
5
5
  "counts": {