conduyt-mcp 4.108.0 → 4.110.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.
@@ -66,6 +66,7 @@ import { registerBookingPageTools } from "./tools/booking-pages.js";
66
66
  import { registerReportTools } from "./tools/reports.js";
67
67
  import { registerReportDashboardTools } from "./tools/dashboards.js";
68
68
  import { registerDocumentReaderTools } from "./tools/document-reader.js";
69
+ import { registerRoutes66cTools } from "./tools/routes66c.js";
69
70
  /** Registers every Conduyt tool on the server; each tool gets its title + MCP annotations from src/tool-annotations.ts. */
70
71
  export function registerAllTools(server, client) {
71
72
  annotateRegistrations(server);
@@ -137,4 +138,5 @@ export function registerAllTools(server, client) {
137
138
  registerReportTools(server, client);
138
139
  registerReportDashboardTools(server, client);
139
140
  registerDocumentReaderTools(server, client);
141
+ registerRoutes66cTools(server, client);
140
142
  }
@@ -132,6 +132,24 @@ export const TOOL_ANNOTATIONS = {
132
132
  conduyt_get_dialer_settings: ro("Get Dialer Settings"),
133
133
  conduyt_update_dialer_settings: update("Update Dialer Settings"),
134
134
  conduyt_get_calling_hours: ro("Get Calling Hours"),
135
+ conduyt_get_call_late_link: ro("Get Call Late Link"),
136
+ // (parity66c) routes that had no tool: calendar connections / health / sync / events, mailbox connections, integrations health,
137
+ // the call log, the Twilio settings (non-credential fields), the duplicate contact groups
138
+ conduyt_list_calendar_connections: ro("List Calendar Connections"),
139
+ conduyt_get_calendar_health: ro("Get Calendar Health"),
140
+ conduyt_sync_calendar: create("Sync Calendar"), // reads the provider's events into Conduyt; each call is a new sync
141
+ conduyt_list_calendar_events: ro("List Calendar Events"),
142
+ conduyt_get_calendar_event: ro("Get Calendar Event"),
143
+ conduyt_create_calendar_event: create("Create Calendar Event"), // writes an event at the provider; a repeat makes another
144
+ conduyt_update_calendar_event: create("Update Calendar Event"), // NOT idempotent (Codex parity66c-r1): every successful PATCH calls the provider again and records another audit event
145
+ conduyt_delete_calendar_event: destroy("Delete Calendar Event"), // removes the event at the provider and in Conduyt
146
+ conduyt_list_mailbox_connections: ro("List Mailbox Connections"),
147
+ conduyt_get_integrations_health: ro("Get Integrations Health"),
148
+ conduyt_log_call: create("Log Call"), // records a call row (never dials); a repeat records another
149
+ conduyt_get_twilio_settings: ro("Get Twilio Settings"),
150
+ conduyt_update_twilio_settings: row("Update Twilio Settings", false, true, false), // destructive + not idempotent (Codex parity66c-r1): it can clear phoneNumber / twimlAppSid, release or rewire provider resources, and each save is audited; no credential is taken
151
+ conduyt_find_duplicate_contacts: ro("Find Duplicate Contacts"), // (callcontact66) GET /settings, the callLateLink block only
152
+ conduyt_update_call_late_link: update("Update Call Late Link"), // (callcontact66) PATCH /settings merges callLateLink; the same body lands on the same state; it links future calls only and deletes nothing
135
153
  conduyt_update_calling_hours: destroy("Update Calling Hours"), // enabled:false (with acknowledgeAnyHour) switches the calling-time check off, which re-enables outreach at any hour: a compliance change like the DNC removals; a repeat saves the same window
136
154
  conduyt_get_call_recording_settings: ro("Get Call Recording Settings"),
137
155
  conduyt_update_call_recording_settings: update("Update Call Recording Settings"),
@@ -68,7 +68,7 @@ export function registerBulkTools(server, client) {
68
68
  });
69
69
  return formatResult(result);
70
70
  });
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, {
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), last_attempt_after / last_attempt_before or no_attempt_days (the card's Last attempt, dealattempt66). Answer: { deals, meta { total, exported_at, filters_applied } } (each deal carries lastAttemptAt; the CSV export has a Last Attempt column just before Deal ID); 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
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
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."),
@@ -131,7 +131,7 @@ export function registerCallTools(server, client) {
131
131
  const result = await client.get(`/api/v1/dialer/calls?${searchQuery(args)}`);
132
132
  return formatResult(result);
133
133
  });
