conduyt-mcp 4.105.29 → 4.105.31

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
@@ -149,7 +149,7 @@ Connecting Calendly is browser-only (OAuth 2.0 + PKCE): the user opens `{app}/ap
149
149
  ### Call log search (read-only, dialer:view)
150
150
  | Tool | Description |
151
151
  |------|-------------|
152
- | `conduyt_search_dialer_history` | Search and filter the dialer call log for QA (`GET /dialer/history`, 200 per page): `q` (200 characters at most; matches name, number, agent and transcript, not notes), `recordedOnly`, `disposition` (100 characters at most), `userId`, `dateFrom` / `dateTo`, `direction`, `status`, `mine`. Each row carries `match { field, snippet, ranges }` when `q` is given; `meta.incomplete` with `incompleteReason: "number_matches_capped"` means `total` is a lower bound; 400s surfaced verbatim | Also `unmatched` (only calls no contact is linked to) and `line` (only inbound calls to our line).
152
+ | `conduyt_search_dialer_history` | Search and filter the dialer call log for QA (`GET /dialer/history`, 200 per page): `q` (200 characters at most; matches name, number, agent and transcript, not notes), `recordedOnly`, `disposition` (100 characters at most), `userId`, `dateFrom` / `dateTo`, `direction`, `status`, `mine`. Each row carries `match { field, snippet, ranges }` when `q` is given; `meta.incomplete` with `incompleteReason: "number_matches_capped"` means `total` is a lower bound; each row carries `audioDiagnostics` (what the softphone reported about the call's audio: warning / cleared / gap rows, `[]` when nothing; this tool only); 400s surfaced verbatim | Also `unmatched` (only calls no contact is linked to) and `line` (only inbound calls to our line).
153
153
  | `conduyt_count_unknown_callers` | The toll-free counter (`GET /calls/unknown-callers`): for a `line` since an ISO `since` (start of day, within 31 days), `total` inbound calls that arrived with no contact and `unmatched` still contact-less; `dialer:view` |
154
154
  | `conduyt_link_call` | Link a contact-less call to an existing contact (`POST /calls/{id}/link`, the unknown-caller prompt's Search a contact + Attach): `attachNumber` writes the number into the next free phone slot, `dryRun` previews; refusals `call_already_linked`, `no_free_phone_slot`, `number_on_another_contact`, `number_owner_undecidable`, `contact_not_editable`, `number_unusable`; `dialer:create` (+ `contacts:edit` to attach) |
155
155
  | `conduyt_search_dialer_calls` | The recordings / voicemail list with the same search and filters (`GET /dialer/calls`, 100 per page) |
@@ -340,7 +340,7 @@ Team Chat 2.0 publishes thin events (ids and kinds, never message content) on th
340
340
  |------|-------------|
341
341
  | `conduyt_ai_import_contacts` | AI-powered bulk import (up to 1000, auto-tag, smart list, automation) |
342
342
  | `conduyt_export_contacts` | Export contacts as JSON with filters |
343
- | `conduyt_export_deals` | Export deals as JSON with filters |
343
+ | `conduyt_export_deals` | Export deals as JSON with the board's filters (owner, tags, time zone, dates, value, health) |
344
344
  | `conduyt_bulk_tag_contacts` | Add one tag to many contacts |
345
345
  | `conduyt_bulk_untag_contacts` | Remove one tag from many contacts |
346
346
  | `conduyt_bulk_edit_contacts` | Apply the same field changes to many contacts |
@@ -401,6 +401,7 @@ Team Chat 2.0 publishes thin events (ids and kinds, never message content) on th
401
401
  | `conduyt_ai_summarize_contact` | AI summary with sentiment and next steps |
402
402
  | `conduyt_ai_chat` | Conversational AI assistant grounded in your CRM (optionally pinned to a record) |
403
403
  | `conduyt_ai_improve_email` | Rewrite an email draft for clarity, tone, and persuasiveness |
404
+ | `conduyt_ai_improve_sms` | Rewrite one SMS text (`POST /ai/improve-sms`), checked by the server before it is returned: links, times, prices, opt-out lines and merge fields kept as written; `body` 1-1600 characters, optional `transport` (twilio, project_blue, whatsapp, fromk or null); returns `{ data: { body } }`. An opt-out-only draft is refused 422 `ai_rewrite_rejected` before any AI credit is spent; a rewrite that broke a rule is 502; the refusal message is returned as the server wrote it |
404
405
  | `conduyt_ai_deal_insights` | AI risk/momentum analysis and next actions for a single deal |
405
406
  | `conduyt_ai_conversation_intelligence` | AI summary/sentiment/objections for a transcribed call |
406
407
  | `conduyt_ai_call_disposition` | AI-suggested disposition for a call from its transcript |
@@ -44,6 +44,10 @@ export const TOOL_ANNOTATIONS = {
44
44
  conduyt_import_deals: create("Import Deals"),
45
45
  conduyt_add_deal_tags: update("Add Deal Tags"),
46
46
  conduyt_list_deal_views: ro("List Deal Views"),
47
+ conduyt_get_deal_view: ro("Get Deal View"),
48
+ conduyt_create_deal_view: create("Create Deal View"),
49
+ conduyt_update_deal_view: update("Update Deal View"),
50
+ conduyt_delete_deal_view: destroy("Delete Deal View"),
47
51
  conduyt_list_tasks: ro("List Tasks"),
48
52
  conduyt_create_task: create("Create Task"),
49
53
  conduyt_get_task: ro("Get Task"),
@@ -335,6 +339,7 @@ export const TOOL_ANNOTATIONS = {
335
339
  conduyt_ai_summarize_contact: ro("Summarize Contact With AI"),
336
340
  conduyt_ai_chat: ro("Chat With AI Assistant"),
337
341
  conduyt_ai_improve_email: ro("Improve Email With AI"),
342
+ conduyt_ai_improve_sms: ro("Improve Text With AI"),
338
343
  conduyt_ai_deal_insights: ro("Get AI Deal Insights"),
339
344
  conduyt_ai_conversation_intelligence: create("Analyze Conversation With AI"),
340
345
  conduyt_ai_call_disposition: ro("Suggest Call Disposition"),
@@ -106,6 +106,17 @@ export function registerAiExtendedTools(server, client) {
106
106
  const result = await client.post("/api/v1/ai/improve-email", params);
107
107
  return formatResult(result);
108
108
  });
109
+ server.tool("conduyt_ai_improve_sms", "Rewrite ONE SMS text with the account's AI (POST /api/v1/ai/improve-sms; the Message check's \"Rewrite with AI\"). Returns { data: { body } }, the rewritten text in data.body. The server checks the answer before returning it: links, times, prices and other protected tokens, opt-out lines (STOP, HELP, unsubscribe and similar) and merge fields are kept as written, the length rule of the transport holds, no new emoji, plain text. A rewrite that breaks a rule is refused 502 ai_rewrite_rejected (no partial result). A draft whose only lines are opt-out lines has nothing to rewrite: the server refuses it 422 ai_rewrite_rejected BEFORE any AI credit is spent; the refusal message is returned as the server wrote it. Nothing is sent or saved.", {
110
+ body: z.string().min(1).max(1600).refine((v) => v.trim() !== "", "must not be blank").describe("The SMS text to rewrite (1-1600 characters, kept as written, not trimmed; it must hold a non-whitespace character)"),
111
+ transport: z
112
+ .enum(["twilio", "project_blue", "whatsapp", "fromk"])
113
+ .nullable()
114
+ .optional()
115
+ .describe("The transport the composer counts with: twilio (SMS, the default when absent or null), project_blue (iMessage, no length cap), whatsapp (up to 4096 characters) or fromk."),
116
+ }, async (params) => {
117
+ const result = await client.post("/api/v1/ai/improve-sms", params);
118
+ return formatResult(result);
119
+ });
109
120
  server.tool("conduyt_ai_deal_insights", "AI analysis of a single deal. Returns risk signals, momentum, and recommended next actions based on the deal's stage, activity, and history.", {
110
121
  dealId: z.string().describe("Deal UUID to analyze"),
111
122
  }, async (params) => {
@@ -111,7 +111,7 @@ const seg = (teammateId) => encodeURIComponent(teammateId.trim().toLowerCase());
111
111
  const WHO = "Owners and admins, with a person's API key (the chat scope); an AI teammate's own key is refused (403 agent_route_refused). The teammate must have the provider Grok Bot or OpenClaw (grok or clawdbot; 409 agent_not_webhook_provider otherwise). Answers 404 ai_teammates_off while AI teammates are switched off and 402 plan_required when the workspace is not entitled. Against a server that predates these routes (an HTML 404) the error says so.";
112
112
  export function registerAiTeammateConnectTools(server, client) {
113
113
  // (#1153, tri-surface parity) the workspace's AI teammates, so an agent can find the one to connect by id or @handle
114
- strictInput(server.tool("conduyt_list_ai_teammates", "List the workspace's live AI teammates (GET /api/v1/chat/agents; a removed teammate is not listed), oldest first: [{ id, handle, name, provider (claude_code, codex, grok, clawdbot), state (listening, replying, needs_attention (#1213: listening, nothing running, and a turn in the last 24 hours failed or timed out), away), connected (a connector teammate, grok or clawdbot: its connection is stored and live; any other: a listener runs now), connection (a connector teammate's not_connected, waiting_for_hello, listening or not_listening; null otherwise), knowledgeFolders (#1209: how many knowledge folders the teammate's RUNNING listeners reported, the sum over the listeners whose heartbeat beats now, 0 = none; a knowledge folder is a folder on the listener's computer the teammate reads on every turn, whoever asked, read-only, secrets-looking files excluded; it is chosen on that computer with \`conduyt agent listen\` (the start directory, --knowledge <folder> or --no-knowledge), never through Conduyt, and its path never leaves the computer), createdAt }]. Nothing secret is listed. Name a teammate to the connector tools (Grok Bot and OpenClaw) by its id or its @handle. The rows an API key reads carry no webhook object (the Settings session rows do: webhook.noRun and webhook.provider are read there, never through this tool). Owners and admins, with a person's API key (the chat scope; reading is enough); a member's key is refused (403) and an AI teammate's own key too (403 agent_route_refused). Adding a teammate stays in Settings > AI. Answers 404 ai_teammates_off while AI teammates are switched off and 402 plan_required when the workspace is not entitled; a workspace with more than 200 live teammates is refused to an API key (413 agent_list_over_ceiling; Settings > AI lists them all).", {}, async () => {
114
+ strictInput(server.tool("conduyt_list_ai_teammates", "List the workspace's live AI teammates (GET /api/v1/chat/agents; a removed teammate is not listed), oldest first: [{ id, handle, name, provider (claude_code, codex, grok, clawdbot, hermes_plugin = Hermes, a listener teammate like claude_code and codex), state (listening, replying, needs_attention (#1213: listening, nothing running, and a turn in the last 24 hours failed or timed out), away), connected (a connector teammate, grok or clawdbot: its connection is stored and live; any other: a listener runs now), connection (a connector teammate's not_connected, waiting_for_hello, listening or not_listening; null otherwise), knowledgeFolders (#1209: how many knowledge folders the teammate's RUNNING listeners reported, the sum over the listeners whose heartbeat beats now, 0 = none; a knowledge folder is a folder on the listener's computer the teammate reads on every turn, whoever asked, read-only, secrets-looking files excluded; it is chosen on that computer with \`conduyt agent listen\` (the start directory, --knowledge <folder> or --no-knowledge), never through Conduyt, and its path never leaves the computer), createdAt }]. Nothing secret is listed. Name a teammate to the connector tools (Grok Bot and OpenClaw) by its id or its @handle. The rows an API key reads carry no webhook object (the Settings session rows do: webhook.noRun and webhook.provider are read there, never through this tool). Owners and admins, with a person's API key (the chat scope; reading is enough); a member's key is refused (403) and an AI teammate's own key too (403 agent_route_refused). Adding a teammate stays in Settings > AI. Answers 404 ai_teammates_off while AI teammates are switched off and 402 plan_required when the workspace is not entitled; a workspace with more than 200 live teammates is refused to an API key (413 agent_list_over_ceiling; Settings > AI lists them all).", {}, async () => {
115
115
  try {
116
116
  const res = await client.get("/api/v1/chat/agents");
117
117
  return connectResult(unwrap(res), []);
@@ -3,6 +3,7 @@ import { formatResult } from "../client.js";
3
3
  import { INVALID_NUMBER_REFUSALS } from "./contacts.js";
4
4
  import { strictInput } from "./strict.js";
5
5
  import { CONTACT_TIMEZONE_NOTE, appendContactTimezone, contactTimezoneSchema } from "./contact-timezone.js";
6
+ import { appendDealExportFilters, dealExportFilterShape } from "./deal-views.js";
6
7
  /** (#136, Codex r1 m2) POST /bulk/contacts/update is NOT atomic and answers per row: an impossible phone is a per-row success:false inside HTTP 200 (no code) while other rows commit; the route takes no country */
7
8
  export const BULK_UPDATE_REFUSALS = " Results are PER ROW inside an HTTP 200 (not atomic: some rows can be saved while others fail): read data.summary { total, succeeded, failed } and data.results, each { id, success, error? }. An impossible US/Canada number (area code or exchange starting 0 or 1) fails only that row, success: false with the error text (no phone_invalid code, no top-level 400), and nothing is saved for that row. This route does not take country: a country-only row fails as a row, and a country sent beside another field is ignored while that field is applied (use conduyt_bulk_edit_contacts for a country; it refuses a null or blank country 400 country_invalid).";
8
9
  export function registerBulkTools(server, client) {
@@ -66,11 +67,12 @@ export function registerBulkTools(server, client) {
66
67
  });
67
68
  return formatResult(result);
68
69
  });
69
- server.tool("conduyt_export_deals", "Export deals as JSON with filtering by status, pipeline, or search term. 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.", {
70
+ 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.", {
70
71
  search: z.string().optional().describe("Search deal titles"),
71
72
  status: z.string().optional().describe("Filter by status (open, won, lost)"),
72
73
  pipeline: z.string().optional().describe("Filter by pipeline UUID"),
73
74
  contact_timezone: contactTimezoneSchema,
75
+ ...dealExportFilterShape,
74
76
  }, async (params) => {
75
77
  const qp = new URLSearchParams({ format: "json" });
76
78
  if (params.search)
@@ -80,6 +82,7 @@ export function registerBulkTools(server, client) {
80
82
  if (params.pipeline)
81
83
  qp.set("pipeline", params.pipeline);
82
84
  appendContactTimezone(qp, params.contact_timezone);
85
+ appendDealExportFilters(qp, params);
83
86
  // Same widened-but-bounded budget as the contacts export.
84
87
  const result = await client.get(`/api/v1/deals/export?${qp}`, {
85
88
  timeoutMs: 120_000,
@@ -114,7 +114,7 @@ export function registerCallTools(server, client) {
114
114
  const result = await client.get(`/api/v1/calls?${params}`);
115
115
  return formatResult(result);
116
116
  });
117
- server.tool("conduyt_search_dialer_history", "Search and filter the dialer's call log for QA (GET /api/v1/dialer/history, newest first, up to 200 per page): find the recorded calls to review by words, number, disposition, agent and dates. " + SEARCH_ANSWER + " mine=true limits it to the key's own member's calls; the response also carries `stats` { total, inbound, outbound, avgTalkSeconds } for the whole visible log.", {
117
+ server.tool("conduyt_search_dialer_history", "Search and filter the dialer's call log for QA (GET /api/v1/dialer/history, newest first, up to 200 per page): find the recorded calls to review by words, number, disposition, agent and dates. " + SEARCH_ANSWER + " mine=true limits it to the key's own member's calls; the response also carries `stats` { total, inbound, outbound, avgTalkSeconds } for the whole visible log. Each row carries `audioDiagnostics` (this tool only, not conduyt_search_dialer_calls): what the rep's softphone reported about the call's audio, oldest first, as rows of type warning { secondsIntoCall, label, durationSeconds, ended }, cleared { secondsIntoCall, label } or gap { dropped, firstDroppedAt, lastDroppedAt }; [] when nothing was reported. An audit of what was reported, never the call's current state.", {
118
118
  ...SEARCH_FILTERS,
119
119
  mine: z.boolean().optional().describe("true = only the key's own member's calls"),
120
120
  unmatched: z.boolean().optional().describe("true = only calls no contact is linked to (the unknown-caller prompt's not-matched calls; sent as unmatched=1)"),
@@ -0,0 +1,60 @@
1
+ /** (dealsviews) the deal export filters and the saved deal view tools' shared pieces: GET /deals/export, GET|POST /deals/views, GET|PATCH|DELETE /deals/views/{id}. */
2
+ import { z } from "zod";
3
+ /** the caps the API applies (conduyt-app lib/deal-filter-params.ts MAX_OWNER_FILTERS / MAX_TAG_FILTERS) */
4
+ export declare const MAX_OWNER_FILTERS = 25;
5
+ export declare const MAX_TAG_FILTERS = 25;
6
+ /** the extra GET /deals/export filters (the board's), beside search / status / pipeline / contact_timezone which the tool already had */
7
+ export declare const dealExportFilterShape: {
8
+ assigned_to: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
9
+ tag_ids: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
10
+ created_after: z.ZodOptional<z.ZodString>;
11
+ created_before: z.ZodOptional<z.ZodString>;
12
+ value_min: z.ZodOptional<z.ZodNumber>;
13
+ value_max: z.ZodOptional<z.ZodNumber>;
14
+ needsAction: z.ZodOptional<z.ZodBoolean>;
15
+ stale: z.ZodOptional<z.ZodBoolean>;
16
+ health: z.ZodOptional<z.ZodString>;
17
+ };
18
+ type ExportFilters = {
19
+ assigned_to?: string | string[];
20
+ tag_ids?: string | string[];
21
+ created_after?: string;
22
+ created_before?: string;
23
+ value_min?: number;
24
+ value_max?: number;
25
+ needsAction?: boolean;
26
+ stale?: boolean;
27
+ health?: string;
28
+ };
29
+ /** appends the extra export filters; throws the API's cap wording past a cap (owners count DISTINCT UUIDs, tags count every entry, as the API does) */
30
+ export declare function appendDealExportFilters(qp: URLSearchParams, p: ExportFilters): void;
31
+ export declare const DEAL_VIEW_RULES_DOC = "A view's `filters` is a flat ARRAY of rules { field, operator, value } that are ANDed; value is always a STRING (a comma-separated list for operator in; every rule carries a value: send \"\" for is_empty / is_not_empty). Fields and operators: title, status, priority, currency, lostReason (equals, not_equals, contains, not_contains, starts_with, in, is_empty, is_not_empty); value (equals, not_equals, gt, gte, lt, lte, is_empty, is_not_empty; a plain number); pipelineId, stageId, assignedTo, contactId, companyId (UUIDs; equals, not_equals, in, is_empty, is_not_empty); createdAt, updatedAt, expectedCloseDate, wonAt, lostAt (within / not_within with a duration like 7d, 24h or 30m; before / after with an ISO calendar date; is_empty, is_not_empty); contactTimezone (the linked contact's time zone; equals, in; each value a group word eastern, central, mountain, pacific, alaska, hawaii, unknown, or an IANA id, the same values as conduyt_list_deals contact_timezone, at most 25 distinct). The API validates every rule and answers 400 with the reason (a custom-field mirror key is 422 mirror_not_filterable).";
32
+ export declare const DEAL_VIEW_AUDIENCE_DOC = "AUDIENCE: an admin or owner creates a SHARED view and must pass members ([{ userId }] for the picked reps, or [] for everyone), else 400 audience_required; any other user creates a PERSONAL view, which has no audience (members on a personal view update is 400 personal_no_audience). Only an admin edits or deletes a shared view; a personal view is its owner's; a system view's name, filters, icon and sort cannot be changed and it cannot be deleted (403).";
33
+ export declare const dealViewFields: {
34
+ name: z.ZodString;
35
+ description: z.ZodOptional<z.ZodString>;
36
+ icon: z.ZodOptional<z.ZodString>;
37
+ filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
38
+ field: z.ZodString;
39
+ operator: z.ZodString;
40
+ value: z.ZodString;
41
+ }, "strict", z.ZodTypeAny, {
42
+ value: string;
43
+ field: string;
44
+ operator: string;
45
+ }, {
46
+ value: string;
47
+ field: string;
48
+ operator: string;
49
+ }>, "many">>;
50
+ sortField: z.ZodOptional<z.ZodString>;
51
+ sortOrder: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
52
+ members: z.ZodOptional<z.ZodArray<z.ZodObject<{
53
+ userId: z.ZodString;
54
+ }, "strict", z.ZodTypeAny, {
55
+ userId: string;
56
+ }, {
57
+ userId: string;
58
+ }>, "many">>;
59
+ };
60
+ export {};
@@ -0,0 +1,69 @@
1
+ /** (dealsviews) the deal export filters and the saved deal view tools' shared pieces: GET /deals/export, GET|POST /deals/views, GET|PATCH|DELETE /deals/views/{id}. */
2
+ import { z } from "zod";
3
+ /** the caps the API applies (conduyt-app lib/deal-filter-params.ts MAX_OWNER_FILTERS / MAX_TAG_FILTERS) */
4
+ export const MAX_OWNER_FILTERS = 25;
5
+ export const MAX_TAG_FILTERS = 25;
6
+ const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
7
+ /** the extra GET /deals/export filters (the board's), beside search / status / pipeline / contact_timezone which the tool already had */
8
+ export const dealExportFilterShape = {
9
+ assigned_to: z.union([z.string(), z.array(z.string())]).optional().describe("Only deals owned by these users: a user UUID or `unassigned`, one string or an array (each value is sent as its own repeated assigned_to parameter; a comma list inside a value is read too). ANY of them. At most 25 distinct owners (refused before any request)"),
10
+ tag_ids: z.union([z.string(), z.array(z.string())]).optional().describe("Only deals with one of these tags: tag UUIDs, one string or an array (each value sent as its own repeated tag_ids parameter), ANY match. At most 25 entries (refused before any request)"),
11
+ created_after: z.string().optional().describe("Created on or after this date: YYYY-MM-DD (the account time zone) or a full ISO datetime with offset"),
12
+ created_before: z.string().optional().describe("Created on or before this date (a date-only value is day-inclusive): same forms as created_after"),
13
+ value_min: z.number().optional().describe("Deal value at least this number"),
14
+ value_max: z.number().optional().describe("Deal value at most this number"),
15
+ needsAction: z.boolean().optional().describe("true = only open deals with no next action (the board's needs-next-action filter); false sends nothing"),
16
+ stale: z.boolean().optional().describe("true = only open deals not updated for the board's stale period; false sends nothing"),
17
+ health: z.string().optional().describe("One Pipeline health check: high_value_idle | stale | unassigned | needs_action | missing_close_date | missing_contact (the API validates it: 400 otherwise)"),
18
+ };
19
+ const entries = (v) => (Array.isArray(v) ? v : [v]).flatMap((x) => x.split(",")).map((x) => x.trim()).filter(Boolean);
20
+ /** appends the extra export filters; throws the API's cap wording past a cap (owners count DISTINCT UUIDs, tags count every entry, as the API does) */
21
+ export function appendDealExportFilters(qp, p) {
22
+ for (const [name, v] of [["assigned_to", p.assigned_to], ["tag_ids", p.tag_ids]]) {
23
+ if (v === undefined)
24
+ continue;
25
+ const list = Array.isArray(v) ? v : [v];
26
+ if (name === "assigned_to") {
27
+ const owners = new Set(entries(list).filter((e) => UUID_RE.test(e)));
28
+ if (owners.size > MAX_OWNER_FILTERS)
29
+ throw new Error(`assigned_to accepts at most ${MAX_OWNER_FILTERS} owners; got ${owners.size}.`);
30
+ }
31
+ else {
32
+ const n = entries(list).length;
33
+ if (n > MAX_TAG_FILTERS)
34
+ throw new Error(`tag_ids accepts at most ${MAX_TAG_FILTERS} tags; got ${n}.`);
35
+ }
36
+ for (const x of list)
37
+ qp.append(name, x);
38
+ }
39
+ if (p.created_after)
40
+ qp.set("created_after", p.created_after);
41
+ if (p.created_before)
42
+ qp.set("created_before", p.created_before);
43
+ if (p.value_min !== undefined)
44
+ qp.set("value_min", String(p.value_min));
45
+ if (p.value_max !== undefined)
46
+ qp.set("value_max", String(p.value_max));
47
+ if (p.needsAction === true)
48
+ qp.set("needsAction", "true");
49
+ if (p.stale === true)
50
+ qp.set("stale", "true");
51
+ if (p.health)
52
+ qp.set("health", p.health);
53
+ }
54
+ export const DEAL_VIEW_RULES_DOC = "A view's `filters` is a flat ARRAY of rules { field, operator, value } that are ANDed; value is always a STRING (a comma-separated list for operator in; every rule carries a value: send \"\" for is_empty / is_not_empty). Fields and operators: title, status, priority, currency, lostReason (equals, not_equals, contains, not_contains, starts_with, in, is_empty, is_not_empty); value (equals, not_equals, gt, gte, lt, lte, is_empty, is_not_empty; a plain number); pipelineId, stageId, assignedTo, contactId, companyId (UUIDs; equals, not_equals, in, is_empty, is_not_empty); createdAt, updatedAt, expectedCloseDate, wonAt, lostAt (within / not_within with a duration like 7d, 24h or 30m; before / after with an ISO calendar date; is_empty, is_not_empty); contactTimezone (the linked contact's time zone; equals, in; each value a group word eastern, central, mountain, pacific, alaska, hawaii, unknown, or an IANA id, the same values as conduyt_list_deals contact_timezone, at most 25 distinct). The API validates every rule and answers 400 with the reason (a custom-field mirror key is 422 mirror_not_filterable).";
55
+ export const DEAL_VIEW_AUDIENCE_DOC = "AUDIENCE: an admin or owner creates a SHARED view and must pass members ([{ userId }] for the picked reps, or [] for everyone), else 400 audience_required; any other user creates a PERSONAL view, which has no audience (members on a personal view update is 400 personal_no_audience). Only an admin edits or deletes a shared view; a personal view is its owner's; a system view's name, filters, icon and sort cannot be changed and it cannot be deleted (403).";
56
+ const rule = z.object({
57
+ field: z.string().describe("Rule field, e.g. status, stageId, value, createdAt, contactTimezone (see the tool description for the list)"),
58
+ operator: z.string().describe("Rule operator valid for the field, e.g. equals, in, gt, within"),
59
+ value: z.string().describe("The value, REQUIRED and always a string; a comma-separated list for in; send \"\" for is_empty / is_not_empty (the operators that take no value)"),
60
+ }).strict();
61
+ export const dealViewFields = {
62
+ name: z.string().describe("Display name"),
63
+ description: z.string().optional().describe("Description (an empty string clears it on update)"),
64
+ icon: z.string().optional().describe("Icon id (default briefcase)"),
65
+ filters: z.array(rule).optional().describe("The rules (see the tool description); an update REPLACES all the rules ([] clears them); omitted on create = no rules, every deal"),
66
+ sortField: z.string().optional().describe("Sort field (default createdAt)"),
67
+ sortOrder: z.enum(["asc", "desc"]).optional().describe("Sort direction (default desc)"),
68
+ members: z.array(z.object({ userId: z.string().uuid().describe("User UUID") }).strict()).optional().describe("The audience of a SHARED view: the picked reps, or [] for everyone (see AUDIENCE)"),
69
+ };
@@ -7,6 +7,7 @@ import { FORMULA_WRITE_NOTE } from "./formula-fields.js";
7
7
  import { strictInput } from "./strict.js";
8
8
  import { KEEP_PREVIOUS_OWNER_NEEDS_ASSIGNEE } from "./contacts.js";
9
9
  import { CONTACT_TIMEZONE_NOTE, appendContactTimezone, contactTimezoneSchema } from "./contact-timezone.js";
10
+ import { DEAL_VIEW_AUDIENCE_DOC, DEAL_VIEW_RULES_DOC, dealViewFields } from "./deal-views.js";
10
11
  // (mirror1292, batch31 #1292 Ship 3) deal MIRROR fields: a write-through view of a contact / company field, named on the deal tools
11
12
  const MIRROR_READ_DOC = " Mirror fields (#1292): a deal custom field created as a MIRROR of a contact / company field answers that record's value in customFields, with mirrorFields[key] = { mirrored: true, source: { entityType, fieldKey }, unresolved? } beside it (unresolved: no_linked_contact | no_linked_company | source_field_missing, value null); a mirror of a Secure source answers the mask \u2022\u2022\u2022\u2022 like the source (passed through untouched).";
12
13
  const MIRROR_WRITE_DOC = " A customFields key that is a deal MIRROR writes the linked contact / company through its own write path (nothing is stored on the deal): 409 mirror_unresolved (no linked record), 409 mirror_relink_conflict (the same request re-links it), 403 mirror_source_not_editable, 422 mirror_source_rejected, 409 mirror_source_changed, 409 mirror_source_conflict (the source's required state changed under the lock), 422 mirror_conflicting_values (two mirror keys of one source field with different values).";
@@ -72,6 +73,7 @@ export function registerDealTools(server, client) {
72
73
  status: z.enum(["open", "won", "lost"]).optional().describe("Filter by deal status"),
73
74
  search: z.string().optional().describe("Search deal titles"),
74
75
  contact_timezone: contactTimezoneSchema,
76
+ 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."),
75
77
  page: z.number().optional().describe("Page number (default 1)"),
76
78
  per_page: z.number().int().min(1).max(BOARD_SNAPSHOT_MAX_COLUMN_ROWS).optional().describe("Results per page, an integer 1-1000 (server default 50, max 1000; with board_snapshot it is the default rows per column)"),
77
79
  health_summary: z.boolean().optional().describe("true: answer the Pipeline health shape (totalOpenDeals, atRiskValue, checks[], deals) for the filtered set instead of the deal list."),
@@ -128,6 +130,8 @@ export function registerDealTools(server, client) {
128
130
  if (search)
129
131
  params.set("search", search);
130
132
  appendContactTimezone(params, a.contact_timezone);
133
+ if (a.view_id !== undefined)
134
+ params.set("view_id", a.view_id);
131
135
  if (page)
132
136
  params.set("page", String(page));
133
137
  if (per_page)
@@ -321,8 +325,33 @@ export function registerDealTools(server, client) {
321
325
  const result = await client.post(`/api/v1/deals/${dealId}/tags`, { tagIds });
322
326
  return formatResult(result);
323
327
  });
324
- server.tool("conduyt_list_deal_views", "List the account's SAVED DEAL VIEWS (saved deal segments, e.g. 'Open deals over $10k'), each with its id, name, stored filter rules, and current deal count. Read-only — shows how the account segments its deals. A rule's filter field `contactTimezone` (#1312 tzfilter, the linked contact's time zone) takes operators equals / in (the value is a string: one value for equals, a comma-separated list for in) and each value is a group word (eastern, central, mountain, pacific, alaska, hawaii), unknown, or an IANA id (the same values as conduyt_list_deals contact_timezone; the API validates it and refuses a malformed value or more than 25 distinct values with a 400); a view with that rule is created or edited in the web app or through the REST API (POST / PATCH /api/v1/deals/views), this tool set has no saved-view write tool.", {}, async () => {
328
+ server.tool("conduyt_list_deal_views", "List the account's SAVED DEAL VIEWS (saved deal segments, e.g. 'Open deals over $10k'), each with its id, name, stored filter rules, and current deal count. Read-only — shows how the account segments its deals. A rule's filter field `contactTimezone` (#1312 tzfilter, the linked contact's time zone) takes operators equals / in (the value is a string: one value for equals, a comma-separated list for in) and each value is a group word (eastern, central, mountain, pacific, alaska, hawaii), unknown, or an IANA id (the same values as conduyt_list_deals contact_timezone; the API validates it and refuses a malformed value or more than 25 distinct values with a 400); a view with that rule is created or edited with conduyt_create_deal_view / conduyt_update_deal_view (POST / PATCH /api/v1/deals/views), read one with conduyt_get_deal_view and removed with conduyt_delete_deal_view.", {}, async () => {
325
329
  const result = await client.get("/api/v1/deals/views");
326
330
  return formatResult(result);
327
331
  });
332
+ strictInput(server.tool("conduyt_get_deal_view", "Get one SAVED DEAL VIEW by id (GET /api/v1/deals/views/{id}): name, description, icon, stored filter rules, sort, isSystem, isEnabled, isPersonal, createdBy and its audience members. Read-only. 404 when it does not exist or you cannot see it. " + DEAL_VIEW_RULES_DOC, { id: z.string().uuid().describe("Deal view UUID") }, async ({ id }) => {
333
+ const result = await client.get(`/api/v1/deals/views/${encodeURIComponent(id)}`);
334
+ return formatResult(result);
335
+ }));
336
+ strictInput(server.tool("conduyt_create_deal_view", "Create a SAVED DEAL VIEW (POST /api/v1/deals/views, the board's saved view tabs; needs deals.edit and active billing). Answers the created view (201). " + DEAL_VIEW_RULES_DOC + " " + DEAL_VIEW_AUDIENCE_DOC, dealViewFields, async (params) => {
337
+ if (params.name.trim() === "")
338
+ throw new Error("name is required.");
339
+ const result = await client.post("/api/v1/deals/views", params);
340
+ return formatResult(result);
341
+ }));
342
+ strictInput(server.tool("conduyt_update_deal_view", "Update a SAVED DEAL VIEW (PATCH /api/v1/deals/views/{id}; needs deals.edit): only the fields you pass change; filters REPLACES all the rules; isEnabled shows or hides the view (switching a shared view on needs an audience: 409 when it has none, so pass members). Answers the updated view. 404 when the view does not exist. " + DEAL_VIEW_RULES_DOC + " " + DEAL_VIEW_AUDIENCE_DOC, {
343
+ id: z.string().uuid().describe("Deal view UUID"),
344
+ ...dealViewFields,
345
+ name: z.string().optional().describe("New display name (not blank)"),
346
+ isEnabled: z.boolean().optional().describe("true = show the view, false = hide it"),
347
+ }, async ({ id, ...updates }) => {
348
+ if (Object.keys(updates).length === 0)
349
+ throw new Error("Nothing to update: pass at least one field.");
350
+ const result = await client.patch(`/api/v1/deals/views/${encodeURIComponent(id)}`, updates);
351
+ return formatResult(result);
352
+ }));
353
+ strictInput(server.tool("conduyt_delete_deal_view", "Delete a SAVED DEAL VIEW (DELETE /api/v1/deals/views/{id}; needs deals.edit). Answers { success: true }. The deals themselves are untouched. A personal view only by its owner, a shared one by admins only; a system view cannot be deleted (403). 404 when the view does not exist. Not undoable.", { id: z.string().uuid().describe("Deal view UUID to delete") }, async ({ id }) => {
354
+ const result = await client.del(`/api/v1/deals/views/${encodeURIComponent(id)}`);
355
+ return formatResult(result);
356
+ }));
328
357
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conduyt-mcp",
3
- "version": "4.105.29",
3
+ "version": "4.105.31",
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,11 +1,11 @@
1
1
  {
2
- "generatedAt": "2026-11-14T23:17:44.183Z",
3
- "toolCount": 437,
4
- "totalEndpoints": 1214,
2
+ "generatedAt": "2026-11-15T21:05:27.836Z",
3
+ "toolCount": 442,
4
+ "totalEndpoints": 1215,
5
5
  "counts": {
6
- "covered": 386,
6
+ "covered": 391,
7
7
  "excluded": 374,
8
- "planned": 454,
8
+ "planned": 450,
9
9
  "uncategorized": 0
10
10
  },
11
11
  "matrix": {
@@ -551,6 +551,12 @@
551
551
  "conduyt_ai_improve_email"
552
552
  ]
553
553
  },
554
+ "POST /api/v1/ai/improve-sms": {
555
+ "status": "covered",
556
+ "tools": [
557
+ "conduyt_ai_improve_sms"
558
+ ]
559
+ },
554
560
  "GET /api/v1/ai/insights": {
555
561
  "status": "planned",
556
562
  "reason": "AI surfaces beyond chat/insights/tasks tools"
@@ -2791,20 +2797,28 @@
2791
2797
  ]
2792
2798
  },
2793
2799
  "POST /api/v1/deals/views": {
2794
- "status": "planned",
2795
- "reason": "deal subroutes beyond core CRUD (history, files, links)"
2800
+ "status": "covered",
2801
+ "tools": [
2802
+ "conduyt_create_deal_view"
2803
+ ]
2796
2804
  },
2797
2805
  "GET /api/v1/deals/views/:id": {
2798
- "status": "planned",
2799
- "reason": "deal subroutes beyond core CRUD (history, files, links)"
2806
+ "status": "covered",
2807
+ "tools": [
2808
+ "conduyt_get_deal_view"
2809
+ ]
2800
2810
  },
2801
2811
  "PATCH /api/v1/deals/views/:id": {
2802
- "status": "planned",
2803
- "reason": "deal subroutes beyond core CRUD (history, files, links)"
2812
+ "status": "covered",
2813
+ "tools": [
2814
+ "conduyt_update_deal_view"
2815
+ ]
2804
2816
  },
2805
2817
  "DELETE /api/v1/deals/views/:id": {
2806
- "status": "planned",
2807
- "reason": "deal subroutes beyond core CRUD (history, files, links)"
2818
+ "status": "covered",
2819
+ "tools": [
2820
+ "conduyt_delete_deal_view"
2821
+ ]
2808
2822
  },
2809
2823
  "GET /api/v1/dialer/agent-statuses": {
2810
2824
  "status": "covered",