conduyt-mcp 4.110.0 → 4.111.0

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.
package/README.md CHANGED
@@ -237,6 +237,11 @@ Text it is `conduyt_send_sms` with `invoiceId` (and `resend`).
237
237
  | `conduyt_create_status_metadata` | Create a row (`stageId`, `code`, `bucket` slugs, `lifecycleStage`, drip fields, `isTerminal`, `notes`) |
238
238
  | `conduyt_update_status_metadata` | Update a row; `expectedUpdatedAt` refuses a row changed or moved since (409 `metadata_changed` with the current row); 404 `status_metadata_not_found` |
239
239
  | `conduyt_delete_status_metadata` | Delete a row (`expectedUpdatedAt` as above) |
240
+ | `conduyt_list_drip_tracks` / `conduyt_get_drip_track` | Read the drip tracks (the sequences status metadata names by `dripTrackId`) with their steps |
241
+ | `conduyt_create_drip_track` / `conduyt_update_drip_track` / `conduyt_delete_drip_track` | Manage a track (`name` slug, `label`, `channel`, `complianceProfile`, `steps`, `exitConditions`, `reEntryAllowed`, `isActive`); a delete clears the track from the status metadata rows that named it |
242
+ | `conduyt_list_booking_routing_forms` / `conduyt_get_booking_routing_form` / `conduyt_create_booking_routing_form` / `conduyt_update_booking_routing_form` / `conduyt_delete_booking_routing_form` | Booking routing forms (the questions a visitor answers before a booking page); reads need calendar:view, writes an owner / admin key; a passed `steps` list replaces the stored one |
243
+ | `conduyt_list_automation_folders` / `conduyt_create_automation_folder` / `conduyt_update_automation_folder` / `conduyt_delete_automation_folder` | Automation folders (name 1-80, `colorIndex` 0-5, 50 per account); a delete returns the folder's automations to Unfiled, never deletes them |
244
+ | `conduyt_import_drip_track_steps` | Replace the step list of up to 200 tracks by `trackName` (owner / admin key); read `errors[]` even on a 200 |
240
245
  | `conduyt_import_status_metadata` | Set-based import (max 1000; `merge` or `replace`); read `errors[]` even on a 200; 409 `pipeline_archived` when an item names a stage of an archived pipeline |
241
246
 
242
247
  ### Mailchimp (API key scope `integrations`)
@@ -28,6 +28,9 @@ import { registerCalendlyTools } from "./tools/calendly.js";
28
28
  import { registerBoardSettingsTools } from "./tools/board-settings.js";
29
29
  import { registerMailchimpTools } from "./tools/mailchimp.js";
30
30
  import { registerStatusMetadataTools } from "./tools/status-metadata.js";
31
+ import { registerDripTrackTools } from "./tools/drip-tracks.js";
32
+ import { registerBookingRoutingFormTools } from "./tools/booking-routing-forms.js";
33
+ import { registerAutomationFolderTools } from "./tools/automation-folders.js";
31
34
  import { registerNotificationTools } from "./tools/notifications.js";
32
35
  import { registerChatTools } from "./tools/chat.js";
33
36
  import { registerAiTeammateConnectTools } from "./tools/ai-teammate-connect.js";