134
- server.tool("conduyt_count_unknown_callers", "Count a line's unknown callers since an instant (GET /api/v1/calls/unknown-callers, the toll-free quick mode counter: 'N unknown callers today, M not matched yet'). `total` = inbound calls to that line since `since` that arrived with no contact (still contact-less plus the ones the unknown-caller prompt linked since); `unmatched` = those still contact-less (list them with conduyt_search_dialer_history unmatched=true and line). `since` is the caller's start of day as an ISO instant and must be within the last 31 days. Refusals are 400 line_required, line_conflict, line_invalid, since_required, since_conflict, since_out_of_range. Read-only, counts only; requires dialer:view (a scoped member counts their own calls, contact-less calls and calls linked to a contact they can see).", {
134
+ server.tool("conduyt_count_unknown_callers", "Count a line's unknown callers since an instant (GET /api/v1/calls/unknown-callers, the toll-free quick mode counter: 'N unknown callers today, M not matched yet'). `total` = inbound calls to that line since `since` that arrived with no contact (still contact-less plus the ones the unknown-caller prompt linked since and, callcontact66, the ones the late link attached since: call_auto_linked, see conduyt_get_call_late_link); `unmatched` = those still contact-less (list them with conduyt_search_dialer_history unmatched=true and line). `since` is the caller's start of day as an ISO instant and must be within the last 31 days. Refusals are 400 line_required, line_conflict, line_invalid, since_required, since_conflict, since_out_of_range. Read-only, counts only; requires dialer:view (a scoped member counts their own calls, contact-less calls and calls linked to a contact they can see).", {
135
135
  line: z.string().trim().min(1).describe("Our line (the number the callers dialed), any formatting, e.g. +18005550199"),
136
136
  since: z.string().datetime({ offset: true }).describe("ISO instant, the caller's midnight, e.g. 2026-10-15T07:00:00.000Z; within the last 31 days"),
137
137
  }, async ({ line, since }) => {
@@ -188,7 +188,7 @@ export function registerContactTools(server, client) {
188
188
  company: z.string().optional().describe("Company name"),
189
189
  source: z.string().trim().min(1).max(100).optional().describe("Lead source (e.g. 'website', 'referral', 'import') — FIRST-WRITE-WINS acquisition truth for the lead; later inbound events do not overwrite it. 1-100 chars. Refused together with callId."),
190
190
  assignedTo: z.string().min(1).optional().describe("Owner (user ID) of the new lead. Refused together with callId: a lead made from a call is owned by the rep who took it."),
191
- masterStatus: z.string().trim().min(1).max(40).optional().describe("Lifecycle status of the LEAD (master record), distinct from any deal's status: 'open' (default), 'won', 'lost', 'abandoned', 'disqualified', or an account-defined custom status. A terminal status (won/lost/abandoned/disqualified) SILENCES all outbound automations for this contact — drips, sequences, and scheduled sends stop. Use conduyt_get_lifecycle_settings to see the account's configured statuses."),
191
+ masterStatus: z.string().trim().min(1).max(40).optional().describe("Lifecycle status of the LEAD (master record), distinct from any deal's status: 'open' (default), 'won', 'lost', 'abandoned', 'disqualified', or an account-defined custom status. A terminal status (won/lost/abandoned/disqualified) stops this contact's drips, sequences and playbooks; (wonmail66) automations, scheduled automation sends included, still act for a contact in any lead status (a workflow that must leave closed leads alone adds a contact.masterStatus condition). Consent (opt-out, DNC, litigator, GDPR forget) still applies everywhere. Use conduyt_get_lifecycle_settings to see the account's configured statuses."),
192
192
  tags: z.array(z.string()).optional().describe("Tag UUIDs to apply (tags must already exist — create them with conduyt_create_tag first)"),
193
193
  customFields: z.record(z.any()).optional().describe("Structured custom-field values keyed by field key, e.g. { lead_temperature: 'hot', budget: 50000 }. Define fields first with conduyt_create_custom_field (entity 'contact')."),
194
194
  custom_fields: z.record(z.any()).optional().describe("Alias for customFields (snake_case). Provide only one of customFields / custom_fields."),
@@ -220,7 +220,7 @@ export function registerContactTools(server, client) {
220
220
  assignedTo: z.string().trim().min(1).max(100).nullable().optional().describe("Reassign the lead: the new owner's user ID; null unassigns. The previous owner is released (they lose the lead unless something else explains their access) unless keepPreviousOwnerAsCollaborator is true."),
221
221
  keepPreviousOwnerAsCollaborator: z.boolean().optional().describe("With assignedTo set to another user: keep the previous owner as a collaborator of this contact (read-only access to the lead and its cards) instead of releasing them. Default false. Refused 400 without assignedTo in the same request."),
222
222
  source: z.string().trim().min(1).max(100).nullable().optional().describe("Correct the lead's first-touch source (normally first-write-wins and set at creation — update only to FIX bad attribution). Pass null to clear."),
223
- masterStatus: z.string().trim().min(1).max(40).optional().describe("Lifecycle status of the LEAD (master record), distinct from any deal's status: 'open' (default), 'won', 'lost', 'abandoned', 'disqualified', or an account-defined custom status. A terminal status (won/lost/abandoned/disqualified) SILENCES all outbound automations for this contact — drips, sequences, and scheduled sends stop. Use conduyt_get_lifecycle_settings to see the account's configured statuses."),
223
+ masterStatus: z.string().trim().min(1).max(40).optional().describe("Lifecycle status of the LEAD (master record), distinct from any deal's status: 'open' (default), 'won', 'lost', 'abandoned', 'disqualified', or an account-defined custom status. A terminal status (won/lost/abandoned/disqualified) stops this contact's drips, sequences and playbooks; (wonmail66) automations, scheduled automation sends included, still act for a contact in any lead status (a workflow that must leave closed leads alone adds a contact.masterStatus condition). Consent (opt-out, DNC, litigator, GDPR forget) still applies everywhere. Use conduyt_get_lifecycle_settings to see the account's configured statuses."),
224
224
  customFields: z.record(z.any()).optional().describe("Structured custom-field values to merge, keyed by field key. Omit a key to leave it unchanged."),
225
225
  custom_fields: z.record(z.any()).optional().describe("Alias for customFields (snake_case). Provide only one of customFields / custom_fields."),
226
226
  addTags: z.array(z.string().min(1)).max(100).optional().describe("Tags to add: tag NAMES or tag ids, at most 100. An unknown name is 400 unknown_tag_name, an unknown id 422 unknown_tag_id, more than 100 in a list 400 too_many_tags, the same tag in addTags and removeTags 400 tag_add_remove_conflict. A tag the contact already has is reported, not an error (tagChanges.unchanged.alreadyTagged)."),
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { ConduytApiError, formatResult } from "../client.js";
3
- import { USER_NOTE } from "./user-fields-doc.js";
3
+ import { NUMBER_DATE_TYPE_CHANGE_NOTE, USER_NOTE } from "./user-fields-doc.js";
4
4
  import { OPTIONS_CAP_NOTE, OPTIONS_MAX, TYPE_CHANGE_NOTE } from "./lender-options.js";
5
5
  import { REMOVE_NOTE, RESOLVE_NOTE, SEARCH_NOTE, SET_NOTE, STORE_LIST_NOTE, STORE_UPDATE_NOTE, optionRowSchema, setRowsProblem, storeCreateProblem, storeUpdateProblem, writeFlags, writeQuery } from "./store-options.js";
6
6
  import { CUSTOM_FIELD_TYPES, DELANCEY_ID_NOTE, fail, formulaCreateProblem, formulaUpdateProblem, FORMULA_DEFINITION_NOTE, FORMULA_EXPRESSION_NOTE, SECURE_IDENTIFIER_NOTE } from "./formula-fields.js";
@@ -54,7 +54,7 @@ export function registerCustomFieldTools(server, client) {
54
54
  const result = await client.post("/api/v1/custom-fields", { ...params, ...(store ?? {}) });
55
55
  return formatResult(result);
56
56
  });
57
- server.tool("conduyt_update_custom_field", "Update a custom field's label, options, required status, Secure flag or reveal set. Cannot change the field key or entity type. A FORMULA field's options (op / left / right / format, or expression / format: an expression the parser refuses is 400 formula_expression_invalid with reason and position), Secure flag and required flag are re-judged with its inputs locked: 422 formula_invalid, 422 formula_secure_input; a text field an expression formula reads cannot become a user field (409 field_type_change_refused naming the formulas); turning Secure on for a number field a non-Secure formula computes from is 409 formula_secure_input naming the formulas. A deal MIRROR (conduyt_create_mirror_field) takes only section and sortOrder; anything else answers 422 invalid_mirror_definition. Turning Secure OFF (isSecure false) makes every stored value visible and needs confirmUnsecure true, else 409 secure_unsecure_unconfirmed. " + SECURE_NOTE + " " + OPTIONS_CAP_NOTE + " " + TYPE_CHANGE_NOTE + " " + DELANCEY_ID_NOTE + " " + USER_NOTE + " " + STORE_UPDATE_NOTE, {
57
+ server.tool("conduyt_update_custom_field", "Update a custom field's label, options, required status, Secure flag or reveal set. Cannot change the field key or entity type. A FORMULA field's options (op / left / right / format, or expression / format: an expression the parser refuses is 400 formula_expression_invalid with reason and position), Secure flag and required flag are re-judged with its inputs locked: 422 formula_invalid, 422 formula_secure_input; a text field an expression formula reads cannot become a user field (409 field_type_change_refused naming the formulas); turning Secure on for a number field a non-Secure formula computes from is 409 formula_secure_input naming the formulas. A deal MIRROR (conduyt_create_mirror_field) takes only section and sortOrder; anything else answers 422 invalid_mirror_definition. Turning Secure OFF (isSecure false) makes every stored value visible and needs confirmUnsecure true, else 409 secure_unsecure_unconfirmed. " + SECURE_NOTE + " " + OPTIONS_CAP_NOTE + " " + TYPE_CHANGE_NOTE + " " + DELANCEY_ID_NOTE + " " + USER_NOTE + " " + STORE_UPDATE_NOTE + NUMBER_DATE_TYPE_CHANGE_NOTE, {
58
58
  id: z.string().describe("Custom field UUID"),
59
59
  label: z.string().optional().describe("Updated label"),
60
60
  section: z.string().max(120).nullable().optional().describe("Updated section grouping (null clears); the one place besides sortOrder a deal MIRROR can be edited"),
@@ -80,7 +80,7 @@ export function registerCustomFieldTools(server, client) {
80
80
  const result = await client.patch(`/api/v1/custom-fields/${id}`, { ...rest, ...(store ?? {}) });
81
81
  return formatResult(result);
82
82
  });
83
- server.tool("conduyt_delete_custom_field", "Delete a custom field definition. Removes the field from all entities. A field a formula computes from cannot be deleted: 409 deletion_blocked (the formula named in blockers). A contact / company field mirrored on deals cannot be deleted: 409 mirror_source_in_use { mirrors } (delete the deal mirrors first; deleting a mirror deletes only the placement, never the contact's value). A Secure field cannot be deleted: 409 secure_field_delete_refused (turn Secure off first with conduyt_update_custom_field isSecure false + confirmUnsecure true, then delete). A BDA-sized field can take longer than the server's impact budget to read: DELETE answers 503 custom_field_impact_timeout with Retry-After 5 (nothing was deleted: the transaction rolled back and no lock is held), a RETRYABLE answer: wait the Retry-After seconds and call this tool again (this tool does not replay a delete itself); if it keeps answering 503 after a few tries, stop and report the code. GET /api/v1/custom-fields/{id}/impact (the Settings delete preview) answers the same 503 (\"Impact preview timed out, the delete still works.\"). The same 503 also answers the delete's pre-check (the read that produces the 409 counts) and a dry run; nothing changes either way. The 409 with counts is unchanged." + " " + DELANCEY_ID_NOTE, {
83
+ server.tool("conduyt_delete_custom_field", "Delete a custom field definition. Removes the field from all entities. A field a formula computes from cannot be deleted: 409 deletion_blocked (the formula named in blockers). A contact / company field mirrored on deals cannot be deleted: 409 mirror_source_in_use { mirrors } (delete the deal mirrors first; deleting a mirror deletes only the placement, never the contact's value). A Secure field cannot be deleted: 409 secure_field_delete_refused (turn Secure off first with conduyt_update_custom_field isSecure false + confirmUnsecure true, then delete). A BDA-sized field can take longer than the server's impact budget to read: DELETE answers 503 custom_field_impact_timeout with Retry-After 5 (nothing was deleted: the transaction rolled back and no lock is held), a RETRYABLE answer: wait the Retry-After seconds and call this tool again (this tool does not replay a delete itself); if it keeps answering 503 after a few tries, stop and report the code. GET /api/v1/custom-fields/{id}/impact (the Settings delete preview) answers the same 503 (\"Impact preview timed out, the delete still works.\"). The same 503 also answers the delete's pre-check (the read that produces the 409 counts) and a dry run; nothing changes either way. The 409 with counts is unchanged." + " " + DELANCEY_ID_NOTE + NUMBER_DATE_TYPE_CHANGE_NOTE, {
84
84
  id: z.string().describe("Custom field UUID"),
85
85
  }, async ({ id }) => {
86
86
  const result = await client.del(`/api/v1/custom-fields/${id}`);
@@ -3,6 +3,23 @@ import { z } from "zod";
3
3
  /** the caps the API applies (conduyt-app lib/deal-filter-params.ts MAX_OWNER_FILTERS / MAX_TAG_FILTERS) */
4
4
  export declare const MAX_OWNER_FILTERS = 25;
5
5
  export declare const MAX_TAG_FILTERS = 25;
6
+ /** (dealattempt66, app lib/deal-attempt-filter.ts) the card's Last attempt filters GET /deals and GET /deals/export both read */
7
+ export declare const NO_ATTEMPT_DAYS_MAX = 3650;
8
+ /** the API's own sentence for the conflict (400 query_param_conflict); refused here before any request */
9
+ export declare const NO_ATTEMPT_DAYS_CONFLICT = "no_attempt_days cannot be combined with last_attempt_after or last_attempt_before.";
10
+ export declare const dealAttemptFilterShape: {
11
+ last_attempt_after: z.ZodOptional<z.ZodString>;
12
+ last_attempt_before: z.ZodOptional<z.ZodString>;
13
+ no_attempt_days: z.ZodOptional<z.ZodNumber>;
14
+ };
15
+ export declare const DEAL_ATTEMPT_DOC = " LAST ATTEMPT (dealattempt66): each deal carries lastAttemptAt (ISO or null, read-only): the newest outbound call, text or e-mail for THAT deal (the one it was made from via dealId on the send / call, else the contact's only open deal, else the sender's own open deals); kept about a minute after the attempt; null = no attempt since the field shipped (no history backfill). Filter with last_attempt_after / last_attempt_before or no_attempt_days.";
16
+ type AttemptFilters = {
17
+ last_attempt_after?: string;
18
+ last_attempt_before?: string;
19
+ no_attempt_days?: number;
20
+ };
21
+ /** appends the Last attempt filters (sent as given; the API judges the dates); the days filter with a bound is refused here */
22
+ export declare function appendDealAttemptFilters(qp: URLSearchParams, p: AttemptFilters): void;
6
23
  /** the extra GET /deals/export filters (the board's), beside search / status / pipeline / contact_timezone which the tool already had */
7
24
  export declare const dealExportFilterShape: {
8
25
  assigned_to: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -14,8 +31,11 @@ export declare const dealExportFilterShape: {
14
31
  needsAction: z.ZodOptional<z.ZodBoolean>;
15
32
  stale: z.ZodOptional<z.ZodBoolean>;
16
33
  health: z.ZodOptional<z.ZodString>;
34
+ last_attempt_after: z.ZodOptional<z.ZodString>;
35
+ last_attempt_before: z.ZodOptional<z.ZodString>;
36
+ no_attempt_days: z.ZodOptional<z.ZodNumber>;
17
37
  };
18
- type ExportFilters = {
38
+ type ExportFilters = AttemptFilters & {
19
39
  assigned_to?: string | string[];
20
40
  tag_ids?: string | string[];
21
41
  created_after?: string;
@@ -4,8 +4,30 @@ import { z } from "zod";
4
4
  export const MAX_OWNER_FILTERS = 25;
5
5
  export const MAX_TAG_FILTERS = 25;
6
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
+ /** (dealattempt66, app lib/deal-attempt-filter.ts) the card's Last attempt filters GET /deals and GET /deals/export both read */
8
+ export const NO_ATTEMPT_DAYS_MAX = 3650;
9
+ /** the API's own sentence for the conflict (400 query_param_conflict); refused here before any request */
10
+ export const NO_ATTEMPT_DAYS_CONFLICT = "no_attempt_days cannot be combined with last_attempt_after or last_attempt_before.";
11
+ export const dealAttemptFilterShape = {
12
+ last_attempt_after: z.string().optional().describe("(dealattempt66) Deals whose Last attempt (lastAttemptAt) is on or after this day: YYYY-MM-DD (from the start of that day in the account's time zone) or a full ISO 8601 datetime with offset; an invalid date is 400 invalid_last_attempt_range. Not with no_attempt_days"),
13
+ last_attempt_before: z.string().optional().describe("(dealattempt66) Deals whose Last attempt is on or before this day: YYYY-MM-DD (through the end of that day in the account's time zone) or a full ISO 8601 datetime with offset; same rules as last_attempt_after"),
14
+ no_attempt_days: z.number().int().min(1).max(NO_ATTEMPT_DAYS_MAX).optional().describe(`(dealattempt66) Deals with no attempt in the last N days (1 to ${NO_ATTEMPT_DAYS_MAX}), a deal never attempted included. Not with last_attempt_after / last_attempt_before (refused before any request; the API answers 400 query_param_conflict)`),
15
+ };
16
+ export const DEAL_ATTEMPT_DOC = " LAST ATTEMPT (dealattempt66): each deal carries lastAttemptAt (ISO or null, read-only): the newest outbound call, text or e-mail for THAT deal (the one it was made from via dealId on the send / call, else the contact's only open deal, else the sender's own open deals); kept about a minute after the attempt; null = no attempt since the field shipped (no history backfill). Filter with last_attempt_after / last_attempt_before or no_attempt_days.";
17
+ /** appends the Last attempt filters (sent as given; the API judges the dates); the days filter with a bound is refused here */
18
+ export function appendDealAttemptFilters(qp, p) {
19
+ if (p.no_attempt_days !== undefined && (p.last_attempt_after !== undefined || p.last_attempt_before !== undefined))
20
+ throw new Error(NO_ATTEMPT_DAYS_CONFLICT);
21
+ if (p.last_attempt_after !== undefined)
22
+ qp.set("last_attempt_after", p.last_attempt_after);
23
+ if (p.last_attempt_before !== undefined)
24
+ qp.set("last_attempt_before", p.last_attempt_before);
25
+ if (p.no_attempt_days !== undefined)
26
+ qp.set("no_attempt_days", String(p.no_attempt_days));
27
+ }
7
28
  /** the extra GET /deals/export filters (the board's), beside search / status / pipeline / contact_timezone which the tool already had */
8
29
  export const dealExportFilterShape = {
30
+ ...dealAttemptFilterShape,
9
31
  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
32
  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
33
  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"),
@@ -50,6 +72,7 @@ export function appendDealExportFilters(qp, p) {
50
72
  qp.set("stale", "true");
51
73
  if (p.health)
52
74
  qp.set("health", p.health);
75
+ appendDealAttemptFilters(qp, p);
53
76
  }
54
77
  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
78
  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).";
@@ -8,12 +8,14 @@ const UUID = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-
8
8
  const VIEW_ID_RE = new RegExp(`^(?:${DEALS_PAGE_VIEW_BUILTIN_IDS.join("|")}|${UUID})$`);
9
9
  const DATE_RE = /^(?:\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01]))?$/;
10
10
  const AMOUNT_RE = /^(?:\d{1,10}(?:\.\d{1,2})?)?$/;
11
+ /** (dealattempt66) "" or 1..3650 with no leading zero (the app's NO_ATTEMPT_DAYS_RE, lib/deal-views.ts) */
12
+ const NO_ATTEMPT_DAYS_RE = /^(?:|[1-9]\d{0,2}|[1-2]\d{3}|3[0-5]\d{2}|36[0-4]\d|3650)$/;
11
13
  /** the API's rules for one view (lib/validators/deal-views.ts at the app's dealviewsaved53 branch), mirrored so a bad body is refused before any request */
12
14
  const viewId = (what) => z.string().regex(VIEW_ID_RE, "a built-in id (all | open | mine | won | lost) or a view UUID").describe(what);
13
15
  const nameSchema = z.string().min(1).max(60).regex(/\S/, "not blank").describe("View name, 1-60 characters, not blank; one name per person (any case), built-in names taken");
14
16
  const statusSchema = z.enum(["all", "open", "won", "lost"]).describe("Which deals: all | open | won | lost");
15
17
  const sortSchema = z.object({
16
- field: z.enum(["name", "value", "closeDate", "created"]).describe("name | value | closeDate | created (a view with no sort opens on created, newest first)"),
18
+ field: z.enum(["name", "value", "closeDate", "created", "lastAttempt"]).describe("name | value | closeDate | created | lastAttempt (the card's Last attempt, dealattempt66; a view with no sort opens on created, newest first)"),
17
19
  dir: z.enum(["asc", "desc"]).describe("asc | desc"),
18
20
  }).strict();
19
21
  /** (dealviewsaved53 r6, Codex r5 P3) the API's own filter rules (the app's lib/deal-views parseDealViewFilters), refused before any
@@ -35,13 +37,22 @@ const filtersSchema = z.object({
35
37
  contactTimezones: noRepeats(z.array(z.enum(["eastern", "central", "mountain", "pacific", "alaska", "hawaii", "unknown"])).max(7)).optional().describe("The linked contact's time zone group: eastern | central | mountain | pacific | alaska | hawaii | unknown"),
36
38
  valueMin: z.string().regex(AMOUNT_RE, "an amount string, at most two decimals, or \"\"").optional().describe("Deal value at least, an amount STRING like \"5000\" or \"99.50\"; \"\" = no bound"),
37
39
  valueMax: z.string().regex(AMOUNT_RE, "an amount string, at most two decimals, or \"\"").optional().describe("Deal value at most, same form as valueMin (the API refuses min above max)"),
40
+ // (dealattempt66, app lib/deal-views.ts) the card's Last attempt: a day range, or none in the last N days; "" = no filter
41
+ attemptFrom: z.string().regex(DATE_RE, "YYYY-MM-DD or \"\"").refine(realDateOrBlank, "attemptFrom: a date (YYYY-MM-DD).").optional().describe("Last attempt on or after, YYYY-MM-DD; \"\" = no bound"),
42
+ attemptTo: z.string().regex(DATE_RE, "YYYY-MM-DD or \"\"").refine(realDateOrBlank, "attemptTo: a date (YYYY-MM-DD).").optional().describe("Last attempt on or before, YYYY-MM-DD; \"\" = no bound (the API refuses from after to)"),
43
+ noAttemptDays: z.string().regex(NO_ATTEMPT_DAYS_RE, "noAttemptDays: a whole number of days from 1 to 3650.").optional().describe("No attempt in the last N days, a whole number STRING \"1\"..\"3650\" (no leading zero), a deal never attempted included; \"\" = no filter; not with attemptFrom / attemptTo"),
38
44
  }).strict().superRefine((f, ctx) => {
39
45
  // (r6, Codex r5 P3) the API's cross-field rules (parseDealViewFilters): a range is never reversed
40
46
  if (f.createdFrom && f.createdTo && f.createdFrom > f.createdTo)
41
47
  ctx.addIssue({ code: z.ZodIssueCode.custom, message: "createdFrom is after createdTo", path: ["createdFrom"] });
42
48
  if (f.valueMin && f.valueMax && Number(f.valueMin) > Number(f.valueMax))
43
49
  ctx.addIssue({ code: z.ZodIssueCode.custom, message: "valueMin is above valueMax", path: ["valueMin"] });
44
- }).describe("The Deals page's filters (no other key): ownerIds, createdFrom, createdTo, tagIds, contactTimezones, valueMin, valueMax; every key optional");
50
+ // (dealattempt66) the API's two Last attempt rules (parseDealViewFilters)
51
+ if (f.attemptFrom && f.attemptTo && f.attemptFrom > f.attemptTo)
52
+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "attemptFrom is after attemptTo.", path: ["attemptFrom"] });
53
+ if (f.noAttemptDays && (f.attemptFrom || f.attemptTo))
54
+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "noAttemptDays cannot be combined with attemptFrom or attemptTo.", path: ["noAttemptDays"] });
55
+ }).describe("The Deals page's filters (no other key): ownerIds, createdFrom, createdTo, tagIds, contactTimezones, valueMin, valueMax, attemptFrom, attemptTo, noAttemptDays; every key optional");
45
56
  const VIEW_DOC = "A view is { id, name, builtin, status (all | open | won | lost), filters, listSort ({ field, dir } or null), savedListSort, shared, mine, canEdit, owner ({ id, name } or null), revision (16 hex characters, on every view but a built-in: the revision of what the view saves; pass it back as expectedRevision on an update), count? }. These are the Deals page's views, per person per workspace (needs deals.view); they are NOT the board's saved view tabs of conduyt_list_deal_views (GET /deals/views).";
46
57
  export function registerDealsPageViewTools(server, client) {
47
58
  strictInput(server.tool("conduyt_list_deals_page_views", "List the Deals page's saved views you see (GET /api/v1/deal-views): { views, defaultViewId, canShare }. The five built-ins come first in this order: all \"All deals\", open \"Open deals\", mine \"My deals\" (your own OPEN deals), won \"Won\", lost \"Lost and disqualified\"; then your own views and the views shared in the workspace. defaultViewId = the view the page opens on (your starred one, else all); canShare = whether you may share views (the Manager permission deals.view_all). With pipeline every view also carries count: its deals on that pipeline as GET /deals counts them for you (null when a count could not be read). Read-only. 400 invalid_pipeline (not a UUID), unknown_query_param, query_param_conflict. " + VIEW_DOC, { pipeline: z.string().uuid().optional().describe("Pipeline UUID: adds each view's count of deals on that pipeline") }, async ({ pipeline }) => {
@@ -7,7 +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
+ import { DEAL_ATTEMPT_DOC, DEAL_VIEW_AUDIENCE_DOC, DEAL_VIEW_RULES_DOC, appendDealAttemptFilters, dealAttemptFilterShape, dealViewFields } from "./deal-views.js";
11
11
  // (mirror1292, batch31 #1292 Ship 3) deal MIRROR fields: a write-through view of a contact / company field, named on the deal tools
12
12
  /** (parity64, app dealupdate63, live OpenAPI POST /imports importMode and ImportJobRead.unchangedRows) updating existing deals from the deal import */
13
13
  export const DEAL_IMPORT_UPDATE_DOC = " UPDATING deals (app dealupdate63): importMode create_and_update (the default when omitted) updates the deal a row's dealId names and creates the rows without one; update_only updates by dealId and never creates (a row without a dealId is not applied); create_only creates every row (a dealId is not read: the create behaviour above). The ONLY matching key is the Deal ID, the deal's UUID (from conduyt_list_deals, or the last column, Deal ID, of conduyt_export_deals); nothing else (title, contact) ever matches a deal. An update writes only the non-blank cells that differ from the deal (a blank cell keeps the stored value; there is no clear), through the same write as PATCH /deals/{id} (its validation, permission, row-level edit rule and side effects: deal.updated webhooks and automations, activities, mirrors, audit), so, unlike the create path, an update DOES fire them. It never changes the stage, pipeline or status (a differing cell is noted on the row, code stage_status_not_changed). A dealId that is malformed, unknown, of another account, deleted, or of a deal the importer may not edit: the row is not applied, with one note (the same text for each). A field value that cannot be applied is noted (code deal_field_not_applied) and the row's other fields still apply. A matched row with nothing to change is unchanged (no write, no event). A non-blank cell of a Secure custom field is always written, never compared, so the outcome never tells whether it matched the stored value. A mirrored field the linked record refuses is not applied (deal_field_not_applied) and the row's other fields still apply. The answer counts updatedRows and unchangedRows beside the created / skipped / duplicate counts (unchangedRows are also counted in skippedRows: skippedRows = failedRows + duplicateRows + unchangedRows on a deal import); stage_status_not_changed and deal_field_not_applied come back in errorLog like the other row notes. title and pipelineName are required only on a create row.";
@@ -63,7 +63,7 @@ function boardSnapshotColumns(a, f) {
63
63
  return a.board_columns.map((c) => (c.limit === undefined ? c.stageId : `${c.stageId}:${c.limit}`)).join(",");
64
64
  }
65
65
  export function registerDealTools(server, client) {
66
- strictInput(server.tool("conduyt_list_deals", "List deals with filtering by pipeline, stage, assignee, or status. Returns deal title, value, stage, contact, and dates. Paged: meta.has_more says whether another page exists; page by has_more, never by meta.total (the total can be left out). 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, {
66
+ strictInput(server.tool("conduyt_list_deals", "List deals with filtering by pipeline, stage, assignee, or status. Returns deal title, value, stage, contact, and dates. Paged: meta.has_more says whether another page exists; page by has_more, never by meta.total (the total can be left out). 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, last_attempt_after, last_attempt_before, no_attempt_days), 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 + DEAL_ATTEMPT_DOC + LIST_USERS_DOC, {
67
67
  pipeline: z.string().optional().describe("Filter by pipeline UUID (canonical). Aliases: pipelineId, pipeline_id."),
68
68
  pipelineId: z.string().optional().describe("Filter by pipeline UUID (alias of pipeline)."),
69
69
  pipeline_id: z.string().optional().describe("snake_case alias of pipelineId."),
@@ -83,7 +83,8 @@ export function registerDealTools(server, client) {
83
83
  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."),
84
84
  page: z.number().optional().describe("Page number (default 1)"),
85
85
  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)"),
86
- sort: z.enum(["createdAt", "updatedAt", "title", "value", "expectedCloseDate"]).optional().describe("Sort field (server default createdAt). A missing value / expectedCloseDate sorts last both ways under list_order. Without list_order the board's order (stage, card position) comes first and sort only breaks ties."),
86
+ ...dealAttemptFilterShape,
87
+ sort: z.enum(["createdAt", "updatedAt", "title", "value", "expectedCloseDate", "lastAttemptAt"]).optional().describe("Sort field (server default createdAt). lastAttemptAt = the card's Last attempt (dealattempt66; a deal never attempted sorts last both ways). A missing value / expectedCloseDate sorts last both ways under list_order. Without list_order the board's order (stage, card position) comes first and sort only breaks ties."),
87
88
  order: z.enum(["asc", "desc"]).optional().describe("Sort direction (server default desc)."),
88
89
  list_order: z.boolean().optional().describe("true: sort is the PRIMARY order of the whole filtered set (the Deals page's list: page 2 continues the same order across every stage), then id. Refused before any request with health_summary or board_snapshot (sort and order are refused with health_summary too; with board_snapshot they break ties in the board order and are sent)."),
89
90
  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."),
@@ -152,6 +153,7 @@ export function registerDealTools(server, client) {
152
153
  appendContactTimezone(params, a.contact_timezone);
153
154
  if (a.view_id !== undefined)
154
155
  params.set("view_id", a.view_id);
156
+ appendDealAttemptFilters(params, a);
155
157
  if (page)
156
158
  params.set("page", String(page));
157
159
  if (per_page)
@@ -41,4 +41,12 @@ export declare const CALLING_HOURS_ORDER_MESSAGE = "callingWindow.end must be af
41
41
  * settings revision, 403) are surfaced as it sends them.
42
42
  */
43
43
  export declare function registerCallingHoursTools(server: McpServer, client: ConduytClient): void;
44
+ /** (callcontact66, app lib/call-late-link.ts) the window's default and ceiling */
45
+ export declare const CALL_LATE_LINK_DEFAULT_WINDOW_MINUTES = 30;
46
+ export declare const CALL_LATE_LINK_MAX_WINDOW_MINUTES = 240;
47
+ /** settings.callLateLink as the server reads it (readCallLateLinkSettings): a non-integer window = the default, out of range = clamped */
48
+ export declare function callLateLinkOf(settings: unknown): {
49
+ windowMinutes: number;
50
+ sharedNumberRepDealRule: boolean;
51
+ };
44
52
  export {};
@@ -142,4 +142,29 @@ export function registerCallingHoursTools(server, client) {
142
142
  callingWindow.acknowledgeAnyHour = acknowledgeAnyHour;
143
143
  return patchGeneralSettings(client, { callingWindow });
144
144
  }));
145
+ // (callcontact66) the late link of calls saved with no contact: settings.callLateLink (app lib/call-late-link.ts)
146
+ server.tool("conduyt_get_call_late_link", `Read how calls saved with NO contact are linked later (settings.callLateLink, as the server reads it; GET /api/v1/settings): { callLateLink: { windowMinutes (minutes after a call ends during which a contactless call is still linked once its number has exactly one live contact, e.g. a contact a transfer form created while the call was in progress; default ${CALL_LATE_LINK_DEFAULT_WINDOW_MINUTES}, 0 = the late link is off, at most ${CALL_LATE_LINK_MAX_WINDOW_MINUTES}), sharedNumberRepDealRule (default false: a number several contacts share is never linked; true also links an ANSWERED INBOUND call on a shared number when exactly one of those contacts has an open deal assigned to the rep who answered and that rep can already open the contact) } }. A link writes a call_auto_linked activity on the contact. Change it with conduyt_update_call_late_link. API key scopes: settings.`, {}, async () => {
147
+ const result = (await client.get("/api/v1/settings"));
148
+ return formatResult({ data: { callLateLink: callLateLinkOf(result?.data) } });
149
+ });
150
+ strictInput(server.tool("conduyt_update_call_late_link", `Change how calls saved with no contact are linked later (PATCH /api/v1/settings { callLateLink: { windowMinutes?, sharedNumberRepDealRule? } }; owner or admin only, else 403 forbidden "Only an owner or admin can change how calls with no contact are linked later"). Only the keys sent change (the API merges them). windowMinutes: an integer 0 to ${CALL_LATE_LINK_MAX_WINDOW_MINUTES} (default ${CALL_LATE_LINK_DEFAULT_WINDOW_MINUTES}; 0 turns the late link off). sharedNumberRepDealRule: default false; true ALSO links an answered inbound call whose number several contacts share, inside the same window, but only when exactly one of those contacts has an open deal assigned to the rep who answered and that rep can already open the contact (a household line's call lands on the rep's client); otherwise it stays unlinked. Each link writes a call_auto_linked activity. Nothing to change is refused before any request. A stale settings revision is handed back as a conflict with the current settings. API key scopes: settings.`, {
151
+ windowMinutes: z.number().int().min(0).max(CALL_LATE_LINK_MAX_WINDOW_MINUTES).optional().describe(`minutes after a call ends, 0 to ${CALL_LATE_LINK_MAX_WINDOW_MINUTES} (0 = off; default ${CALL_LATE_LINK_DEFAULT_WINDOW_MINUTES})`),
152
+ sharedNumberRepDealRule: z.boolean().optional().describe("true = also link an answered inbound call on a shared number to the one contact with an open deal of the rep who answered (default false)"),
153
+ }, async ({ windowMinutes, sharedNumberRepDealRule }) => {
154
+ if (windowMinutes === undefined && sharedNumberRepDealRule === undefined) {
155
+ return { content: [{ type: "text", text: "Nothing to change: pass windowMinutes or sharedNumberRepDealRule." }], isError: true };
156
+ }
157
+ return patchGeneralSettings(client, { callLateLink: { ...(windowMinutes !== undefined ? { windowMinutes } : {}), ...(sharedNumberRepDealRule !== undefined ? { sharedNumberRepDealRule } : {}) } });
158
+ }));
159
+ }
160
+ /** (callcontact66, app lib/call-late-link.ts) the window's default and ceiling */
161
+ export const CALL_LATE_LINK_DEFAULT_WINDOW_MINUTES = 30;
162
+ export const CALL_LATE_LINK_MAX_WINDOW_MINUTES = 240;
163
+ /** settings.callLateLink as the server reads it (readCallLateLinkSettings): a non-integer window = the default, out of range = clamped */
164
+ export function callLateLinkOf(settings) {
165
+ const root = settings && typeof settings === "object" && !Array.isArray(settings) ? settings : {};
166
+ const b = root.callLateLink && typeof root.callLateLink === "object" && !Array.isArray(root.callLateLink) ? root.callLateLink : {};
167
+ const raw = b.windowMinutes;
168
+ const windowMinutes = typeof raw === "number" && Number.isInteger(raw) ? Math.min(CALL_LATE_LINK_MAX_WINDOW_MINUTES, Math.max(0, raw)) : CALL_LATE_LINK_DEFAULT_WINDOW_MINUTES;
169
+ return { windowMinutes, sharedNumberRepDealRule: b.sharedNumberRepDealRule === true };
145
170
  }
@@ -52,7 +52,7 @@ export async function patchGeneralSettingsMerged(client, build) {
52
52
  * Lifecycle v2 settings (master lead status + intake deals). The master lead
53
53
  * is the acquisition truth (first-write-wins source, one lifecycle status);
54
54
  * deals are per-trigger children with their own source and owner. A terminal
55
- * master status silences every outbound automation for that contact.
55
+ * master status stops the contact's drips, sequences and playbooks; (wonmail66) automations still act for a contact in any lead status.
56
56
  */
57
57
  const DEFAULT_MASTER_STATUSES = ["open", "won", "lost", "abandoned", "disqualified"];
58
58
  // Mirror of the API's masterStatuses validator (20 names max, 1-40 chars,
@@ -150,7 +150,7 @@ export function registerLifecycleTools(server, client) {
150
150
  strictInput(server.tool("conduyt_update_document_upload_bell", "Set settings.documentUploadBell (#1297, PATCH /api/v1/settings). true (the default): a file attached to a contact or a deal (by a teammate, an API key or the client on a booking page) rings the record owner's bell: the deal owner for a deal, the contact owner for a contact. false: no bell; the document.uploaded automation trigger still fires either way (automation config is free-form JSON). Read the current value with conduyt_get_lifecycle_settings (documentUploadBell). Requires settings:edit; a stale settings revision is handed back as a conflict with the current settings.", {
151
151
  enabled: z.boolean().describe("true = ring the record owner's bell on every document upload (default); false = no bell"),
152
152
  }, async ({ enabled }) => patchGeneralSettings(client, { documentUploadBell: enabled })));
153
- server.tool("conduyt_update_disposition_status_map", "Set which lead status each call disposition sets when it is picked (by a rep after a call or by the AI auto-disposition): e.g. {\"not-interested\": \"lost\", \"sale-closed\": \"won\", \"interested\": \"working\"}. Keys are disposition values (built-ins like interested, not-interested, callback-requested, appointment-set, sale-closed, dnc-requested, voicemail, no-answer, wrong-number, or the account's custom outcomes); values are master statuses (open, won, lost, abandoned, disqualified, or the account's customs from conduyt_update_master_statuses). The map REPLACES the stored map (send the full map; {} clears every mapping); the rest of the account's disposition settings are untouched. An unknown disposition or status is a 422. A lead a deal has WON is never moved by an outcome; mapping to a terminal status (won/lost/abandoned/disqualified) closes the lead and stops its automations. Read the current map with conduyt_get_lifecycle_settings (dispositionStatusMap).", {
153
+ server.tool("conduyt_update_disposition_status_map", "Set which lead status each call disposition sets when it is picked (by a rep after a call or by the AI auto-disposition): e.g. {\"not-interested\": \"lost\", \"sale-closed\": \"won\", \"interested\": \"working\"}. Keys are disposition values (built-ins like interested, not-interested, callback-requested, appointment-set, sale-closed, dnc-requested, voicemail, no-answer, wrong-number, or the account's custom outcomes); values are master statuses (open, won, lost, abandoned, disqualified, or the account's customs from conduyt_update_master_statuses). The map REPLACES the stored map (send the full map; {} clears every mapping); the rest of the account's disposition settings are untouched. An unknown disposition or status is a 422. A lead a deal has WON is never moved by an outcome; mapping to a terminal status (won/lost/abandoned/disqualified) closes the lead and stops its drips, sequences and playbooks (wonmail66: automations still act for a contact in any lead status; a workflow that must leave closed leads alone adds a contact.masterStatus condition). Read the current map with conduyt_get_lifecycle_settings (dispositionStatusMap).", {
154
154
  statusMap: z
155
155
  .record(z.string().trim().min(1).max(40), z.string().trim().min(1).max(40))
156
156
  .describe("Disposition value → master status, the complete map"),
@@ -172,7 +172,7 @@ export function registerLifecycleTools(server, client) {
172
172
  const nextHidden = hidden ?? stored.hidden ?? [];
173
173
  return patchGeneralSettings(client, { agentStatuses: { labels: nextLabels, hidden: nextHidden } });
174
174
  });
175
- server.tool("conduyt_update_master_statuses", "Set the account's custom lead lifecycle statuses. The five defaults (open, won, lost, abandoned, disqualified) always exist and cannot be removed; this REPLACES the custom list on top of them (max 20 names, 1-40 chars each, letters/numbers/spaces/-/_ only). Terminal statuses stop all outbound automation for a contact. Requires settings:edit.", {
175
+ server.tool("conduyt_update_master_statuses", "Set the account's custom lead lifecycle statuses. The five defaults (open, won, lost, abandoned, disqualified) always exist and cannot be removed; this REPLACES the custom list on top of them (max 20 names, 1-40 chars each, letters/numbers/spaces/-/_ only). Terminal statuses stop the contact's drips, sequences and playbooks (wonmail66: automations still act for a contact in any lead status; a workflow that must leave closed leads alone adds a contact.masterStatus condition). Requires settings:edit.", {
176
176
  statuses: z
177
177
  .array(masterStatusName)
178
178
  .max(20)
@@ -14,4 +14,6 @@ export declare function checkMessageError(err: unknown): {
14
14
  }>;
15
15
  isError: true;
16
16
  };
17
+ /** (dealattempt66) the optional deal link on the attempt writers (POST /messages/sms/send, /email/send, /messages; app lib/attempt-deal-link.ts) */
18
+ export declare const ATTEMPT_DEAL_ID_DOC = "(dealattempt66) The deal this is made from (as from the deal page): kept on the message only when it is a live deal of this account on this contact, else simply no link (never a refusal: any string up to 200 characters is accepted). The deal's lastAttemptAt counts the attempt through it (closed deals included); without one, the contact's only open deal, else the sender's own open deals.";
17
19
  export declare function registerMessagingTools(server: McpServer, client: ConduytClient): void;
@@ -18,6 +18,9 @@ export function checkMessageError(err) {
18
18
  }
19
19
  throw err;
20
20
  }
21
+ /** (dealattempt66) the optional deal link on the attempt writers (POST /messages/sms/send, /email/send, /messages; app lib/attempt-deal-link.ts) */
22
+ export const ATTEMPT_DEAL_ID_DOC = "(dealattempt66) The deal this is made from (as from the deal page): kept on the message only when it is a live deal of this account on this contact, else simply no link (never a refusal: any string up to 200 characters is accepted). The deal's lastAttemptAt counts the attempt through it (closed deals included); without one, the contact's only open deal, else the sender's own open deals.";
23
+ const attemptDealId = (extra = "") => z.string().max(200).nullable().optional().describe(ATTEMPT_DEAL_ID_DOC + extra);
21
24
  export function registerMessagingTools(server, client) {
22
25
  strictInput(server.tool("conduyt_check_message", "Grade a DRAFT text or email before it is sent (POST /api/v1/messages/check): the same check the contact composers run as the rep types (the conduyt.com checker engine). Answers { data: { score 0-100, grade A-F, verdict (e.g. 'Good to send', 'Edit these words first', \"Don't send\"), vclass, hits[], subjectHits[] (email), checks[], sms (a text's chars / segments / unicode / perSeg; null for an email), context, notices[] (SMS; informational), breakdown[] (the score's bands, offsets in code points like the hits), unicodeCulprits[] (SMS; the characters that force Unicode, positions in code points), cleaned (only when clean is true), englishDictionary ('loaded' | 'not_loaded', engine 2.2.1+), engine { version, updatedAt } } } (engine 2.2.1 today; any further field is additive). The final grade is only meaningful when englishDictionary is 'loaded' (the server embeds the dictionary, so it is): a result with any other value, or without the field, is provisional (the 'no recognizable English words' check did not run): show it as unavailable, never as a grade. Each hit: { start, end, word, level (r likely blocked, a risky, y caution, n heads up), label, cat, why, alts[] (safer wording; some entries are advice rather than a swap), restricted (prohibited in US business texting: no rewording makes it deliverable), rule }. start/end are Unicode CODE-POINT offsets into the submitted text (the body for hits, the subject for subjectHits), end exclusive; an emoji counts as one, so [...text].slice(start, end) in JavaScript or text[start:end] in Python is the word (not a UTF-16 index). The check EDUCATES and never blocks: nothing is stored and nothing is sent, it only suggests; merge tokens such as {{contact.firstName}} are never flagged. context: 'template' (default) grades it as a reusable message, 'first' is the first text to a contact, 'conversation' is a reply in an existing thread (engine 2.2.1: 'conversation' skips the SMS opt-out line and who-is-texting checks and the email fake \"Re:\" / \"Fwd:\" subject check, because a reply in an existing thread legitimately lacks them; 'template' and 'first' run all of them). To pick first vs conversation for a real contact read hasOutboundSms on conduyt_get_contact (hasOutboundEmail for an email). subject is email only (a subject on a text is refused 400 invalid_body). provider: 'twilio' (text only) words the notices in Twilio's own wording, as the composers show them; an email check with a provider is refused 400 invalid_body, and so is any other provider value (list the workspace's SMS providers with conduyt_list_sms_provider_options; only 'twilio' is a check wording today). clean: true adds `cleaned` { text, subject (email), changes[], skipped[] } or null: the cleaner's PROPOSAL, never stored or applied. Limits: body 10,000 characters, subject 300, request 48 KB; 20 checks per minute per account. Refusals are surfaced verbatim and never retried: 400 invalid_body, 403 forbidden, 413 message_too_long / body_too_large, 429 rate_limited (with Retry-After). Requires " +
23
26
  CHECK_MESSAGE_REQUIREMENT +
@@ -77,6 +80,7 @@ export function registerMessagingTools(server, client) {
77
80
  idempotencyKey: z.string().min(8).max(200).optional().describe("Operation key for at-most-once sends: reuse the SAME key when retrying a send whose outcome you did not see; a settled key answers with the original message and never sends twice."),
78
81
  invoiceId: z.string().uuid().optional().describe("Text it: this text sends an invoice. The contact must be the invoice's own and body must carry its hosted link (conduyt_get_invoice_send_options returns the exact text). Refusals are forwarded with their code and never retried: 409 invoice_send_pending (an earlier text awaits the provider's confirmation; nothing was sent again), invoice_not_sendable, no_contact, invoice_contact_mismatch; 400 invoice_link_missing; 404 invoice_not_found."),
79
82
  resend: z.boolean().optional().describe("With invoiceId: true texts the invoice again as a NEW send; omitted or false is the current send or its retry, never a second text."),
83
+ dealId: attemptDealId(),
80
84
  }, async (params) => {
81
85
  // (parity25 r2) resend goes on the wire only when true
82
86
  if (params.resend !== true)
@@ -93,6 +97,7 @@ export function registerMessagingTools(server, client) {
93
97
  replyTo: z.string().optional().describe("Reply-to email address"),
94
98
  cc: z.array(z.string()).optional().describe("CC email addresses"),
95
99
  bcc: z.array(z.string()).optional().describe("BCC email addresses"),
100
+ dealId: attemptDealId(),
96
101
  }, async (params) => {
97
102
  const result = await client.post("/api/v1/email/send", params);
98
103
  return formatResult(result);
@@ -155,6 +160,7 @@ export function registerMessagingTools(server, client) {
155
160
  providerId: z.string().optional().describe("That system's id for the message"),
156
161
  status: z.string().optional().describe("Message status, e.g. 'draft'"),
157
162
  scheduledAt: z.string().optional().describe("ISO date-time to send an outbound email later (needs a verified sending domain)"),
163
+ dealId: attemptDealId(" Outbound only: ignored on an inbound record."),
158
164
  }, async (params) => {
159
165
  const result = await client.post("/api/v1/messages", params);
160
166
  return formatResult(result);
@@ -0,0 +1,22 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { ConduytClient } from "../client.js";
3
+ /**
4
+ * (parity66c; app batch66 059fba9579: calquota66, dealattempt66, numfield66) routes that had no tool:
5
+ * - the calendar connections, their health, a sync, and the calendar events (GET|POST /calendar/events, GET|PATCH|DELETE
6
+ * /calendar/events/{id}); the mailbox connections; the integrations health. calquota66: a host's Outlook mailbox that is
7
+ * FULL answers 409 with the app's plain sentence (MAILBOX_FULL_MESSAGE) on a sync and an event write (DELETE: code mailbox_full
8
+ * with refusal), and the reads carry mailboxFull (connections, health, mailbox connections) and the health lines;
9
+ * - POST /calls (log a call; dealattempt66 dealId);
10
+ * - GET|PUT /settings/twilio (numfield66: the save answers 503 custom_field_catalog_busy with Retry-After 5 when switching
11
+ * line-type verification on finds the custom field catalog busy);
12
+ * - GET /contacts/duplicates (batch65 dupscan65: cursor paging, bounded counts, 503 duplicates_scan_timeout).
13
+ * Every refusal comes back as an error result with the API's status, code, sentence and details (apiRefusal), never retried.
14
+ */
15
+ /** the app's sentence for a full Outlook mailbox (lib/calendar/mailbox-full.ts MAILBOX_FULL_MESSAGE) */
16
+ export declare const MAILBOX_FULL_MESSAGE = "Your Outlook mailbox is full. Outlook can't save changes until you free up space, so calendar sync and e-mail are paused.";
17
+ /** the app's range-mode sentences (lib/calendar-range-mode.ts readRangeMode), refused here before any request */
18
+ export declare const CAL_ALL_NEEDS_RANGE = "all=1 needs start and end, once each";
19
+ export declare const CAL_ALL_NO_PAGE = "all=1 cannot be combined with page or after";
20
+ /** (numfield66) the busy answer of the Twilio settings save */
21
+ export declare const TWILIO_BUSY_DOC = "503 code custom_field_catalog_busy with Retry-After 5 (\"The custom field catalog is busy (a field is being created or imported): nothing was changed, try again in a moment\"): switching line-type verification on creates its Phone Verification contact fields, and the catalog was busy; nothing changed, retry after the Retry-After seconds";
22
+ export declare function registerRoutes66cTools(server: McpServer, client: ConduytClient): void;
@@ -0,0 +1,132 @@
1
+ import { z } from "zod";
2
+ import { formatResult } from "../client.js";
3
+ import { readerRefusal as apiRefusal } from "./document-reader.js";
4
+ import { strictInput } from "./strict.js";
5
+ import { ATTEMPT_DEAL_ID_DOC } from "./messaging.js";
6
+ import { writeFlags, writeQuery } from "./store-options.js";
7
+ /**
8
+ * (parity66c; app batch66 059fba9579: calquota66, dealattempt66, numfield66) routes that had no tool:
9
+ * - the calendar connections, their health, a sync, and the calendar events (GET|POST /calendar/events, GET|PATCH|DELETE
10
+ * /calendar/events/{id}); the mailbox connections; the integrations health. calquota66: a host's Outlook mailbox that is
11
+ * FULL answers 409 with the app's plain sentence (MAILBOX_FULL_MESSAGE) on a sync and an event write (DELETE: code mailbox_full
12
+ * with refusal), and the reads carry mailboxFull (connections, health, mailbox connections) and the health lines;
13
+ * - POST /calls (log a call; dealattempt66 dealId);
14
+ * - GET|PUT /settings/twilio (numfield66: the save answers 503 custom_field_catalog_busy with Retry-After 5 when switching
15
+ * line-type verification on finds the custom field catalog busy);
16
+ * - GET /contacts/duplicates (batch65 dupscan65: cursor paging, bounded counts, 503 duplicates_scan_timeout).
17
+ * Every refusal comes back as an error result with the API's status, code, sentence and details (apiRefusal), never retried.
18
+ */
19
+ /** the app's sentence for a full Outlook mailbox (lib/calendar/mailbox-full.ts MAILBOX_FULL_MESSAGE) */
20
+ export const MAILBOX_FULL_MESSAGE = "Your Outlook mailbox is full. Outlook can't save changes until you free up space, so calendar sync and e-mail are paused.";
21
+ const MAILBOX_FULL_DOC = ` A host whose Outlook mailbox is FULL (Microsoft refused to save: the customer's account state, not a Conduyt fault) answers 409 with the app's sentence "${MAILBOX_FULL_MESSAGE}"; nothing changed at the provider; retry after the host frees space.`;
22
+ const CALENDAR_SCOPE = " API key scopes: calendar.";
23
+ /** (parity66c r2) calendar writes run inside the app's sandbox wrapper: dry_run / sandbox are real query booleans (the provider call is skipped and recorded) */
24
+ const CAL_WRITE_FLAGS_DOC = " dryRun / sandbox send the route's dry_run / sandbox query booleans: the mutation runs in the app's sandbox (nothing is written at the provider or kept; the answer says what would have happened).";
25
+ /** the app's range-mode sentences (lib/calendar-range-mode.ts readRangeMode), refused here before any request */
26
+ export const CAL_ALL_NEEDS_RANGE = "all=1 needs start and end, once each";
27
+ export const CAL_ALL_NO_PAGE = "all=1 cannot be combined with page or after";
28
+ async function guarded(call) {
29
+ try {
30
+ return await call();
31
+ }
32
+ catch (err) {
33
+ const refusal = apiRefusal(err);
34
+ if (refusal)
35
+ return refusal;
36
+ throw err;
37
+ }
38
+ }
39
+ const attendee = z.object({ email: z.string().email(), name: z.string().optional() }).strict();
40
+ const isoInstant = z.string().min(1).describe("ISO 8601 date-time, e.g. 2026-12-01T15:00:00-05:00");
41
+ /** (numfield66) the busy answer of the Twilio settings save */
42
+ export const TWILIO_BUSY_DOC = "503 code custom_field_catalog_busy with Retry-After 5 (\"The custom field catalog is busy (a field is being created or imported): nothing was changed, try again in a moment\"): switching line-type verification on creates its Phone Verification contact fields, and the catalog was busy; nothing changed, retry after the Retry-After seconds";
43
+ export function registerRoutes66cTools(server, client) {
44
+ strictInput(server.tool("conduyt_list_calendar_connections", "List the calendar connections you may see (GET /api/v1/calendar/connections; calendar view; an owner or admin sees every connection of the workspace, anyone else only their own; inactive ones are included, see isActive): each { id, userId, provider (google | microsoft), providerEmail, calendarId, calendarName, lastSyncAt, isActive, createdAt, updatedAt, user, mailboxFull (calquota66: true when the host's Outlook mailbox answered full; the timestamp stays server-side), canManage (you may sync it and write its events) }, and canSyncAll (an admin may sync every connection)." + CALENDAR_SCOPE, {}, async () => guarded(async () => formatResult(await client.get("/api/v1/calendar/connections")))));
45
+ strictInput(server.tool("conduyt_get_calendar_health", `The calendar sync health (GET /api/v1/calendar/health; calendar view): { summary, connections, sideEffectIssues, webhookStatus }. Each connection carries status (healthy | warning | error), issues (plain lines; calquota66: a full Outlook mailbox is the FIRST line, the app's sentence "${MAILBOX_FULL_MESSAGE}", and it explains a stale sync after it), mailboxFull (true when the host's Outlook mailbox is full), its webhook health and canManage.` + CALENDAR_SCOPE, {}, async () => guarded(async () => formatResult(await client.get("/api/v1/calendar/health")))));
46
+ strictInput(server.tool("conduyt_sync_calendar", "Sync one calendar connection now, or every connection you may sync (POST /api/v1/calendar/sync { connectionId? }; calendar edit, active billing): reads the provider's events into Conduyt. A connection of another person needs calendar management (403 You can only sync your own calendar.); an unknown connection 404; an inactive one 400. Omitting connectionId (every connection) needs owner or admin authority." + CAL_WRITE_FLAGS_DOC + MAILBOX_FULL_DOC + CALENDAR_SCOPE, { connectionId: z.string().uuid().optional().describe("One connection (from conduyt_list_calendar_connections); omit for every connection you may sync (omitting it needs an owner or admin)"), ...writeFlags }, async ({ connectionId, dryRun, sandbox }) => guarded(async () => formatResult(await client.post("/api/v1/calendar/sync" + writeQuery({ dryRun, sandbox }), { ...(connectionId !== undefined ? { connectionId } : {}) })))));
47
+ strictInput(server.tool("conduyt_list_calendar_events", "List synced calendar events (GET /api/v1/calendar/events; calendar view), paged: { data, meta { page, per_page, total, has_more } }; page by has_more. start / end bound the window (ISO); connectionId limits it to one connection. all: true (range mode, needs BOTH start and end, no page) answers ONE consistent snapshot of the whole window as { data (a calendar projection: id, externalId, title, startAt, endAt, htmlLink, calendarConnection, metadata { conduytAppointmentId }), meta { complete, capped (rows | bytes | null), cap, byteCap, bytes, total } } instead of pages; meta.complete false = the window holds more than the cap, narrow it. The window must be ordered and at most 380 days (400 otherwise)." + CALENDAR_SCOPE, {
48
+ connectionId: z.string().uuid().optional(),
49
+ start: z.string().optional().describe("ISO 8601 start of the window"),
50
+ end: z.string().optional().describe("ISO 8601 end of the window"),
51
+ page: z.number().int().min(1).optional(),
52
+ per_page: z.number().int().min(1).max(500).optional().describe("1 to 500 (default 100)"),
53
+ all: z.boolean().optional().describe("Range mode: one snapshot of the whole start..end window (needs start and end; not with page); sends all=1"),
54
+ }, async ({ connectionId, start, end, page, per_page, all }) => guarded(async () => {
55
+ if (all === true) {
56
+ if (start === undefined || end === undefined)
57
+ return { content: [{ type: "text", text: CAL_ALL_NEEDS_RANGE }], isError: true };
58
+ if (page !== undefined)
59
+ return { content: [{ type: "text", text: CAL_ALL_NO_PAGE }], isError: true };
60
+ }
61
+ const params = new URLSearchParams();
62
+ if (all === true)
63
+ params.set("all", "1");
64
+ if (connectionId !== undefined)
65
+ params.set("connectionId", connectionId);
66
+ if (start !== undefined)
67
+ params.set("start", start);
68
+ if (end !== undefined)
69
+ params.set("end", end);
70
+ if (page !== undefined)
71
+ params.set("page", String(page));
72
+ if (per_page !== undefined)
73
+ params.set("per_page", String(per_page));
74
+ const qs = params.toString();
75
+ return formatResult(qs ? await client.get("/api/v1/calendar/events?" + qs) : await client.get("/api/v1/calendar/events"));
76
+ })));
77
+ strictInput(server.tool("conduyt_get_calendar_event", "Read one synced calendar event (GET /api/v1/calendar/events/{id}; calendar view). 404 for an unknown event." + CALENDAR_SCOPE, { id: z.string().uuid() }, async ({ id }) => guarded(async () => formatResult(await client.get(`/api/v1/calendar/events/${encodeURIComponent(id)}`)))));
78
+ strictInput(server.tool("conduyt_create_calendar_event", "Create an event on a connected calendar (POST /api/v1/calendar/events; calendar edit, active billing): it is written to the provider (Google / Outlook) and stored. Only on your own calendar unless you manage calendars (403 You can only create events on your own calendar.); 404 for an unknown or inactive connection; 400 \"connectionId, title, startAt, and endAt are required\"." + CAL_WRITE_FLAGS_DOC + MAILBOX_FULL_DOC + CALENDAR_SCOPE, {
79
+ connectionId: z.string().uuid().describe("The calendar connection (from conduyt_list_calendar_connections)"),
80
+ title: z.string().min(1),
81
+ startAt: isoInstant,
82
+ endAt: isoInstant,
83
+ description: z.string().optional(),
84
+ location: z.string().optional(),
85
+ allDay: z.boolean().optional(),
86
+ attendees: z.array(attendee).optional().describe("[{ email, name? }]"),
87
+ ...writeFlags,
88
+ }, async ({ dryRun, sandbox, ...params }) => guarded(async () => formatResult(await client.post("/api/v1/calendar/events" + writeQuery({ dryRun, sandbox }), params)))));
89
+ strictInput(server.tool("conduyt_update_calendar_event", "Change a calendar event (PATCH /api/v1/calendar/events/{id}; calendar edit, active billing): only the fields sent change, at the provider and in Conduyt. Only on your own calendar unless you manage calendars (403); 404 unknown; 400 when its connection is inactive. Not idempotent: every successful change is sent to the provider again and audited." + CAL_WRITE_FLAGS_DOC + MAILBOX_FULL_DOC + CALENDAR_SCOPE, {
90
+ id: z.string().uuid(),
91
+ title: z.string().min(1).optional(),
92
+ startAt: isoInstant.optional(),
93
+ endAt: isoInstant.optional(),
94
+ description: z.string().optional(),
95
+ location: z.string().optional(),
96
+ allDay: z.boolean().optional(),
97
+ attendees: z.array(attendee).optional(),
98
+ ...writeFlags,
99
+ }, async ({ id, dryRun, sandbox, ...updates }) => guarded(async () => {
100
+ if (Object.keys(updates).length === 0)
101
+ return { content: [{ type: "text", text: "Nothing to change: pass title, startAt, endAt, description, location, allDay or attendees." }], isError: true };
102
+ return formatResult(await client.patch(`/api/v1/calendar/events/${encodeURIComponent(id)}` + writeQuery({ dryRun, sandbox }), updates));
103
+ })));
104
+ strictInput(server.tool("conduyt_delete_calendar_event", `Delete a calendar event (DELETE /api/v1/calendar/events/{id}; calendar edit, active billing): removed at the provider, then in Conduyt. Answers { deleted }. When the provider does not confirm the delete the event is KEPT and flagged for review: 502 with code provider_error / provider_404 and { refusal }, or 409 with another refusal code; (calquota66) a full Outlook mailbox answers 409 code mailbox_full with { refusal } and the sentence "${MAILBOX_FULL_MESSAGE}" (the event is kept and flagged, as for any provider refusal). Only on your own calendar unless you manage calendars (403).` + CAL_WRITE_FLAGS_DOC + CALENDAR_SCOPE, { id: z.string().uuid(), ...writeFlags }, async ({ id, dryRun, sandbox }) => guarded(async () => formatResult(await client.del(`/api/v1/calendar/events/${encodeURIComponent(id)}` + writeQuery({ dryRun, sandbox }))))));
105
+ strictInput(server.tool("conduyt_list_mailbox_connections", "Your connected mailboxes (GET /api/v1/mailbox/connections; any signed-in user, your own only): { connections: [{ id, provider (microsoft | google), providerEmail, isActive, lastSyncAt, webhookExpiry, createdAt, mailboxFull (calquota66: true when a Microsoft mailbox answered full on its last Inbox walk; inbound mail sync is paused until space is freed) }], available { microsoft, google } }. API keys: at the pinned app (batch66) the route has no grantable API key scope (the path resolves to the ungrantable mailbox scope), so only a legacy unrestricted key can call it; a scoped key is refused until the app maps it.", {}, async () => guarded(async () => formatResult(await client.get("/api/v1/mailbox/connections")))));
106
+ strictInput(server.tool("conduyt_get_integrations_health", "The integrations health page (GET /api/v1/integrations/health; settings view): { summary, data: [{ key, status, issues, ... }] } for each integration (calendar, SMS providers, webhooks, Zapier, ...). (calquota66) the calendar entry's issues carry \"<N> Outlook mailbox(es) is / are full: calendar sync is paused until space is freed\", counting EVERY active connection of the workspace whose Outlook mailbox is full. API key scopes: integrations (a non-default scope).", {}, async () => guarded(async () => formatResult(await client.get("/api/v1/integrations/health")))));
107
+ strictInput(server.tool("conduyt_log_call", "Record a call on the timeline (POST /api/v1/calls; dialer create): a call made or taken outside the Conduyt dialer. source manual_log = a hand-logged call: contactId required (404 Contact not found otherwise), the numbers default to the contact's phone; any other source needs fromNumber and toNumber (400 fromNumber is required / toNumber is required). direction inbound | outbound (400 \"direction must be 'inbound' or 'outbound'\"); status \"unknown\" is refused 400 status_not_client_authored (only Conduyt releases a call as unknown). disposition is normalized to the workspace's outcomes. This writes a record only: it never dials anyone (placing a call is the dialer's, in the app). API key scopes: dialer (a non-default scope).", {
108
+ direction: z.enum(["inbound", "outbound"]),
109
+ contactId: z.string().uuid().optional().describe("The contact (required with source manual_log)"),
110
+ source: z.string().optional().describe("manual_log for a hand-logged call; else the system the call came through"),
111
+ fromNumber: z.string().optional().describe("Required unless source is manual_log"),
112
+ toNumber: z.string().optional().describe("Required unless source is manual_log"),
113
+ status: z.string().optional().describe("The call's status (e.g. completed, no-answer); never \"unknown\""),
114
+ duration: z.number().int().min(0).optional().describe("Seconds"),
115
+ disposition: z.string().optional().describe("The outcome (a built-in or the workspace's own)"),
116
+ notes: z.string().optional(),
117
+ dealId: z.string().max(200).optional().describe(ATTEMPT_DEAL_ID_DOC + " Outbound calls only."),
118
+ }, async (params) => guarded(async () => formatResult(await client.post("/api/v1/calls", params)))));
119
+ strictInput(server.tool("conduyt_find_duplicate_contacts", "Groups of live contacts that share an email (case-insensitive, trimmed) or a phone (GET /api/v1/contacts/duplicates; owners and admins only). Keyset paged: at most 50 groups a page, email groups then phone groups, each by key; every page reads a bounded window of each kind's keys, so a page may hold FEWER than 50 groups, or none, and still carry a nextCursor: follow nextCursor (pass it back as cursor, unchanged) until it is null. Answers { groups, total, totalGroups (a lower bound when totalGroupsCapped is present), nextCursor, truncated? (the 1,000-contact cap ended the page early) }. Every count is bounded: a group's memberCount stops at 1,000 (memberCountCapped: true, the group is partial: it lists its oldest 1,000 contacts and is never mergeable as a whole), a contact's _count values stop at 100 (_countCapped) and its tags at 100 (tagsCapped); each flag is absent when the value is exact. Emails and phones longer than 512 bytes are not grouped. 503 code duplicates_scan_timeout (Retry-After 5): the scan's budget stopped it, nothing changed, retry the same request (this tool never retries it for you: the 503 comes back as is, with its Retry-After). Merge a group with conduyt_merge_contacts. API key scopes: contacts.", { cursor: z.string().min(1).optional().describe("The previous page's nextCursor, unchanged; omit for the first page") }, async ({ cursor }) => guarded(async () => formatResult(await client.get("/api/v1/contacts/duplicates" + (cursor !== undefined ? "?cursor=" + encodeURIComponent(cursor) : ""), { noRetry: true })))));
120
+ strictInput(server.tool("conduyt_get_twilio_settings", "Read the workspace's Twilio settings (GET /api/v1/settings/twilio; settings view; 10 a minute): { status (connected | partial | not_configured), voiceStatus, lineTypeVerificationEnabled, skipLandlinesOnSms, accountSid, authToken, twimlAppSid, apiKey, apiSecret (each MASKED by the API to its last 4 characters), phoneNumber, voicemailGreeting, voiceUrl, hasGlobalFallback }. API key scopes: settings.", {}, async () => guarded(async () => formatResult(await client.get("/api/v1/settings/twilio")))));
121
+ strictInput(server.tool("conduyt_update_twilio_settings", `Change the workspace's Twilio settings that are not credentials (PUT /api/v1/settings/twilio; settings edit, active billing; 10 a minute): lineTypeVerificationEnabled (look up each new phone's line type on upload, through the workspace's own Twilio: it creates the Phone Verification contact fields; a tenant field on a reserved key is 409), skipLandlinesOnSms (skip SMS sends to a contact whose line type Twilio VERIFIED as a landline; recorded in the SMS delivery report), phoneNumber (the main line, E.164; moving it rewires the line's voice routing), twimlAppSid (AP + 32 hex), voicemailGreeting (at most 500 characters; null clears). Only the keys sent change. The credentials (accountSid, authToken, apiKey, apiSecret) are not taken by this tool: secrets are entered in the app (Settings, Twilio). Refusals: 400 with the API's validation sentence(s); ${TWILIO_BUSY_DOC}; 429 rate limited. API key scopes: settings.`, {
122
+ lineTypeVerificationEnabled: z.boolean().optional(),
123
+ skipLandlinesOnSms: z.boolean().optional(),
124
+ phoneNumber: z.string().regex(/^\+[1-9]\d{1,14}$/, "Phone number must be in E.164 format (e.g., +15551234567)").nullable().optional(),
125
+ twimlAppSid: z.string().regex(/^AP[0-9a-fA-F]{32}$/, "TwiML App SID must start with 'AP' followed by 32 hex characters").nullable().optional(),
126
+ voicemailGreeting: z.string().max(500).nullable().optional(),
127
+ }, async (params) => guarded(async () => {
128
+ if (Object.keys(params).length === 0)
129
+ return { content: [{ type: "text", text: "Nothing to change: pass lineTypeVerificationEnabled, skipLandlinesOnSms, phoneNumber, twimlAppSid or voicemailGreeting." }], isError: true };
130
+ return formatResult(await client.put("/api/v1/settings/twilio", params));
131
+ })));
132
+ }
@@ -10,3 +10,5 @@ export declare const EVENT_USERS_DOC = " In a deal.*, contact.* or company.* eve
10
10
  export declare const WEBHOOK_NAME_TAG_DOC = " In a webhook action body, {{deal.custom_name.<key>}} renders the NAME of the member a non-Secure deal user field holds ({{deal.custom.<key>}} stays the stored user id; empty when the value names no member).";
11
11
  export declare const REPLY_USERS_DOC = " Each contact, deal or company record returned with its customFields also carries customFieldUsers: { userId: display name } for each user id its customFields answer in a non-Secure user field (on a deal, also in a field that mirrors a non-Secure contact or company user field) that resolves to a current or former member of the workspace (a removed member keeps their name), and {} when no answered id resolves; a masked Secure value is never named. A reply with no record, or a record marked _degraded (its read could not be completed), carries no customFieldUsers.";
12
12
  export declare const ANSWER_USERS_DOC = " Deal / contact / company records inside the answer carry customFieldUsers ({ userId: name }) for their non-Secure user fields that name a member, beside the stored ids (absent when nothing resolves).";
13
+ /** (numfield66) the text -> number / date type change: an app-only (signed-in owner / admin) action; what PATCH / DELETE answer meanwhile */
14
+ export declare const NUMBER_DATE_TYPE_CHANGE_NOTE = " (numfield66) Changing a TEXT field into a NUMBER or DATE field (a preview with counts, examples, dependencies and a token, then a background job that converts every stored value, with rollback and resume: GET /custom-fields/{id}/type-change/preview, POST /custom-fields/{id}/type-change, GET /custom-fields/{id}/type-change, POST .../rollback, POST .../resume) is a signed-in owner / admin action in the app only (Settings, Custom Fields, edit, Change type): an API key or an AI teammate is refused 403 field_type_change_forbidden, so there is no tool for it. While such a change of the field is queued, running or failed, PATCH answers 409 field_type_change_in_progress for anything but label, section and sortOrder, and DELETE answers 409 field_type_change_in_progress. A number field's value is a JSON number (legacy numeric strings may still appear), a date field's a YYYY-MM-DD string.";
@@ -12,3 +12,5 @@ export const EVENT_USERS_DOC = " In a deal.*, contact.* or company.* event body,
12
12
  export const WEBHOOK_NAME_TAG_DOC = " In a webhook action body, {{deal.custom_name.<key>}} renders the NAME of the member a non-Secure deal user field holds ({{deal.custom.<key>}} stays the stored user id; empty when the value names no member).";
13
13
  export const REPLY_USERS_DOC = RECORD_USERS_RULE;
14
14
  export const ANSWER_USERS_DOC = " Deal / contact / company records inside the answer carry customFieldUsers ({ userId: name }) for their non-Secure user fields that name a member, beside the stored ids (absent when nothing resolves).";
15
+ /** (numfield66) the text -> number / date type change: an app-only (signed-in owner / admin) action; what PATCH / DELETE answer meanwhile */
16
+ export const NUMBER_DATE_TYPE_CHANGE_NOTE = " (numfield66) Changing a TEXT field into a NUMBER or DATE field (a preview with counts, examples, dependencies and a token, then a background job that converts every stored value, with rollback and resume: GET /custom-fields/{id}/type-change/preview, POST /custom-fields/{id}/type-change, GET /custom-fields/{id}/type-change, POST .../rollback, POST .../resume) is a signed-in owner / admin action in the app only (Settings, Custom Fields, edit, Change type): an API key or an AI teammate is refused 403 field_type_change_forbidden, so there is no tool for it. While such a change of the field is queued, running or failed, PATCH answers 409 field_type_change_in_progress for anything but label, section and sortOrder, and DELETE answers 409 field_type_change_in_progress. A number field's value is a JSON number (legacy numeric strings may still appear), a date field's a YYYY-MM-DD string.";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conduyt-mcp",
3
- "version": "4.108.0",
3
+ "version": "4.110.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",
@@ -25,6 +25,11 @@
25
25
  "status": "excluded",
26
26
  "reason": "session-only by design (#1292 Ship 1): the Secure custom field reveal refuses an API key (403 reveal_requires_session) and this server signs in with one, so a tool could only ever answer 403; reads stay masked"
27
27
  },
28
+ {
29
+ "match": "/api/v1/custom-fields/:id/type-change",
30
+ "status": "excluded",
31
+ "reason": "(numfield66) session-only by design, as the #1303 / #1307 type changes: the text -> number / date change, its preview, status read, rollback and resume refuse an API key and an AI teammate (403 field_type_change_forbidden, lib/custom-field-type-change-convert-http.ts typeChangeSessionRefusal) and this server signs in with one; conduyt_update_custom_field / conduyt_delete_custom_field document the app-only action and the 409 field_type_change_in_progress"
32
+ },
28
33
  {
29
34
  "match": "GET /api/v1/call-flows/functions/:id",
30
35
  "status": "planned",
@@ -115,6 +120,11 @@
115
120
  "status": "excluded",
116
121
  "reason": "streams call audio bytes (recording / voicemail, optional Content-Disposition download); a binary stream does not belong in a tool result. conduyt_search_dialer_history / conduyt_search_dialer_calls document the URL and the auth header; the CLI downloads it"
117
122
  },
123
+ {
124
+ "match": "POST /api/v1/dialer/call",
125
+ "status": "excluded",
126
+ "reason": "(parity66c review) placing a call: the JSON request dials the LEAD at once (the customer leg joins a conference on hold, or a vendor leg rings) and waits for the rep's browser softphone leg to start it; a key-only caller has no audio leg, so a tool would ring a real person into silence. Its dealattempt66 dealId therefore reaches no tool; a call made elsewhere is recorded with conduyt_log_call (POST /calls, which takes dealId)"
127
+ },
118
128
  {
119
129
  "match": "/api/v1/dialer/",
120
130
  "status": "excluded",
@@ -1,11 +1,11 @@
1
1
  {
2
- "generatedAt": "2026-11-26T12:42:25.096Z",
3
- "toolCount": 463,
4
- "totalEndpoints": 1239,
2
+ "generatedAt": "2026-11-26T20:26:56.356Z",
3
+ "toolCount": 479,
4
+ "totalEndpoints": 1245,
5
5
  "counts": {
6
- "covered": 410,
7
- "excluded": 378,
8
- "planned": 451,
6
+ "covered": 424,
7
+ "excluded": 384,
8
+ "planned": 437,
9
9
  "uncategorized": 0
10
10
  },
11
11
  "matrix": {
@@ -1180,8 +1180,10 @@
1180
1180
  "reason": "calendar/booking management beyond current appointment tools"
1181
1181
  },
1182
1182
  "GET /api/v1/calendar/connections": {
1183
- "status": "planned",
1184
- "reason": "calendar/booking management beyond current appointment tools"
1183
+ "status": "covered",
1184
+ "tools": [
1185
+ "conduyt_list_calendar_connections"
1186
+ ]
1185
1187
  },
1186
1188
  "GET /api/v1/calendar/connections/:id": {
1187
1189
  "status": "planned",
@@ -1192,32 +1194,46 @@
1192
1194
  "reason": "calendar/booking management beyond current appointment tools"
1193
1195
  },
1194
1196
  "GET /api/v1/calendar/events": {
1195
- "status": "planned",
1196
- "reason": "calendar/booking management beyond current appointment tools"
1197
+ "status": "covered",
1198
+ "tools": [
1199
+ "conduyt_list_calendar_events"
1200
+ ]
1197
1201
  },
1198
1202
  "POST /api/v1/calendar/events": {
1199
- "status": "planned",
1200
- "reason": "calendar/booking management beyond current appointment tools"
1203
+ "status": "covered",
1204
+ "tools": [
1205
+ "conduyt_create_calendar_event"
1206
+ ]
1201
1207
  },
1202
1208
  "GET /api/v1/calendar/events/:id": {
1203
- "status": "planned",
1204
- "reason": "calendar/booking management beyond current appointment tools"
1209
+ "status": "covered",
1210
+ "tools": [
1211
+ "conduyt_get_calendar_event"
1212
+ ]
1205
1213
  },
1206
1214
  "PATCH /api/v1/calendar/events/:id": {
1207
- "status": "planned",
1208
- "reason": "calendar/booking management beyond current appointment tools"
1215
+ "status": "covered",
1216
+ "tools": [
1217
+ "conduyt_update_calendar_event"
1218
+ ]
1209
1219
  },
1210
1220
  "DELETE /api/v1/calendar/events/:id": {
1211
- "status": "planned",
1212
- "reason": "calendar/booking management beyond current appointment tools"
1221
+ "status": "covered",
1222
+ "tools": [
1223
+ "conduyt_delete_calendar_event"
1224
+ ]
1213
1225
  },
1214
1226
  "GET /api/v1/calendar/health": {
1215
- "status": "planned",
1216
- "reason": "calendar/booking management beyond current appointment tools"
1227
+ "status": "covered",
1228
+ "tools": [
1229
+ "conduyt_get_calendar_health"
1230
+ ]
1217
1231
  },
1218
1232
  "POST /api/v1/calendar/sync": {
1219
- "status": "planned",
1220
- "reason": "calendar/booking management beyond current appointment tools"
1233
+ "status": "covered",
1234
+ "tools": [
1235
+ "conduyt_sync_calendar"
1236
+ ]
1221
1237
  },
1222
1238
  "POST /api/v1/calendar/webhooks/google": {
1223
1239
  "status": "planned",
@@ -1394,8 +1410,10 @@
1394
1410
  ]
1395
1411
  },
1396
1412
  "POST /api/v1/calls": {
1397
- "status": "planned",
1398
- "reason": "call subroutes beyond list/log"
1413
+ "status": "covered",
1414
+ "tools": [
1415
+ "conduyt_log_call"
1416
+ ]
1399
1417
  },
1400
1418
  "GET /api/v1/calls/:id": {
1401
1419
  "status": "covered",
@@ -1963,8 +1981,10 @@
1963
1981
  "reason": "contact subroutes beyond the core CRUD/search tools"
1964
1982
  },
1965
1983
  "GET /api/v1/contacts/duplicates": {
1966
- "status": "planned",
1967
- "reason": "contact subroutes beyond the core CRUD/search tools"
1984
+ "status": "covered",
1985
+ "tools": [
1986
+ "conduyt_find_duplicate_contacts"
1987
+ ]
1968
1988
  },
1969
1989
  "GET /api/v1/contacts/export": {
1970
1990
  "status": "covered",
@@ -2154,6 +2174,10 @@
2154
2174
  "status": "excluded",
2155
2175
  "reason": "CRON_SECRET-gated infrastructure jobs; never key-callable"
2156
2176
  },
2177
+ "GET /api/v1/cron/late-link-calls": {
2178
+ "status": "excluded",
2179
+ "reason": "CRON_SECRET-gated infrastructure jobs; never key-callable"
2180
+ },
2157
2181
  "GET /api/v1/cron/lead-pool-push": {
2158
2182
  "status": "excluded",
2159
2183
  "reason": "CRON_SECRET-gated infrastructure jobs; never key-callable"
@@ -2603,6 +2627,26 @@
2603
2627
  "conduyt_resolve_custom_field_options"
2604
2628
  ]
2605
2629
  },
2630
+ "GET /api/v1/custom-fields/:id/type-change": {
2631
+ "status": "excluded",
2632
+ "reason": "(numfield66) session-only by design, as the #1303 / #1307 type changes: the text -> number / date change, its preview, status read, rollback and resume refuse an API key and an AI teammate (403 field_type_change_forbidden, lib/custom-field-type-change-convert-http.ts typeChangeSessionRefusal) and this server signs in with one; conduyt_update_custom_field / conduyt_delete_custom_field document the app-only action and the 409 field_type_change_in_progress"
2633
+ },
2634
+ "POST /api/v1/custom-fields/:id/type-change": {
2635
+ "status": "excluded",
2636
+ "reason": "(numfield66) session-only by design, as the #1303 / #1307 type changes: the text -> number / date change, its preview, status read, rollback and resume refuse an API key and an AI teammate (403 field_type_change_forbidden, lib/custom-field-type-change-convert-http.ts typeChangeSessionRefusal) and this server signs in with one; conduyt_update_custom_field / conduyt_delete_custom_field document the app-only action and the 409 field_type_change_in_progress"
2637
+ },
2638
+ "GET /api/v1/custom-fields/:id/type-change/preview": {
2639
+ "status": "excluded",
2640
+ "reason": "(numfield66) session-only by design, as the #1303 / #1307 type changes: the text -> number / date change, its preview, status read, rollback and resume refuse an API key and an AI teammate (403 field_type_change_forbidden, lib/custom-field-type-change-convert-http.ts typeChangeSessionRefusal) and this server signs in with one; conduyt_update_custom_field / conduyt_delete_custom_field document the app-only action and the 409 field_type_change_in_progress"
2641
+ },
2642
+ "POST /api/v1/custom-fields/:id/type-change/resume": {
2643
+ "status": "excluded",
2644
+ "reason": "(numfield66) session-only by design, as the #1303 / #1307 type changes: the text -> number / date change, its preview, status read, rollback and resume refuse an API key and an AI teammate (403 field_type_change_forbidden, lib/custom-field-type-change-convert-http.ts typeChangeSessionRefusal) and this server signs in with one; conduyt_update_custom_field / conduyt_delete_custom_field document the app-only action and the 409 field_type_change_in_progress"
2645
+ },
2646
+ "POST /api/v1/custom-fields/:id/type-change/rollback": {
2647
+ "status": "excluded",
2648
+ "reason": "(numfield66) session-only by design, as the #1303 / #1307 type changes: the text -> number / date change, its preview, status read, rollback and resume refuse an API key and an AI teammate (403 field_type_change_forbidden, lib/custom-field-type-change-convert-http.ts typeChangeSessionRefusal) and this server signs in with one; conduyt_update_custom_field / conduyt_delete_custom_field document the app-only action and the 409 field_type_change_in_progress"
2649
+ },
2606
2650
  "GET /api/v1/custom-fields/cleanup-jobs": {
2607
2651
  "status": "planned",
2608
2652
  "reason": "custom field admin beyond read"
@@ -2904,7 +2948,7 @@
2904
2948
  },
2905
2949
  "POST /api/v1/dialer/call": {
2906
2950
  "status": "excluded",
2907
- "reason": "realtime browser dialer (WebRTC tokens, live call control) — needs a live audio session"
2951
+ "reason": "(parity66c review) placing a call: the JSON request dials the LEAD at once (the customer leg joins a conference on hold, or a vendor leg rings) and waits for the rep's browser softphone leg to start it; a key-only caller has no audio leg, so a tool would ring a real person into silence. Its dealattempt66 dealId therefore reaches no tool; a call made elsewhere is recorded with conduyt_log_call (POST /calls, which takes dealId)"
2908
2952
  },
2909
2953
  "GET /api/v1/dialer/call/:id": {
2910
2954
  "status": "excluded",
@@ -2924,15 +2968,15 @@
2924
2968
  },
2925
2969
  "POST /api/v1/dialer/call/:id/facetime-status": {
2926
2970
  "status": "excluded",
2927
- "reason": "realtime browser dialer (WebRTC tokens, live call control) — needs a live audio session"
2971
+ "reason": "(parity66c review) placing a call: the JSON request dials the LEAD at once (the customer leg joins a conference on hold, or a vendor leg rings) and waits for the rep's browser softphone leg to start it; a key-only caller has no audio leg, so a tool would ring a real person into silence. Its dealattempt66 dealId therefore reaches no tool; a call made elsewhere is recorded with conduyt_log_call (POST /calls, which takes dealId)"
2928
2972
  },
2929
2973
  "POST /api/v1/dialer/call/:id/hangup": {
2930
2974
  "status": "excluded",
2931
- "reason": "realtime browser dialer (WebRTC tokens, live call control) — needs a live audio session"
2975
+ "reason": "(parity66c review) placing a call: the JSON request dials the LEAD at once (the customer leg joins a conference on hold, or a vendor leg rings) and waits for the rep's browser softphone leg to start it; a key-only caller has no audio leg, so a tool would ring a real person into silence. Its dealattempt66 dealId therefore reaches no tool; a call made elsewhere is recorded with conduyt_log_call (POST /calls, which takes dealId)"
2932
2976
  },
2933
2977
  "POST /api/v1/dialer/call/:id/hold": {
2934
2978
  "status": "excluded",
2935
- "reason": "realtime browser dialer (WebRTC tokens, live call control) — needs a live audio session"
2979
+ "reason": "(parity66c review) placing a call: the JSON request dials the LEAD at once (the customer leg joins a conference on hold, or a vendor leg rings) and waits for the rep's browser softphone leg to start it; a key-only caller has no audio leg, so a tool would ring a real person into silence. Its dealattempt66 dealId therefore reaches no tool; a call made elsewhere is recorded with conduyt_log_call (POST /calls, which takes dealId)"
2936
2980
  },
2937
2981
  "GET /api/v1/dialer/call/:id/media": {
2938
2982
  "status": "excluded",
@@ -2940,7 +2984,7 @@
2940
2984
  },
2941
2985
  "POST /api/v1/dialer/call/:id/mute": {
2942
2986
  "status": "excluded",
2943
- "reason": "realtime browser dialer (WebRTC tokens, live call control) — needs a live audio session"
2987
+ "reason": "(parity66c review) placing a call: the JSON request dials the LEAD at once (the customer leg joins a conference on hold, or a vendor leg rings) and waits for the rep's browser softphone leg to start it; a key-only caller has no audio leg, so a tool would ring a real person into silence. Its dealattempt66 dealId therefore reaches no tool; a call made elsewhere is recorded with conduyt_log_call (POST /calls, which takes dealId)"
2944
2988
  },
2945
2989
  "GET /api/v1/dialer/call/:id/participants": {
2946
2990
  "status": "excluded",
@@ -2948,7 +2992,7 @@
2948
2992
  },
2949
2993
  "POST /api/v1/dialer/call/:id/participants": {
2950
2994
  "status": "excluded",
2951
- "reason": "realtime browser dialer (WebRTC tokens, live call control) — needs a live audio session"
2995
+ "reason": "(parity66c review) placing a call: the JSON request dials the LEAD at once (the customer leg joins a conference on hold, or a vendor leg rings) and waits for the rep's browser softphone leg to start it; a key-only caller has no audio leg, so a tool would ring a real person into silence. Its dealattempt66 dealId therefore reaches no tool; a call made elsewhere is recorded with conduyt_log_call (POST /calls, which takes dealId)"
2952
2996
  },
2953
2997
  "PATCH /api/v1/dialer/call/:id/participants/:participantSid": {
2954
2998
  "status": "excluded",
@@ -2966,11 +3010,11 @@
2966
3010
  },
2967
3011
  "POST /api/v1/dialer/call/:id/record": {
2968
3012
  "status": "excluded",
2969
- "reason": "realtime browser dialer (WebRTC tokens, live call control) — needs a live audio session"
3013
+ "reason": "(parity66c review) placing a call: the JSON request dials the LEAD at once (the customer leg joins a conference on hold, or a vendor leg rings) and waits for the rep's browser softphone leg to start it; a key-only caller has no audio leg, so a tool would ring a real person into silence. Its dealattempt66 dealId therefore reaches no tool; a call made elsewhere is recorded with conduyt_log_call (POST /calls, which takes dealId)"
2970
3014
  },
2971
3015
  "POST /api/v1/dialer/call/:id/supervise": {
2972
3016
  "status": "excluded",
2973
- "reason": "realtime browser dialer (WebRTC tokens, live call control) — needs a live audio session"
3017
+ "reason": "(parity66c review) placing a call: the JSON request dials the LEAD at once (the customer leg joins a conference on hold, or a vendor leg rings) and waits for the rep's browser softphone leg to start it; a key-only caller has no audio leg, so a tool would ring a real person into silence. Its dealattempt66 dealId therefore reaches no tool; a call made elsewhere is recorded with conduyt_log_call (POST /calls, which takes dealId)"
2974
3018
  },
2975
3019
  "DELETE /api/v1/dialer/call/:id/supervise": {
2976
3020
  "status": "excluded",
@@ -2978,15 +3022,15 @@
2978
3022
  },
2979
3023
  "POST /api/v1/dialer/call/:id/transfer": {
2980
3024
  "status": "excluded",
2981
- "reason": "realtime browser dialer (WebRTC tokens, live call control) — needs a live audio session"
3025
+ "reason": "(parity66c review) placing a call: the JSON request dials the LEAD at once (the customer leg joins a conference on hold, or a vendor leg rings) and waits for the rep's browser softphone leg to start it; a key-only caller has no audio leg, so a tool would ring a real person into silence. Its dealattempt66 dealId therefore reaches no tool; a call made elsewhere is recorded with conduyt_log_call (POST /calls, which takes dealId)"
2982
3026
  },
2983
3027
  "POST /api/v1/dialer/call/:id/vm-drop": {
2984
3028
  "status": "excluded",
2985
- "reason": "realtime browser dialer (WebRTC tokens, live call control) — needs a live audio session"
3029
+ "reason": "(parity66c review) placing a call: the JSON request dials the LEAD at once (the customer leg joins a conference on hold, or a vendor leg rings) and waits for the rep's browser softphone leg to start it; a key-only caller has no audio leg, so a tool would ring a real person into silence. Its dealattempt66 dealId therefore reaches no tool; a call made elsewhere is recorded with conduyt_log_call (POST /calls, which takes dealId)"
2986
3030
  },
2987
3031
  "POST /api/v1/dialer/call/eligibility": {
2988
3032
  "status": "excluded",
2989
- "reason": "realtime browser dialer (WebRTC tokens, live call control) — needs a live audio session"
3033
+ "reason": "(parity66c review) placing a call: the JSON request dials the LEAD at once (the customer leg joins a conference on hold, or a vendor leg rings) and waits for the rep's browser softphone leg to start it; a key-only caller has no audio leg, so a tool would ring a real person into silence. Its dealattempt66 dealId therefore reaches no tool; a call made elsewhere is recorded with conduyt_log_call (POST /calls, which takes dealId)"
2990
3034
  },
2991
3035
  "GET /api/v1/dialer/calls": {
2992
3036
  "status": "covered",
@@ -3760,8 +3804,10 @@
3760
3804
  "reason": "integration management"
3761
3805
  },
3762
3806
  "GET /api/v1/integrations/health": {
3763
- "status": "planned",
3764
- "reason": "integration management"
3807
+ "status": "covered",
3808
+ "tools": [
3809
+ "conduyt_get_integrations_health"
3810
+ ]
3765
3811
  },
3766
3812
  "GET /api/v1/integrations/mailchimp/audiences": {
3767
3813
  "status": "covered",
@@ -3958,8 +4004,10 @@
3958
4004
  "reason": "mailbox sync surfaces"
3959
4005
  },
3960
4006
  "GET /api/v1/mailbox/connections": {
3961
- "status": "planned",
3962
- "reason": "mailbox sync surfaces"
4007
+ "status": "covered",
4008
+ "tools": [
4009
+ "conduyt_list_mailbox_connections"
4010
+ ]
3963
4011
  },
3964
4012
  "DELETE /api/v1/mailbox/connections/:id": {
3965
4013
  "status": "planned",
@@ -4792,6 +4840,7 @@
4792
4840
  "conduyt_set_contact_table_defaults",
4793
4841
  "conduyt_get_call_recording_settings",
4794
4842
  "conduyt_get_calling_hours",
4843
+ "conduyt_get_call_late_link",
4795
4844
  "conduyt_update_document_reader_enabled",
4796
4845
  "conduyt_get_document_reader_settings",
4797
4846
  "conduyt_update_document_reader_settings",
@@ -5032,12 +5081,16 @@
5032
5081
  "reason": "account settings read/update surfaces"
5033
5082
  },
5034
5083
  "GET /api/v1/settings/twilio": {
5035
- "status": "planned",
5036
- "reason": "account settings read/update surfaces"
5084
+ "status": "covered",
5085
+ "tools": [
5086
+ "conduyt_get_twilio_settings"
5087
+ ]
5037
5088
  },
5038
5089
  "PUT /api/v1/settings/twilio": {
5039
- "status": "planned",
5040
- "reason": "account settings read/update surfaces"
5090
+ "status": "covered",
5091
+ "tools": [
5092
+ "conduyt_update_twilio_settings"
5093
+ ]
5041
5094
  },
5042
5095
  "POST /api/v1/settings/twilio/test": {
5043
5096
  "status": "planned",