@@ -100,6 +103,9 @@ export function registerAllTools(server, client) {
100
103
  registerBoardSettingsTools(server, client);
101
104
  registerMailchimpTools(server, client);
102
105
  registerStatusMetadataTools(server, client);
106
+ registerDripTrackTools(server, client);
107
+ registerBookingRoutingFormTools(server, client);
108
+ registerAutomationFolderTools(server, client);
103
109
  registerNotificationTools(server, client);
104
110
  registerChatTools(server, client);
105
111
  registerAiTeammateConnectTools(server, client);
@@ -124,6 +124,7 @@ export const TOOL_ANNOTATIONS = {
124
124
  conduyt_search_dialer_history: ro("Search Dialer History"),
125
125
  conduyt_search_dialer_calls: ro("Search Dialer Calls"),
126
126
  conduyt_count_unknown_callers: ro("Count Unknown Callers"),
127
+ conduyt_list_lead_rings: ro("List Lead Rings"),
127
128
  conduyt_link_call: update("Link Call"),
128
129
  conduyt_get_call: ro("Get Call"),
129
130
  conduyt_get_post_call_insight: ro("Get Post Call Insight"),
@@ -244,6 +245,21 @@ export const TOOL_ANNOTATIONS = {
244
245
  conduyt_update_status_metadata: row("Update Status Metadata", false, false, false), // every successful write advances the concurrency version (status-metadata/[id]/route.ts:201)
245
246
  conduyt_delete_status_metadata: destroy("Delete Status Metadata"),
246
247
  conduyt_import_status_metadata: row("Import Status Metadata", false, true, false), // replace mode deletes and recreates rows with new ids; merge mode advances updatedAt (the concurrency version) on every call
248
+ conduyt_list_drip_tracks: ro("List Drip Tracks"),
249
+ conduyt_get_drip_track: ro("Get Drip Track"),
250
+ conduyt_create_drip_track: create("Create Drip Track"),
251
+ conduyt_update_drip_track: row("Update Drip Track", false, true, false), // a steps list REPLACES the stored one ({ steps: [] } erases every step) and every successful call appends an audit row
252
+ conduyt_delete_drip_track: destroy("Delete Drip Track"), // clears dripTrackId on the status metadata rows that named it
253
+ conduyt_import_drip_track_steps: row("Import Drip Track Steps", false, true, false), // replaces each named track's whole step list; every call appends a steps_imported audit row
254
+ conduyt_list_booking_routing_forms: ro("List Booking Routing Forms"),
255
+ conduyt_get_booking_routing_form: ro("Get Booking Routing Form"),
256
+ conduyt_create_booking_routing_form: create("Create Booking Routing Form"),
257
+ conduyt_update_booking_routing_form: row("Update Booking Routing Form", false, true, false), // a steps list REPLACES the stored questions ({ steps: [] } erases them) and every successful call appends an audit row
258
+ conduyt_delete_booking_routing_form: destroy("Delete Booking Routing Form"), // the form's public link stops working
259
+ conduyt_list_automation_folders: ro("List Automation Folders"),
260
+ conduyt_create_automation_folder: create("Create Automation Folder"),
261
+ conduyt_update_automation_folder: row("Update Automation Folder", false, false, false), // every successful call writes again and appends an audit row
262
+ conduyt_delete_automation_folder: destroy("Delete Automation Folder"), // never deletes an automation: they return to Unfiled
247
263
  conduyt_list_notifications: ro("List Notifications"),
248
264
  conduyt_create_notification: create("Create Notification"),
249
265
  conduyt_list_chat_channels: update("List Chat Channels"),
@@ -0,0 +1,11 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { ConduytClient } from "../client.js";
3
+ /**
4
+ * Automation folders (app: /api/v1/automation-folders): the named, coloured folders the Automations list groups workflows in.
5
+ * Reads need automations:view, create automations:create, rename / recolor / delete automations:edit (a key restricted to
6
+ * some pipelines cannot write: 403). A folder holds no data of its own: deleting one never deletes an automation.
7
+ */
8
+ export declare const AUTOMATION_FOLDER_MAX_NAME = 80;
9
+ export declare const AUTOMATION_FOLDER_COLORS = 6;
10
+ export declare const AUTOMATION_FOLDER_MAX = 50;
11
+ export declare function registerAutomationFolderTools(server: McpServer, client: ConduytClient): void;
@@ -0,0 +1,27 @@
1
+ import { z } from "zod";
2
+ import { formatResult } from "../client.js";
3
+ import { strictInput } from "./strict.js";
4
+ /**
5
+ * Automation folders (app: /api/v1/automation-folders): the named, coloured folders the Automations list groups workflows in.
6
+ * Reads need automations:view, create automations:create, rename / recolor / delete automations:edit (a key restricted to
7
+ * some pipelines cannot write: 403). A folder holds no data of its own: deleting one never deletes an automation.
8
+ */
9
+ export const AUTOMATION_FOLDER_MAX_NAME = 80;
10
+ export const AUTOMATION_FOLDER_COLORS = 6;
11
+ export const AUTOMATION_FOLDER_MAX = 50;
12
+ const FOLDER_ERRORS = "Refusals are the server's: 400 for a name that is empty or over 80 characters, a colorIndex outside 0-5, nothing to update, or the 50-folder cap; 403 for a key restricted to some pipelines; 404 'Folder not found'.";
13
+ export function registerAutomationFolderTools(server, client) {
14
+ strictInput(server.tool("conduyt_list_automation_folders", "List the account's automation folders (GET /api/v1/automation-folders; automations:view), oldest first, each { id, name, colorIndex, automationCount, createdAt, updatedAt }. automationCount leaves out deleted automations.", {}, async () => formatResult(await client.get("/api/v1/automation-folders"))));
15
+ strictInput(server.tool("conduyt_create_automation_folder", "Create an automation folder (POST /api/v1/automation-folders; automations:create, active billing). name is 1-80 characters; colorIndex (integer 0-5) defaults to the next colour in turn. At most 50 folders per account. " + FOLDER_ERRORS, {
16
+ name: z.string().trim().min(1).max(AUTOMATION_FOLDER_MAX_NAME).describe("Folder name, 1-80 characters"),
17
+ colorIndex: z.number().int().min(0).max(AUTOMATION_FOLDER_COLORS - 1).optional().describe("Colour index 0-5"),
18
+ }, async ({ name, colorIndex }) => formatResult(await client.post("/api/v1/automation-folders", { name, colorIndex }))));
19
+ strictInput(server.tool("conduyt_update_automation_folder", "Rename and / or recolor an automation folder (PATCH /api/v1/automation-folders/{id}; automations:edit, active billing). Send name and / or colorIndex; neither is a 400. " + FOLDER_ERRORS, {
20
+ id: z.string().uuid().describe("Folder UUID"),
21
+ name: z.string().trim().min(1).max(AUTOMATION_FOLDER_MAX_NAME).optional().describe("New name, 1-80 characters"),
22
+ colorIndex: z.number().int().min(0).max(AUTOMATION_FOLDER_COLORS - 1).optional().describe("New colour index 0-5"),
23
+ }, async ({ id, name, colorIndex }) => formatResult(await client.patch(`/api/v1/automation-folders/${id}`, { name, colorIndex }))));
24
+ strictInput(server.tool("conduyt_delete_automation_folder", "Delete an automation folder (DELETE /api/v1/automation-folders/{id}; automations:edit, not gated by billing). The folder's automations are NEVER deleted: they return to Unfiled. Answers { id, deleted: true, automationsUnfiled }. " + FOLDER_ERRORS, {
25
+ id: z.string().uuid().describe("Folder UUID"),
26
+ }, async ({ id }) => formatResult(await client.del(`/api/v1/automation-folders/${id}`))));
27
+ }
@@ -11,7 +11,7 @@ export const SEND_ONCE_EMAIL_NOTE = " Send once per contact: send_email config {
11
11
  /** (parity64, app batonaudit64, live OpenAPI POST /automations/{id}/publish) publish judges a baton step's configured stages by the rule the run applies */
12
12
  export const BATON_STAGE_REFUSED_NOTE = " Publish checks a baton step's configured stages by the rule the run applies (app batonaudit64): a handoff_and_keep stageId that is a Won, Lost, holding or finished-work stage, or a handoff_and_keep or credit_baton_source parkedStageId that is a Won, Lost or holding stage or one without Finished work, is a publish ERROR with code baton_stage_refused (422; the key in `field`, naming the stage and the reason, in data.errors), unless that same setting (the same step, the same action, the same stage) was already live in the published graph: then it is a WARNING with the same code (in data.warnings), so the automation stays editable.";
13
13
  /** (handoffkeep55, app) the baton hand-off actions; the catalog does not carry action config */
14
- export const BATON_HANDOFF_ACTIONS_NOTE = " Baton hand-off (app handoffkeep55): handoff_and_keep config {pipelineId (required, the receiver's pipeline), stageId, assignedTo (required, the receiver: a user id or one merge field naming a user on the trigger, such as {{trigger.userId}} or {{trigger.assignedTo}}; it must render to an active member who can see the receiver's pipeline, never the card's own owner, else the step is refused with a review task), parkedStageId (required, a finished-work stage (isParked) of the run's card's OWN pipeline), destinationEntryAutomations (fire default | suppress), copyNotes, listDocuments, source}: opens a NEW card for the receiver and, in the same transaction, credits the run's card: it moves to parkedStageId with status still OPEN (never Won: no deal.won, no Hyros sale, no #wins post, no master status change, no Post-Close card) and gets a write-once receipt (deal fields handedOffAt = the credit date, handedOffToDealId, handedOffByExecutionId); a card already handed off answers skipped already_handed_off; a Won, Lost or holding stage anywhere, a finished-work stage as the receiver's stage or as the card's current stage, the receiver being the owner (same_person) or a Post-Close target or source is refused; a later webhook step reads the receiver's card as {{deal.handed_off_to_deal_id}}. credit_baton_source config {sourcePipelineId (required), parkedStageId (required), matchField and/or leadIdField (existing deal custom fields both cards carry), ownerField (an existing user or text deal field; a missing or wrong-type field blocks publish and fails the run visibly with field_missing / field_wrong_type and a review task), lookbackDays (1-90, default 30), windowMinutes (5-1440, default 120), reviewerIds}: on a receiver's card a form created, credits the ONE earlier open card of the same contact in sourcePipelineId (same receipt, same stage rule); none = nothing, two or more = no credit and a review task (default reviewers: owners and admins); decided once per card (deal fields batonResolution bound | none | ambiguous, batonBoundDealId); it refuses (too_early) until windowMinutes after the card was created, so put a delay before it." + BATON_STAGE_REFUSED_NOTE;
14
+ export const BATON_HANDOFF_ACTIONS_NOTE = " Baton hand-off (app handoffkeep55): handoff_and_keep config {pipelineId (required, the receiver's pipeline), stageId, assignedTo (required, the receiver: a user id or one merge field naming a user on the trigger, such as {{trigger.userId}} or {{trigger.assignedTo}}; it must render to an active member who can see the receiver's pipeline, never the card's own owner, else the step is refused with a review task), parkedStageId (required, a finished-work stage (isParked) of the run's card's OWN pipeline), destinationEntryAutomations (fire default | suppress), copyNotes, listDocuments, source}: opens a NEW card for the receiver and, in the same transaction, credits the run's card: it moves to parkedStageId with status still OPEN (never Won: no deal.won, no Hyros sale, no #wins post, no master status change, no Post-Close card) and gets a write-once receipt (deal fields handedOffAt = the credit date, handedOffToDealId, handedOffByExecutionId); a card already handed off answers skipped already_handed_off; a Won, Lost or holding stage anywhere, a finished-work stage as the receiver's stage or as the card's current stage, the receiver being the owner (same_person) or a Post-Close target or source is refused; a later webhook step reads the receiver's card as {{deal.handed_off_to_deal_id}}. credit_baton_source config {sourcePipelineId (required), parkedStageId (required), matchField and/or leadIdField (existing deal custom fields both cards carry), ownerField (an existing user or text deal field; a missing or wrong-type field blocks publish and fails the run visibly with field_missing / field_wrong_type and a review task), lookbackDays (1-90, default 30), windowMinutes (5-1440, default 120), reviewerIds}: on a receiver's card a form created, credits the ONE earlier open card of the same contact in sourcePipelineId (same receipt, same stage rule); none = nothing, two or more = no credit and a review task (default reviewers: owners and admins); decided once per card (deal fields batonResolution bound | none | ambiguous, batonBoundDealId); it refuses (too_early) until windowMinutes after the card was created, so put a delay before it. Hand Off Deal, the two-card hand-off (app handoff_deal): handoff_deal config {pipelineId (required, the target pipeline), stageId (default the target pipeline's first stage), assignedTo (a user id of an active member: the new card is assigned to them, and the step is refused when they are not one; blank = the new card is unassigned unless keepSourceOwner is true; a hand-off into the workspace's Post-Close pipeline ignores it: that card takes the originating card's owner, or is unassigned when that card has no owner or its owner is no longer an active member; whether the target is the Post-Close pipeline is read from the workspace settings when the step starts, so a settings change in that moment can apply the other rule to that one card), keepSourceOwner (true gives the new card the source card's owner as it is when the card is created, or leaves it unassigned when that card has no owner or its owner is no longer an active member; used only when assignedTo is blank and the target is not the Post-Close pipeline; default false), copyNotes (default true), listDocuments (default true), source (default the current card's source, else the contact's source, else \"Unknown (created via deal hand-off)\")}: opens a NEW card for the contact in another pipeline and the current card keeps its own outcome (unlike handoff_and_keep it is not moved to a finished-work stage)." + BATON_STAGE_REFUSED_NOTE;
15
15
  /** (#124, automation unknown keys / types) the refusal codes the write paths answer; surfaced verbatim by the client (details JSON object last), never retried */
16
16
  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).";
17
17
  /** (idleoff57) the conditional switch-off, documented for an agent; (idleroute58) sent to POST /automations/:id/deactivate-if-idle */
@@ -0,0 +1,12 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { ConduytClient } from "../client.js";
3
+ /**
4
+ * Booking routing forms (app: /api/v1/booking-routing-forms): the question forms a visitor answers before the booking page
5
+ * they are sent to. Reads need calendar:view; writes need an owner / admin key and active billing. The public page that
6
+ * serves a form (/public/booking/routing/{slug}) is keyless and is not a tool.
7
+ */
8
+ export declare const ROUTING_STEP_TYPES: readonly ["select", "radio", "text"];
9
+ /** the server's own slug rule (lib/booking.ts normalizeSlug): the bound is judged on the NORMALISED value, so "---" (empty after
10
+ * normalising) is refused here and "a b" (-> "a-b") is accepted, exactly as the route does */
11
+ export declare function normalizeRoutingSlug(raw: string): string;
12
+ export declare function registerBookingRoutingFormTools(server: McpServer, client: ConduytClient): void;
@@ -0,0 +1,72 @@
1
+ import { z } from "zod";
2
+ import { formatResult } from "../client.js";
3
+ import { strictInput } from "./strict.js";
4
+ /**
5
+ * Booking routing forms (app: /api/v1/booking-routing-forms): the question forms a visitor answers before the booking page
6
+ * they are sent to. Reads need calendar:view; writes need an owner / admin key and active billing. The public page that
7
+ * serves a form (/public/booking/routing/{slug}) is keyless and is not a tool.
8
+ */
9
+ export const ROUTING_STEP_TYPES = ["select", "radio", "text"];
10
+ /** the server's own slug rule (lib/booking.ts normalizeSlug): the bound is judged on the NORMALISED value, so "---" (empty after
11
+ * normalising) is refused here and "a b" (-> "a-b") is accepted, exactly as the route does */
12
+ export function normalizeRoutingSlug(raw) {
13
+ return raw.toLowerCase().trim().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 64);
14
+ }
15
+ const slugField = z.string().refine((s) => normalizeRoutingSlug(s).length >= 3, "slug must be at least 3 characters once normalised (letters, numbers or hyphens)");
16
+ /** the route ignores a blank title on PATCH (a silent success) and refuses it on create: refuse it here for both */
17
+ const nonBlank = z.string().trim().min(1, "must not be blank");
18
+ const optionSchema = z.object({
19
+ label: z.string().min(1).describe("Option text shown to the visitor"),
20
+ value: z.string().min(1).describe("Option value"),
21
+ routeTo: z.string().optional().describe("Where this answer routes (a booking page slug or path)"),
22
+ }).strict();
23
+ const stepSchema = z.object({
24
+ id: z.string().min(1).describe("Step id (unique within the form)"),
25
+ question: z.string().min(1).describe("The question text"),
26
+ type: z.enum(ROUTING_STEP_TYPES).describe("select, radio or text"),
27
+ options: z.array(optionSchema).optional().describe("The choices of a select / radio step"),
28
+ required: z.boolean().optional().describe("Required (default true)"),
29
+ }).strict();
30
+ const STEPS_NOTE = "The server keeps at most 50 steps and silently drops a step with no id, no question or a type outside select / radio / text, and an option with no label or value; read the answer to see what was stored.";
31
+ const FORM_ERRORS = "Refusals are the server's: 400 'title is required' / 'slug is required' / 'slug must be at least 3 characters', 403 for a key that is not owner / admin, 404 'Routing form not found', 409 'A routing form with this slug already exists'.";
32
+ export function registerBookingRoutingFormTools(server, client) {
33
+ strictInput(server.tool("conduyt_list_booking_routing_forms", "List the account's booking routing forms (GET /api/v1/booking-routing-forms; calendar:view), newest first, answered { data: [form], meta: { page, per_page, total, has_more } }. Each form has id, slug, title, description, isActive and steps.", {
34
+ search: z.string().optional().describe("Matches title, slug or description (case-insensitive)"),
35
+ isActive: z.boolean().optional().describe("Only active (true) or inactive (false) forms"),
36
+ page: z.number().int().min(1).optional().describe("Page, from 1"),
37
+ perPage: z.number().int().min(1).max(200).optional().describe("Rows per page (default 50, max 200)"),
38
+ }, async ({ search, isActive, page, perPage }) => {
39
+ const qs = new URLSearchParams();
40
+ if (search !== undefined)
41
+ qs.set("search", search);
42
+ if (isActive !== undefined)
43
+ qs.set("is_active", String(isActive));
44
+ if (page !== undefined)
45
+ qs.set("page", String(page));
46
+ if (perPage !== undefined)
47
+ qs.set("per_page", String(perPage));
48
+ const q = qs.toString();
49
+ return formatResult(await client.get("/api/v1/booking-routing-forms" + (q ? "?" + q : "")));
50
+ }));
51
+ strictInput(server.tool("conduyt_get_booking_routing_form", "Get one booking routing form with its steps (GET /api/v1/booking-routing-forms/{id}; calendar:view). 404 'Routing form not found'.", {
52
+ id: z.string().uuid().describe("Routing form UUID"),
53
+ }, async ({ id }) => formatResult(await client.get(`/api/v1/booking-routing-forms/${id}`))));
54
+ strictInput(server.tool("conduyt_create_booking_routing_form", "Create a booking routing form (POST /api/v1/booking-routing-forms; owner / admin key, active billing). title and slug are required; the slug is normalised (lowercase letters, numbers and hyphens, at least 3 characters) and is unique across the product. isActive defaults to true. " + STEPS_NOTE + " " + FORM_ERRORS, {
55
+ title: nonBlank.describe("Form title"),
56
+ slug: slugField.describe("URL slug, e.g. 'find-your-consult' (normalised by the server)"),
57
+ description: z.string().nullable().optional().describe("Description, or null"),
58
+ isActive: z.boolean().optional().describe("Active (default true)"),
59
+ steps: z.array(stepSchema).max(50).optional().describe("The ordered questions"),
60
+ }, async ({ title, slug, description, isActive, steps }) => formatResult(await client.post("/api/v1/booking-routing-forms", { title, slug, description, isActive, steps }))));
61
+ strictInput(server.tool("conduyt_update_booking_routing_form", "Update a booking routing form (PATCH /api/v1/booking-routing-forms/{id}; owner / admin key, active billing). Only the fields you pass change; a passed steps list REPLACES the stored steps (an empty list clears them). " + STEPS_NOTE + " " + FORM_ERRORS, {
62
+ id: z.string().uuid().describe("Routing form UUID"),
63
+ title: nonBlank.optional().describe("Form title"),
64
+ slug: slugField.optional().describe("URL slug (normalised; 409 if taken)"),
65
+ description: z.string().nullable().optional().describe("Description, or null to clear"),
66
+ isActive: z.boolean().optional().describe("Active"),
67
+ steps: z.array(stepSchema).max(50).optional().describe("The full ordered question list (replaces the stored one)"),
68
+ }, async ({ id, title, slug, description, isActive, steps }) => formatResult(await client.patch(`/api/v1/booking-routing-forms/${id}`, { title, slug, description, isActive, steps }))));
69
+ strictInput(server.tool("conduyt_delete_booking_routing_form", "Delete a booking routing form (DELETE /api/v1/booking-routing-forms/{id}; owner / admin key, active billing). Answers { deleted: true }. The form's public link stops working. 404 'Routing form not found'.", {
70
+ id: z.string().uuid().describe("Routing form UUID"),
71
+ }, async ({ id }) => formatResult((await client.del(`/api/v1/booking-routing-forms/${id}`)) ?? { deleted: true, id })));
72
+ }
@@ -1,5 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { formatResult } from "../client.js";
3
+ import { strictInput } from "./strict.js";
3
4
  /** Where a call's audio is fetched (no tool carries the bytes: a binary stream does not belong in a tool result). */
4
5
  export const RECORDING_DOWNLOAD_NOTE = "AUDIO is not returned by any tool: GET {API base}/api/v1/dialer/call/{id}/media?type=recording (or type=voicemail) streams it, with the header `Authorization: Bearer <the same API key>`; add `&download=1` (or `download=true`) for a `Content-Disposition: attachment` file named `<Contact or number>_<date>_<time>_<callId8>.mp3` (the same authorisation and the same stream; a call with no media is a 404). The conduyt CLI does this: `conduyt dialer recording download <callId> [--voicemail] [-o file]`.";
5
6
  /** (#1262) PATCH /dialer/call/{id}: the saved outcome of a call, and how a Callback is set up. */
@@ -139,6 +140,22 @@ export function registerCallTools(server, client) {
139
140
  const result = await client.get(`/api/v1/calls/unknown-callers?${params}`);
140
141
  return formatResult(result);
141
142
  });
143
+ // (mcprings71 r1 P2) strict: an unknown key (a typo such as contactID) is refused, never stripped into an unfiltered list
144
+ strictInput(server.tool("conduyt_list_lead_rings", "List the \"Ring the team for this lead\" rings, newest first (GET /api/v1/lead-rings, app shotgun50): who was rung, who answered, when. Each row: { id, contactId, dealId (null to a key without the deals scope), automationId (the automation that rang the team), status (open | won | expired: expired = ended without a winner, i.e. nobody answered in time, the lead could not be assigned, nobody could be rung, or the run stopped; an open ring past its time reads expired), answeredBy (the user who answered, or null), answeredAt, rung (the user ids rung), notRung ([{ userId, reason }]: the step's people left out BEFORE the ring was placed and why, e.g. not available, today's limit reached, over the ring limit; a leg that then failed to place, or was still waiting to be placed when the ring closed or ran out of time, is not listed here (nor in rung; a leg whose placement completed is in rung, even when it completed after the ring closed), so notRung is not the complete inverse of rung), createdAt, endsAt (null while the ring is still being placed), cancelFailed (true: cancelling the other phones failed at its bound, they rang on until the ring time was up) }. Owners and admins see every ring; anyone else sees only the rings that rang them. Filters: contactId (one lead), status, limit 1-100 (default 25). Read-only; requires dialer:view. Answering a ring is a person's softphone only (an API key cannot answer).", {
145
+ contactId: z.string().uuid().optional().describe("Only this lead's rings (contact UUID)"),
146
+ status: z.enum(["open", "won", "expired"]).optional().describe("open (still ringing), won (someone answered) or expired (ended without a winner: nobody answered in time, the lead could not be assigned, nobody could be rung, or the run stopped)"),
147
+ limit: z.number().int().min(1).max(100).optional().describe("Rows, 1-100 (default 25)"),
148
+ }, async ({ contactId, status, limit }) => {
149
+ const params = new URLSearchParams();
150
+ if (contactId)
151
+ params.set("contactId", contactId);
152
+ if (status)
153
+ params.set("status", status);
154
+ if (limit !== undefined)
155
+ params.set("limit", String(limit));
156
+ const result = await client.get(`/api/v1/lead-rings?${params}`);
157
+ return formatResult(result);
158
+ }));
142
159
  server.tool("conduyt_link_call", "Link a contact-less call to an existing contact (the unknown-caller prompt's 'Search a contact' + Attach). attachNumber=true also writes the call's number into the contact's next free phone slot (empty primary, then phone_2, phone_3 ...; never overwrites; already there = no write). dryRun=true answers exactly what the request would do (attached.slot, alreadyOnContact, alreadyLinked, or the same refusal) and writes nothing: call it first to tell a human what will happen. Refusals write nothing: 409 call_already_linked, no_free_phone_slot, number_on_another_contact (another contact has it as its primary phone), number_owner_undecidable (too many contacts share the number's last seven digits to prove who owns it: link without attachNumber); 403 contact_not_editable (attach needs edit rights on the contact); 404 call_not_found / contact_not_found; 422 number_unusable. A repeat of a successful link is idempotent (alreadyLinked=true). To create a NEW lead from the call instead, use conduyt_create_contact with callId. Requires dialer:create, plus contacts:edit when attachNumber is true.", {
143
160
  id: z.string().uuid().describe("Call UUID (a contact-less call, e.g. from conduyt_list_calls)"),
144
161
  contactId: z.string().uuid().describe("The contact to link the call to"),
@@ -0,0 +1,11 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { ConduytClient } from "../client.js";
3
+ /**
4
+ * Drip tracks (app: /api/v1/drip-tracks; the sequences that status metadata rows point at through dripTrackId). A track has a
5
+ * lowercase machine slug `name`, a `label`, a `channel` (sms | email | both), a `complianceProfile`, ordered `steps`,
6
+ * `exitConditions`, and the flags reEntryAllowed / isActive. Reads need settings:view, writes settings:edit (the step
7
+ * import needs an owner / admin key); writes need active billing.
8
+ */
9
+ export declare const DRIP_TRACK_CHANNELS: readonly ["sms", "email", "both"];
10
+ export declare const DRIP_COMPLIANCE_PROFILES: readonly ["twilio_10dlc", "gsm", "email_only"];
11
+ export declare function registerDripTrackTools(server: McpServer, client: ConduytClient): void;
@@ -0,0 +1,66 @@
1
+ import { z } from "zod";
2
+ import { formatResult } from "../client.js";
3
+ import { strictInput } from "./strict.js";
4
+ /**
5
+ * Drip tracks (app: /api/v1/drip-tracks; the sequences that status metadata rows point at through dripTrackId). A track has a
6
+ * lowercase machine slug `name`, a `label`, a `channel` (sms | email | both), a `complianceProfile`, ordered `steps`,
7
+ * `exitConditions`, and the flags reEntryAllowed / isActive. Reads need settings:view, writes settings:edit (the step
8
+ * import needs an owner / admin key); writes need active billing.
9
+ */
10
+ export const DRIP_TRACK_CHANNELS = ["sms", "email", "both"];
11
+ export const DRIP_COMPLIANCE_PROFILES = ["twilio_10dlc", "gsm", "email_only"];
12
+ const SLUG_RE = /^[a-z0-9][a-z0-9_]{0,79}$/;
13
+ // the routes trim a name before they test it, so a padded slug is valid input: trim first, then the rule
14
+ const slug = z.string().trim().regex(SLUG_RE, "lowercase machine slug: letters, numbers and underscores, max 80");
15
+ /** one step as the STEP IMPORT validates it (POST /drip-tracks/import-steps only). Create and update store ANY JSON array
16
+ * (the route only requires an array), so they take free-form steps: a track read back from the API always round-trips. */
17
+ const stepSchema = z.object({
18
+ dayOffset: z.number().int().min(0).describe("Days after entry; steps must be in ascending order"),
19
+ timeWindow: z.string().max(50).nullable().optional().describe("Send window text, e.g. '09:00-17:00'"),
20
+ channel: z.enum(DRIP_TRACK_CHANNELS).describe("sms, email or both"),
21
+ templateId: z.string().max(200).nullable().optional().describe("Template id"),
22
+ templateBody: z.string().max(10000).nullable().optional().describe("Inline template body"),
23
+ mergeTags: z.array(z.string().regex(/^\$\[[A-Za-z0-9_.-]+\]$/, "Merge tags use the $[tag] format")).max(100).optional().describe("Merge tags in $[tag] format"),
24
+ }).strict();
25
+ const TRACK_ERRORS = "Refusals are the server's: 400 with the reason (name must be a lowercase slug, channel / compliance_profile not one of the listed values, steps must be a JSON array, exit_conditions must be a JSON object or array), 404 'Drip track not found' (no such track in your account), 409 'A drip track with this name already exists'.";
26
+ export function registerDripTrackTools(server, client) {
27
+ strictInput(server.tool("conduyt_list_drip_tracks", "List the account's drip tracks (GET /api/v1/drip-tracks; settings:view): active first, then by name; each row has id, name, label, channel, complianceProfile, steps, exitConditions, reEntryAllowed, isActive and _count.statusMetadata (how many status metadata rows use the track). Status metadata names a track by its id (dripTrackId) or, in an import, by its name.", {}, async () => formatResult(await client.get("/api/v1/drip-tracks"))));
28
+ strictInput(server.tool("conduyt_get_drip_track", "Get one drip track with its steps (GET /api/v1/drip-tracks/{id}; settings:view). 404 'Drip track not found' for an id that is not in your account.", {
29
+ id: z.string().uuid().describe("Drip track UUID"),
30
+ }, async ({ id }) => formatResult(await client.get(`/api/v1/drip-tracks/${id}`))));
31
+ strictInput(server.tool("conduyt_create_drip_track", "Create a drip track (POST /api/v1/drip-tracks; settings:edit, active billing). name (a lowercase slug) and label are required; channel defaults to both, complianceProfile to twilio_10dlc, steps to none, reEntryAllowed to false, isActive to true. " + TRACK_ERRORS, {
32
+ name: slug.describe("Machine slug, e.g. 'new_lead_nurture' (unique per account)"),
33
+ label: z.string().trim().min(1).describe("Display label"),
34
+ channel: z.enum(DRIP_TRACK_CHANNELS).optional().describe("sms, email or both (default both)"),
35
+ complianceProfile: z.enum(DRIP_COMPLIANCE_PROFILES).optional().describe("twilio_10dlc (default), gsm or email_only"),
36
+ steps: z.array(z.unknown()).optional().describe("Ordered steps: any JSON array the route stores (the step import is the typed form: dayOffset ascending, channel, templateId, templateBody, mergeTags)"),
37
+ exitConditions: z.union([z.record(z.unknown()), z.array(z.unknown())]).optional().describe("Exit conditions: a JSON object or array"),
38
+ reEntryAllowed: z.boolean().optional().describe("May a contact enter the track again (default false)"),
39
+ isActive: z.boolean().optional().describe("Active (default true)"),
40
+ },
41
+ // undefined fields are dropped by JSON.stringify, so only the ones given are sent
42
+ async ({ name, label, channel, complianceProfile, steps, exitConditions, reEntryAllowed, isActive }) => formatResult(await client.post("/api/v1/drip-tracks", { name, label, channel, complianceProfile, steps, exitConditions, reEntryAllowed, isActive }))));
43
+ strictInput(server.tool("conduyt_update_drip_track", "Update a drip track (PATCH /api/v1/drip-tracks/{id}; settings:edit, active billing). Only the fields you pass change; at least one is needed (400 'No valid fields to update' otherwise). A passed steps list REPLACES the stored steps. " + TRACK_ERRORS, {
44
+ id: z.string().uuid().describe("Drip track UUID"),
45
+ name: slug.optional().describe("Machine slug"),
46
+ label: z.string().trim().min(1).optional().describe("Display label"),
47
+ channel: z.enum(DRIP_TRACK_CHANNELS).optional().describe("sms, email or both"),
48
+ complianceProfile: z.enum(DRIP_COMPLIANCE_PROFILES).optional().describe("twilio_10dlc, gsm or email_only"),
49
+ steps: z.array(z.unknown()).optional().describe("The full ordered step list (replaces the stored one; any JSON array, [] clears every step)"),
50
+ exitConditions: z.union([z.record(z.unknown()), z.array(z.unknown())]).optional().describe("Exit conditions: a JSON object or array"),
51
+ reEntryAllowed: z.boolean().optional().describe("May a contact enter the track again"),
52
+ isActive: z.boolean().optional().describe("Active"),
53
+ }, async ({ id, name, label, channel, complianceProfile, steps, exitConditions, reEntryAllowed, isActive }) => formatResult(await client.patch(`/api/v1/drip-tracks/${id}`, { name, label, channel, complianceProfile, steps, exitConditions, reEntryAllowed, isActive }))));
54
+ strictInput(server.tool("conduyt_delete_drip_track", "Delete a drip track (DELETE /api/v1/drip-tracks/{id}; settings:edit, active billing). Status metadata rows that named the track lose it (their dripTrackId becomes null and their updatedAt advances, so an editor holding the old version is refused); nothing else is deleted. Answers 204 with no body, reported here as { deleted: true, id }. 404 'Drip track not found' for an id that is not in your account.", {
55
+ id: z.string().uuid().describe("Drip track UUID"),
56
+ }, async ({ id }) => {
57
+ const result = await client.del(`/api/v1/drip-tracks/${id}`);
58
+ return formatResult(result ?? { deleted: true, id });
59
+ }));
60
+ strictInput(server.tool("conduyt_import_drip_track_steps", "Replace the steps of several existing drip tracks in one call (POST /api/v1/drip-tracks/import-steps; owner / admin key, active billing; max 200 tracks, 250 steps each). Tracks are named by trackName (the slug), not id. Answers { updated, errors: [{ trackName, reason }] }: read errors even on a 200 (a duplicate trackName in the call, 'Drip track not found', 'dayOffset values must be ascending'); the valid tracks are updated and the rest are reported. A step with a key outside dayOffset, timeWindow, channel, templateId, templateBody, mergeTags is refused as InvalidParams before any request.", {
61
+ items: z.array(z.object({
62
+ trackName: slug.describe("Drip track name (slug)"),
63
+ steps: z.array(stepSchema).max(250).describe("The full ordered step list for this track"),
64
+ }).strict()).max(200).describe("The tracks to update"),
65
+ }, async ({ items }) => formatResult(await client.post("/api/v1/drip-tracks/import-steps", { items }))));
66
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conduyt-mcp",
3
- "version": "4.110.0",
3
+ "version": "4.111.0",
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",
@@ -235,11 +235,6 @@
235
235
  "status": "planned",
236
236
  "reason": "booking page management"
237
237
  },
238
- {
239
- "match": "/api/v1/booking-routing-forms",
240
- "status": "planned",
241
- "reason": "booking routing form management"
242
- },
243
238
  {
244
239
  "match": "/api/v1/automations",
245
240
  "status": "planned",
@@ -325,11 +320,6 @@
325
320
  "status": "planned",
326
321
  "reason": "drip campaign management"
327
322
  },
328
- {
329
- "match": "/api/v1/drip-tracks",
330
- "status": "planned",
331
- "reason": "drip track management"
332
- },
333
323
  {
334
324
  "match": "/api/v1/lead-routing",
335
325
  "status": "planned",
@@ -600,11 +590,6 @@
600
590
  "status": "planned",
601
591
  "reason": "outbound webhook subscription management (distinct from the inbound /webhooks/ receivers)"
602
592
  },
603
- {
604
- "match": "/api/v1/automation-folders",
605
- "status": "planned",
606
- "reason": "automation-folder organization (shipped 2026-08) — agent-relevant workflow housekeeping; typed tools wanted"
607
- },
608
593
  {
609
594
  "match": "POST /api/v1/call-flows/audio",
610
595
  "status": "excluded",
@@ -660,11 +645,6 @@
660
645
  "status": "planned",
661
646
  "reason": "arrived with the app main merge before f132ed6f0, outside the unknown-caller feature; a typed tool is wanted but not built (4.90.0)"
662
647
  },
663
- {
664
- "match": "GET /api/v1/lead-rings",
665
- "status": "planned",
666
- "reason": "the softphone's open-ring list (shotgun50, live before batch54), callable with an API key in principle (it filters by apiKeyMayReadDeals); a typed tool is wanted but not built; recorded by parity54 so the coverage gate has a decision"
667
- },
668
648
  {
669
649
  "match": "POST /api/v1/lead-rings/:id/answer",
670
650
  "status": "excluded",
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "generatedAt": "2026-11-26T20:26:56.356Z",
3
- "toolCount": 479,
3
+ "toolCount": 495,
4
4
  "totalEndpoints": 1245,
5
5
  "counts": {
6
- "covered": 424,
6
+ "covered": 440,
7
7
  "excluded": 384,
8
- "planned": 437,
8
+ "planned": 421,
9
9
  "uncategorized": 0
10
10
  },
11
11
  "matrix": {
@@ -766,20 +766,28 @@
766
766
  "reason": "execution inspection"
767
767
  },
768
768
  "GET /api/v1/automation-folders": {
769
- "status": "planned",
770
- "reason": "automation-folder organization (shipped 2026-08) — agent-relevant workflow housekeeping; typed tools wanted"
769
+ "status": "covered",
770
+ "tools": [
771
+ "conduyt_list_automation_folders"
772
+ ]
771
773
  },
772
774
  "POST /api/v1/automation-folders": {
773
- "status": "planned",
774
- "reason": "automation-folder organization (shipped 2026-08) — agent-relevant workflow housekeeping; typed tools wanted"
775
+ "status": "covered",
776
+ "tools": [
777
+ "conduyt_create_automation_folder"
778
+ ]
775
779
  },
776
780
  "PATCH /api/v1/automation-folders/:id": {
777
- "status": "planned",
778
- "reason": "automation-folder organization (shipped 2026-08) — agent-relevant workflow housekeeping; typed tools wanted"
781
+ "status": "covered",
782
+ "tools": [
783
+ "conduyt_update_automation_folder"
784
+ ]
779
785
  },
780
786
  "DELETE /api/v1/automation-folders/:id": {
781
- "status": "planned",
782
- "reason": "automation-folder organization (shipped 2026-08) — agent-relevant workflow housekeeping; typed tools wanted"
787
+ "status": "covered",
788
+ "tools": [
789
+ "conduyt_delete_automation_folder"
790
+ ]
783
791
  },
784
792
  "GET /api/v1/automations": {
785
793
  "status": "covered",
@@ -1082,24 +1090,34 @@
1082
1090
  "reason": "booking page management"
1083
1091
  },
1084
1092
  "GET /api/v1/booking-routing-forms": {
1085
- "status": "planned",
1086
- "reason": "booking routing form management"
1093
+ "status": "covered",
1094
+ "tools": [
1095
+ "conduyt_list_booking_routing_forms"
1096
+ ]
1087
1097
  },
1088
1098
  "POST /api/v1/booking-routing-forms": {
1089
- "status": "planned",
1090
- "reason": "booking routing form management"
1099
+ "status": "covered",
1100
+ "tools": [
1101
+ "conduyt_create_booking_routing_form"
1102
+ ]
1091
1103
  },
1092
1104
  "GET /api/v1/booking-routing-forms/:id": {
1093
- "status": "planned",
1094
- "reason": "booking routing form management"
1105
+ "status": "covered",
1106
+ "tools": [
1107
+ "conduyt_get_booking_routing_form"
1108
+ ]
1095
1109
  },
1096
1110
  "PATCH /api/v1/booking-routing-forms/:id": {
1097
- "status": "planned",
1098
- "reason": "booking routing form management"
1111
+ "status": "covered",
1112
+ "tools": [
1113
+ "conduyt_update_booking_routing_form"
1114
+ ]
1099
1115
  },
1100
1116
  "DELETE /api/v1/booking-routing-forms/:id": {
1101
- "status": "planned",
1102
- "reason": "booking routing form management"
1117
+ "status": "covered",
1118
+ "tools": [
1119
+ "conduyt_delete_booking_routing_form"
1120
+ ]
1103
1121
  },
1104
1122
  "GET /api/v1/bulk": {
1105
1123
  "status": "planned",
@@ -3315,28 +3333,40 @@
3315
3333
  ]
3316
3334
  },
3317
3335
  "GET /api/v1/drip-tracks": {
3318
- "status": "planned",
3319
- "reason": "drip track management"
3336
+ "status": "covered",
3337
+ "tools": [
3338
+ "conduyt_list_drip_tracks"
3339
+ ]
3320
3340
  },
3321
3341
  "POST /api/v1/drip-tracks": {
3322
- "status": "planned",
3323
- "reason": "drip track management"
3342
+ "status": "covered",
3343
+ "tools": [
3344
+ "conduyt_create_drip_track"
3345
+ ]
3324
3346
  },
3325
3347
  "GET /api/v1/drip-tracks/:id": {
3326
- "status": "planned",
3327
- "reason": "drip track management"
3348
+ "status": "covered",
3349
+ "tools": [
3350
+ "conduyt_get_drip_track"
3351
+ ]
3328
3352
  },
3329
3353
  "PATCH /api/v1/drip-tracks/:id": {
3330
- "status": "planned",
3331
- "reason": "drip track management"
3354
+ "status": "covered",
3355
+ "tools": [
3356
+ "conduyt_update_drip_track"
3357
+ ]
3332
3358
  },
3333
3359
  "DELETE /api/v1/drip-tracks/:id": {
3334
- "status": "planned",
3335
- "reason": "drip track management"
3360
+ "status": "covered",
3361
+ "tools": [
3362
+ "conduyt_delete_drip_track"
3363
+ ]
3336
3364
  },
3337
3365
  "POST /api/v1/drip-tracks/import-steps": {
3338
- "status": "planned",
3339
- "reason": "drip track management"
3366
+ "status": "covered",
3367
+ "tools": [
3368
+ "conduyt_import_drip_track_steps"
3369
+ ]
3340
3370
  },
3341
3371
  "GET /api/v1/email-domains": {
3342
3372
  "status": "planned",
@@ -3948,8 +3978,10 @@
3948
3978
  "reason": "lead pool claim surfaces"
3949
3979
  },
3950
3980
  "GET /api/v1/lead-rings": {
3951
- "status": "planned",
3952
- "reason": "the softphone's open-ring list (shotgun50, live before batch54), callable with an API key in principle (it filters by apiKeyMayReadDeals); a typed tool is wanted but not built; recorded by parity54 so the coverage gate has a decision"
3981
+ "status": "covered",
3982
+ "tools": [
3983
+ "conduyt_list_lead_rings"
3984
+ ]
3953
3985
  },
3954
3986
  "POST /api/v1/lead-rings/:id/answer": {
3955
3987
  "status": "excluded",