conduyt-mcp 4.105.23 → 4.105.25

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.
@@ -0,0 +1,3 @@
1
+ /** (parity34, batch33) the response-shape facts of tablecols1318 (#1318) and asadlink1319 (#1319), named once for the tool descriptions. */
2
+ export declare const ROLE_COLUMNS_NOTE = "The answer's meta also carries role_columns [{ role, fieldKey, label }] (tablecols1318, #1318: the deals table view's role columns, one per role of the Deal profile's roleStamping rule, in rule order; a Secure or non-user field is left out) and custom_field_users { userId: display name } (the members the page's rows hold in those fields), only when the workspace has roleStamping enabled and never on a rows_only read.";
3
+ export declare const APPOINTMENT_LINKS_NOTE = "For a caller that can edit the appointment (a signed-in member with calendar.edit, or a write or admin tier API key whose member also has calendar.edit) the data also carries rescheduleUrl and cancelUrl (asadlink1319, #1319): the signed no-login links the client uses to reschedule or cancel, so anyone holding one can act on the booking: share them only with that client. They are on this single read only, never on conduyt_list_appointments, in webhooks or events, and absent for a caller who cannot edit.";
@@ -0,0 +1,3 @@
1
+ /** (parity34, batch33) the response-shape facts of tablecols1318 (#1318) and asadlink1319 (#1319), named once for the tool descriptions. */
2
+ export const ROLE_COLUMNS_NOTE = "The answer's meta also carries role_columns [{ role, fieldKey, label }] (tablecols1318, #1318: the deals table view's role columns, one per role of the Deal profile's roleStamping rule, in rule order; a Secure or non-user field is left out) and custom_field_users { userId: display name } (the members the page's rows hold in those fields), only when the workspace has roleStamping enabled and never on a rows_only read.";
3
+ export const APPOINTMENT_LINKS_NOTE = "For a caller that can edit the appointment (a signed-in member with calendar.edit, or a write or admin tier API key whose member also has calendar.edit) the data also carries rescheduleUrl and cancelUrl (asadlink1319, #1319): the signed no-login links the client uses to reschedule or cancel, so anyone holding one can act on the booking: share them only with that client. They are on this single read only, never on conduyt_list_appointments, in webhooks or events, and absent for a caller who cannot edit.";
@@ -25,7 +25,7 @@ export function registerBulkTools(server, client) {
25
25
  const result = await client.post("/api/v1/contacts/ai-import", { contacts, options });
26
26
  return formatResult(result);
27
27
  });
28
- server.tool("conduyt_export_contacts", "Export contacts as JSON with filtering. Returns all matching contacts with tags and custom fields. min_score that is not an integer 0..2147483647 is 400 invalid_min_score { message, param, accepted } (GET /contacts, /contacts/count and /contacts/export).", {
28
+ server.tool("conduyt_export_contacts", "Export contacts as JSON with filtering. Returns all matching contacts with tags and custom fields. 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 every contact exported) and two different values of format or of a single-value filter 400 query_param_conflict { message, param }, both before the numeric code; this tool sends only accepted names. min_score that is not an integer 0..2147483647 is 400 invalid_min_score { message, param, accepted } (GET /contacts, /contacts/count and /contacts/export).", {
29
29
  format: z.enum(["json"]).optional().describe("Export format (use 'json' for MCP)"),
30
30
  search: z.string().optional().describe("Search filter"),
31
31
  tag: z.string().optional().describe("Filter by tag name"),
@@ -64,7 +64,7 @@ export function registerBulkTools(server, client) {
64
64
  });
65
65
  return formatResult(result);
66
66
  });
67
- server.tool("conduyt_export_deals", "Export deals as JSON with filtering by status, pipeline, or search term. 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).", {
67
+ server.tool("conduyt_export_deals", "Export deals as JSON with filtering by status, pipeline, or search term. The API judges the query names first (batch33): a name the export does not read is 400 unknown_query_param { message, unknown[], accepted[], didYouMean } (it used to be ignored and the whole book exported) and two different values of format, search, status, pipeline, value_min / minValue, value_max / maxValue, needsAction or stale 400 query_param_conflict { message, param }, both before the numeric codes; this tool sends only accepted names. The deal value bounds are judged too: value_min / minValue and value_max / maxValue that are non-numeric or outside the deal value column range (-9999999999.99..9999999999.99) are 400 invalid_value_min / invalid_value_max { message, param, accepted } (absent or empty = no filter; an alias spelling answers the same code with the sent spelling in param).", {
68
68
  search: z.string().optional().describe("Search deal titles"),
69
69
  status: z.string().optional().describe("Filter by status (open, won, lost)"),
70
70
  pipeline: z.string().optional().describe("Filter by pipeline UUID"),
@@ -1,5 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { formatResult } from "../client.js";
3
+ import { APPOINTMENT_LINKS_NOTE } from "./batch33-surface.js";
3
4
  export function registerCalendarTools(server, client) {
4
5
  server.tool("conduyt_list_calendars", "List all calendars in the account with appointment counts.", {
5
6
  page: z.number().optional().describe("Page number (default 1)"),
@@ -43,7 +44,7 @@ export function registerCalendarTools(server, client) {
43
44
  const result = await client.get(`/api/v1/appointments?${params}`);
44
45
  return formatResult(result);
45
46
  });
46
- server.tool("conduyt_get_appointment", "Get a single appointment with full details — contact, assignee, booking page, and notes.", {
47
+ server.tool("conduyt_get_appointment", "Get a single appointment with full details — contact, assignee, booking page, and notes. " + APPOINTMENT_LINKS_NOTE, {
47
48
  id: z.string().describe("Appointment UUID"),
48
49
  }, async ({ id }) => {
49
50
  const result = await client.get(`/api/v1/appointments/${id}`);
@@ -164,7 +164,7 @@ export function registerContactTools(server, client) {
164
164
  const result = await client.get(`/api/v1/contacts?${params}`);
165
165
  return formatResult(result);
166
166
  });
167
- server.tool("conduyt_count_contacts", "Count the contacts a list filter matches (GET /contacts/count): the exact total when conduyt_list_contacts answers `meta.total: null` with `meta.total_deferred: true`. Takes the SHARED subset of conduyt_list_contacts filters (no page, per_page or sort, and NOT dealContextOwners / dealContextStages / dealContextStatuses, which exist only on the list): with a deal-context filter the exact total is not available here (dropping it counts a broader set), so page the list with has_more instead. Answers `{ total, age_ms?, total_capped?, pending?, timed_out? }`: a cached list (the unfiltered list, or a Smart View alone) answers its cached exact count while under a minute old (`age_ms`), else recounts; `total: null` with `pending: true` = another request is recounting and nothing is cached yet, ask again in a few seconds; `total: null` with `timed_out: true` = the count could not finish within 30 s (narrow the filter); a `search` counts up to 10,000 (`total_capped: true` = more match). Use the total as `expectedTotal` for conduyt_bulk_delete_contacts_matching or conduyt_create_batch_operation." + " " + FORMULA_FILTER_NOTE + " " + TIMEZONE_FILTER_NOTE + " min_score that is not an integer 0..2147483647 is 400 invalid_min_score { message, param, accepted } (GET /contacts, /contacts/count and /contacts/export).", contactFilterShape, async (filter) => {
167
+ server.tool("conduyt_count_contacts", "Count the contacts a list filter matches (GET /contacts/count): the exact total when conduyt_list_contacts answers `meta.total: null` with `meta.total_deferred: true`. Takes the SHARED subset of conduyt_list_contacts filters (no page, per_page or sort, and NOT dealContextOwners / dealContextStages / dealContextStatuses, which exist only on the list): with a deal-context filter the exact total is not available here (dropping it counts a broader set), so page the list with has_more instead. Answers `{ total, age_ms?, total_capped?, pending?, timed_out? }`: a cached list (the unfiltered list, or a Smart View alone) answers its cached exact count while under a minute old (`age_ms`), else recounts; `total: null` with `pending: true` = another request is recounting and nothing is cached yet, ask again in a few seconds; `total: null` with `timed_out: true` = the count could not finish within 30 s (narrow the filter); a `search` counts up to 10,000 (`total_capped: true` = more match). Use the total as `expectedTotal` for conduyt_bulk_delete_contacts_matching or conduyt_create_batch_operation." + " " + FORMULA_FILTER_NOTE + " " + TIMEZONE_FILTER_NOTE + " The API judges the query names first (batch33): a name the count does not read (page, per_page, limit, sort, order, include, deal_context_*) is 400 unknown_query_param { message, unknown[], accepted[], didYouMean } and two different values of a single-value filter 400 query_param_conflict { message, param }, both before the numeric code; this tool sends only accepted names. min_score that is not an integer 0..2147483647 is 400 invalid_min_score { message, param, accepted } (GET /contacts, /contacts/count and /contacts/export).", contactFilterShape, async (filter) => {
168
168
  const params = contactFilterParams(filter);
169
169
  const result = await client.get(`/api/v1/contacts/count?${params}`);
170
170
  return formatResult(result);
@@ -66,7 +66,7 @@ export function registerCustomFieldTools(server, client) {
66
66
  const result = await client.patch(`/api/v1/custom-fields/${id}`, updates);
67
67
  return formatResult(result);
68
68
  });
69
- 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)." + " " + DELANCEY_ID_NOTE, {
69
+ 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, {
70
70
  id: z.string().describe("Custom field UUID"),
71
71
  }, async ({ id }) => {
72
72
  const result = await client.del(`/api/v1/custom-fields/${id}`);
@@ -2,6 +2,8 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
2
  import { ConduytClient } from "../client.js";
3
3
  /** (parity28, batch28) the Deal profile (the deal page's tabs of the primary contact's bound fields), the partner push and the workspace binding. */
4
4
  export declare const PUSH_PARTNERS: readonly ["creditors_relief", "delancey_street"];
5
- export declare const PUSH_ACTIONS: readonly ["create", "update"];
5
+ export declare const PUSH_ACTIONS: readonly ["create", "update", "documents"];
6
+ /** the push route can run up to its 300 s budget (a Delancey create sends its documents right after, as the documents press does) */
7
+ export declare const PUSH_TIMEOUT_MS = 310000;
6
8
  export declare const PUSH_EXPECT_MODES: readonly ["test", "live"];
7
9
  export declare function registerDealProfileTools(server: McpServer, client: ConduytClient): void;
@@ -4,15 +4,19 @@ import { strictInput } from "./strict.js";
4
4
  import { fail, secureEgressProblem } from "./formula-fields.js";
5
5
  /** (parity28, batch28) the Deal profile (the deal page's tabs of the primary contact's bound fields), the partner push and the workspace binding. */
6
6
  export const PUSH_PARTNERS = ["creditors_relief", "delancey_street"];
7
- export const PUSH_ACTIONS = ["create", "update"];
7
+ export const PUSH_ACTIONS = ["create", "update", "documents"];
8
+ /** the push route can run up to its 300 s budget (a Delancey create sends its documents right after, as the documents press does) */
9
+ export const PUSH_TIMEOUT_MS = 310_000;
8
10
  export const PUSH_EXPECT_MODES = ["test", "live"];
9
11
  const PROFILE_KEYS_MAX = 100;
10
12
  const KEY_MAX = 100;
11
13
  const PATCH_CODES = "400 profile_key_not_bound (keys lists them), profile_field_invalid (key), deal_profile_not_enabled, invalid_body; 403 deal_not_editable or contacts_permission_required; 404 deal not found; 409 profile_field_changed { key, current } (nothing written), profile_conflict or deal_has_no_contact; 422 stage_automation_only (the card sits in a stage only automation may change; nothing written); 503 profile_busy (the contact stayed locked; nothing written, retry after the Retry-After seconds).";
12
14
  /** (parity32, batch32 delseam1286) a pending Delancey Street submission the CURRENT Secure policy refuses to resend: an ERROR, never a success state */
13
15
  const HELD_RESEND_NOTE = "A pending delancey_street submission (status unknown after an ambiguous answer: the next push resends it with the same key) is RE-CHECKED against the CURRENT Secure policy: if its body carries a Secure key the binding's secureEgress no longer lists for delancey_street, nothing is sent and the press answers 422 profile_secure_field with blocked: true { secure[], pushId } (an error: pending.blocked on conduyt_get_deal_partner_pushes is NOT a success state). The push row stays unknown with code secure_blocked and the slot stays held, because the deal may already exist at Delancey Street: list the keys for delancey_street in the Deal profile secureEgress to resend it, or an admin checks Delancey Street by hand.";
16
+ /** (parity34, batch34 delancey1286b #1286 S5b + delsubnotice1286) documents to Delancey Street: action documents on the same push route */
17
+ const DELANCEY_DOCUMENTS_NOTE = "action documents (delancey_street only; creditors_relief answers 400 documents_not_supported) is the card's Send documents: it SENDS the files of the deal and of its contact that Delancey Street does not have yet, one POST /documents per file (one deal_partner_pushes row per file), and cannot be recalled. It needs a submission made from this card for the deal's CURRENT contact (409 not_submitted otherwise; 409 deal_has_no_contact, key_mode_changed and partner_not_configured as for a create; 404 not_found). These refusals are decided before anything is sent, so they RELEASE the Idempotency-Key (the same key may be retried at once); a 200 answer with result documents (even with stopped set or files not sent) is an executed press and SPENDS it. Each file goes inline (up to 4 MB; types pdf, png, jpg, jpeg, heic, tif, tiff, csv, xls, xlsx, doc, docx; a file outside them, over 4 MB or empty is refused before anything is sent and shows in the card's documents line as file_type_not_allowed, file_too_large or file_empty; file_unreadable = the stored bytes could not be read). An accepted create sends the documents right after itself, and its 200 answer then carries documents { total, sent, checked, pending, failed, results[], stopped, copy } (or documents { code } when they could not go). The documents press answers 200 { pushId, partner, action: documents, test, result: documents, total, sent, checked, pending, failed, results [{ pushId, fileId, status, code }], stopped, copy }: stopped is null, or budget (a press starts no new document after 120 s: press again to continue), or the per-file refusal that ended the press: push_in_flight, deal_busy, contact_busy, deal_changed (the deal's contact changed), deal_has_no_contact, not_found, erased or lost (these come as 200 with stopped set, not as an HTTP error); a file that got no definite answer (status unknown) is held and resent on the SAME key with the very same bytes (never stored twice), a LIVE attempt whose file changed (file_changed), whose Delancey key changed (key_changed) or whose deal changed (deal_changed) stays held for an admin; Delancey's own refusal codes (unauthorized, rate_limited, document_limit = 50 per deal, not_found, file_too_large) print as the code. A TEST key checks the files and stores nothing: checked counts the files it passed and test is true; sent still counts files an earlier LIVE press delivered. The press can run up to 300 s (this tool waits 310 s, then says the server may have applied it: read conduyt_get_deal_partner_pushes before pressing again). conduyt_get_deal_partner_pushes shows each Delancey card's documents { total, sent, checked, pending, failed, sending, test, files[] { fileId, filename, type, size, state (sent, checked, held, refused, failed, new), code, copy } } (files only for a caller who may push; a caller who can only view gets the counts without files); the documents rows are not in its pushes history. delsubnotice1286: when a contact is erased while a Delancey submission or a document may exist there (a lost or held one), the workspace admins get a notice naming the deal id only (no file name, no partner identifier); the notice can also follow a refused attempt that settled while the contact was being erased.";
14
18
  const DELANCEY_PUSH_NOTE = "delancey_street (the ISO Partner API) is enabled per workspace (config.partners.delancey_street.enabled plus a key; else 409 partner_disabled / partner_not_configured) and takes NEW submissions only: action create, one deal record per card (a card that already has its delancey_deal_id or a succeeded submission answers 409 already_submitted). A TEST key runs every check and creates nothing (the answer carries test: true; the card is not stamped). expectMode is the key mode the card showed (test or live): a changed key answers 409 key_mode_changed with nothing sent.";
15
- const PUSH_CODES = "403 deal_not_editable / push_not_permitted; 404; 409 partner_disabled, partner_not_configured (delancey_street: no API key in the workspace), partner_not_enabled, push_in_flight, needs_link, action_changed (the current state comes back), already_submitted (delancey_street takes a new submission only: the card already has its deal id), key_mode_changed { mode } (delancey_street: the workspace key is now a test or live key other than the expectMode you passed; nothing sent), deal_has_no_contact, contact_busy, reconcile_needs_admin, reconcile_ambiguous; 422 profile_incomplete (missing[] names each gap; nothing written, no partner call), profile_secure_field { secure[], missing[] } (a Secure value the push would send whose key the binding does not list in secureEgress FOR THAT PARTNER; nothing written, no partner call) or stage_automation_only (the card sits in a stage only automation may change); 503 deal_busy or partner_auth.";
19
+ const PUSH_CODES = "400 documents_not_supported (action documents with creditors_relief); 403 deal_not_editable / push_not_permitted; 404; 409 partner_disabled, partner_not_configured (delancey_street: no API key in the workspace), partner_not_enabled, push_in_flight, needs_link, action_changed (the current state comes back), not_submitted (action documents before a delancey_street submission for the deal's current contact), deal_changed (the deal's contact changed), already_submitted (delancey_street takes a new submission only: the card already has its deal id), key_mode_changed { mode } (delancey_street: the workspace key is now a test or live key other than the expectMode you passed; nothing sent), deal_has_no_contact, contact_busy, reconcile_needs_admin, reconcile_ambiguous; 422 profile_incomplete (missing[] names each gap; nothing written, no partner call), profile_secure_field { secure[], missing[] } (a Secure value the push would send whose key the binding does not list in secureEgress FOR THAT PARTNER; nothing written, no partner call) or stage_automation_only (the card sits in a stage only automation may change); 503 deal_busy or partner_auth.";
16
20
  /** fields: 1 to 100 keys; expected: any number of keys (the server caps only fields); both: key length 1 to 100 */
17
21
  const keyed = (min, max) => z.record(z.string().min(1).max(KEY_MAX), z.unknown()).refine((o) => Object.keys(o).length >= min && Object.keys(o).length <= max, { message: `must hold ${min} to ${max} keys` });
18
22
  export function registerDealProfileTools(server, client) {
@@ -32,17 +36,17 @@ export function registerDealProfileTools(server, client) {
32
36
  return formatResult(await client.put("/api/v1/settings/deal-profile", { dealProfile }));
33
37
  }));
34
38
  strictInput(server.tool("conduyt_remove_deal_profile_settings", "REMOVE the workspace's Deal profile binding (PUT /api/v1/settings/deal-profile with dealProfile null; settings:edit, and only an owner or admin: a delegated holder is refused 403 deal_profile_admin_only): the deal page's Details card returns to its plain view and the stored binding (tabs, rules, reveal set) is DISCARDED, so read and keep a copy with conduyt_get_deal_profile_settings first. No custom field definition is touched.", {}, async () => formatResult(await client.put("/api/v1/settings/deal-profile", { dealProfile: null }))));
35
- server.tool("conduyt_get_deal_partner_pushes", "The deal page's Push to partner card (GET /api/v1/deals/{id}/partner-pushes): { enabled: false } when the workspace has no enabled partner, else the partners (Creditors Relief; Delancey Street when the workspace enables it with a key, with its key mode test / live), the card's partner id (the deal field oes_number) and its display (CRL-<id>; Delancey Street: the deal id), a pending create (sending, or unknown after an ambiguous answer: the next push checks the partner first; for delancey_street an unknown one the CURRENT Secure policy refuses to resend carries pending.blocked { reason: secure_policy, keys }, an ERROR state: the next press answers 422 profile_secure_field blocked: true, never a success), the newest four pushes, submitted (delancey_street: the succeeded submission) and canPush (the card's edit scope and closer or above). " + HELD_RESEND_NOTE + " Needs deals:view on the card; 404 when the deal does not exist or the caller cannot see it.", { id: dealId }, async ({ id }) => formatResult(await client.get(`/api/v1/deals/${encodeURIComponent(id)}/partner-pushes`)));
36
- server.tool("conduyt_preview_deal_partner_push", "Preview what the next partner push would send (GET /api/v1/deals/{id}/partner-pushes/preview): the action (create when the card has no OES #, update when it has one), the partner endpoint, the payload rows (SSN and bank numbers masked to the last 4), the readiness gaps (missing[]; a push answers 422 profile_incomplete while any remain) and the policy warnings. Nothing is written and no partner is called. Same gates as the push: deals:edit, the card's edit scope, closer or above. 403 deal_not_editable / push_not_permitted; 404; 409 partner_disabled / partner_not_configured (delancey_street needs the workspace flag and a key), partner_not_enabled, deal_has_no_contact; 422 profile_secure_field { secure[], missing[] } (a Secure value the push would send whose key the binding does not list in secureEgress for that partner; the preview refuses it too, nothing is sent). " + DELANCEY_PUSH_NOTE, { id: dealId, partner: z.enum(PUSH_PARTNERS).optional().describe("creditors_relief (default) or delancey_street") }, async ({ id, partner }) => {
39
+ server.tool("conduyt_get_deal_partner_pushes", "The deal page's Push to partner card (GET /api/v1/deals/{id}/partner-pushes): { enabled: false } when the workspace has no enabled partner, else the partners (Creditors Relief; Delancey Street when the workspace enables it with a key, with its key mode test / live), the card's partner id (the deal field oes_number) and its display (CRL-<id>; Delancey Street: the deal id), a pending create (sending, or unknown after an ambiguous answer: the next push checks the partner first; for delancey_street an unknown one the CURRENT Secure policy refuses to resend carries pending.blocked { reason: secure_policy, keys }, an ERROR state: the next press answers 422 profile_secure_field blocked: true, never a success), the newest four pushes (create / update only), submitted (delancey_street: the succeeded submission), documents (delancey_street once submitted: { total, sent, checked, pending, failed, sending, test, files[] only for a caller who may push }, see conduyt_push_deal_to_partner action documents) and canPush (the card's edit scope and closer or above). " + HELD_RESEND_NOTE + " Needs deals:view on the card; 404 when the deal does not exist or the caller cannot see it.", { id: dealId }, async ({ id }) => formatResult(await client.get(`/api/v1/deals/${encodeURIComponent(id)}/partner-pushes`)));
40
+ server.tool("conduyt_preview_deal_partner_push", "Preview what the next partner push would send (GET /api/v1/deals/{id}/partner-pushes/preview): the action (create when the card has no OES #, update when it has one), the partner endpoint, the payload rows (SSN and bank numbers masked to the last 4), the readiness gaps (missing[]; a push answers 422 profile_incomplete while any remain) and the policy warnings. Nothing is written and no partner is called. Same gates as the push: deals:edit, the card's edit scope, closer or above. 403 deal_not_editable / push_not_permitted; 404; 409 partner_disabled / partner_not_configured (delancey_street needs the workspace flag and a key), partner_not_enabled, deal_has_no_contact; 422 profile_secure_field { secure[], missing[] } (a Secure value the push would send whose key the binding does not list in secureEgress for that partner; the preview refuses it too, nothing is sent). " + DELANCEY_PUSH_NOTE + " For delancey_street the preview also carries documents [{ fileId, filename, type, size, state, code, copy, will }] (the card's files: will is send, resend (a held one), sent, checked or not_sent) and documentsEndpoint \"POST /documents\": what an accepted create (or action documents) would send after the submission; nothing is sent by the preview.", { id: dealId, partner: z.enum(PUSH_PARTNERS).optional().describe("creditors_relief (default) or delancey_street") }, async ({ id, partner }) => {
37
41
  if (partner === undefined)
38
42
  return formatResult(await client.get(`/api/v1/deals/${encodeURIComponent(id)}/partner-pushes/preview`));
39
43
  return formatResult(await client.get(`/api/v1/deals/${encodeURIComponent(id)}/partner-pushes/preview?partner=${partner}`));
40
44
  });
41
- strictInput(server.tool("conduyt_push_deal_to_partner", `Push a deal to a partner (POST /api/v1/deals/{id}/partner-pushes): ONE press of the deal page's Push to partner, which SENDS the card's data to the partner and cannot be recalled. One partner record per card: a card without an OES # creates the record (the contact, one debt per creditor, then the bank account when its details are filled) and stamps the partner's id on the card; a card with an OES # can only update that record's contact. action is what you saw (create or update): the server decides from the locked card and answers 409 action_changed with the current state when they differ (call conduyt_preview_deal_partner_push first). An executed attempt answers 200 with result accepted, found, updated, refused (nothing saved on the deal), unknown (no definite answer: the next push checks the partner before creating), needs_link (the partner created the record but the card could not carry its id; an admin links it by hand) or erased. Needs deals:edit, the card's edit scope and closer or above. idempotencyKey (1-255 printable ASCII) is sent as the Idempotency-Key header: one key per push press, reused ONLY to retry the SAME request (same key + same body replays the first answer; a different body is 422 idempotency_request_conflict). A refusal decided before any partner call (the 403s, partner_disabled, partner_not_configured, partner_not_enabled, push_in_flight, needs_link, action_changed, already_submitted, key_mode_changed, deal_has_no_contact, contact_busy, profile_incomplete, profile_secure_field, deal_busy) releases the key (a held Delancey resend the current Secure policy refuses, 422 profile_secure_field blocked: true, is one of them), so the SAME key may be retried at once; an executed attempt (accepted, found, updated, refused, unknown) and reconcile_needs_admin, reconcile_ambiguous or partner_auth spend it: a retry with that key answers 409 idempotency_key_spent, so verify what happened before sending a NEW key. 409 idempotency_in_progress: wait Retry-After and retry with the SAME key. A key starting with forgotten: is reserved (400 idempotency_key_reserved). Rare wrapper outcomes: 409 idempotency_conflict_retry (a concurrent claim could not be resolved, nothing ran: retry with the SAME key); 503 idempotency_claim_held (the release of a failed attempt's claim could not be confirmed: retry with a NEW key); 503 idempotency_outcome_unknown (the success could not be confirmed and the push may have gone through: verify the outcome before any new key). ${DELANCEY_PUSH_NOTE} ${HELD_RESEND_NOTE} ${PUSH_CODES}`, {
45
+ strictInput(server.tool("conduyt_push_deal_to_partner", `Push a deal to a partner (POST /api/v1/deals/{id}/partner-pushes): ONE press of the deal page's Push to partner, which SENDS the card's data to the partner and cannot be recalled. One partner record per card: a card without an OES # creates the record (the contact, one debt per creditor, then the bank account when its details are filled) and stamps the partner's id on the card; a card with an OES # can only update that record's contact. action is what you saw (create or update; delancey_street also documents, below): the server decides from the locked card and answers 409 action_changed with the current state when they differ (call conduyt_preview_deal_partner_push first). An executed attempt answers 200 with result accepted, found, updated, refused (nothing saved on the deal), unknown (no definite answer: the next push checks the partner before creating), needs_link (the partner created the record but the card could not carry its id; an admin links it by hand) or erased; action documents (the deal card's Send documents) answers 200 with result documents instead. Needs deals:edit, the card's edit scope and closer or above. idempotencyKey (1-255 printable ASCII) is sent as the Idempotency-Key header: one key per push press, reused ONLY to retry the SAME request (same key + same body replays the first answer; a different body is 422 idempotency_request_conflict). A refusal decided before any partner call (the 403s, partner_disabled, partner_not_configured, partner_not_enabled, push_in_flight, needs_link, action_changed, already_submitted, key_mode_changed, deal_has_no_contact, contact_busy, profile_incomplete, profile_secure_field, deal_busy) releases the key (a held Delancey resend the current Secure policy refuses, 422 profile_secure_field blocked: true, is one of them), so the SAME key may be retried at once; an executed attempt (accepted, found, updated, refused, unknown) and reconcile_needs_admin, reconcile_ambiguous or partner_auth spend it: a retry with that key answers 409 idempotency_key_spent, so verify what happened before sending a NEW key. 409 idempotency_in_progress: wait Retry-After and retry with the SAME key. A key starting with forgotten: is reserved (400 idempotency_key_reserved). Rare wrapper outcomes: 409 idempotency_conflict_retry (a concurrent claim could not be resolved, nothing ran: retry with the SAME key); 503 idempotency_claim_held (the release of a failed attempt's claim could not be confirmed: retry with a NEW key); 503 idempotency_outcome_unknown (the success could not be confirmed and the push may have gone through: verify the outcome before any new key). ${DELANCEY_PUSH_NOTE} ${DELANCEY_DOCUMENTS_NOTE} ${HELD_RESEND_NOTE} ${PUSH_CODES}`, {
42
46
  id: dealId,
43
47
  partner: z.enum(PUSH_PARTNERS).describe("creditors_relief (Forth) or delancey_street (the ISO Partner API; enabled per workspace)"),
44
- action: z.enum(PUSH_ACTIONS).describe("What the card showed: create (no partner id yet) or update (a Creditors Relief card with an OES #); delancey_street takes create only"),
48
+ action: z.enum(PUSH_ACTIONS).describe("What the card showed: create (no partner id yet) or update (a Creditors Relief card with an OES #); delancey_street takes create, or documents (send the deal's and its contact's files Delancey Street does not have yet; 409 not_submitted before a submission)"),
45
49
  expectMode: z.enum(PUSH_EXPECT_MODES).optional().describe("delancey_street only: the key mode the card showed, test or live (a changed key answers 409 key_mode_changed with nothing sent)"),
46
50
  idempotencyKey: z.string().regex(/^[!-~](?:[ -~]{0,253}[!-~])?$/, "idempotencyKey must be 1-255 printable ASCII characters, not blank").optional().describe("Sent as the Idempotency-Key header; reuse it ONLY to retry the SAME request"),
47
- }, async ({ id, partner, action, expectMode, idempotencyKey }) => formatResult(await client.post(`/api/v1/deals/${encodeURIComponent(id)}/partner-pushes`, { partner, action, ...(expectMode !== undefined ? { expectMode } : {}) }, idempotencyKey !== undefined ? { headers: { "Idempotency-Key": idempotencyKey } } : undefined))));
51
+ }, async ({ id, partner, action, expectMode, idempotencyKey }) => formatResult(await client.post(`/api/v1/deals/${encodeURIComponent(id)}/partner-pushes`, { partner, action, ...(expectMode !== undefined ? { expectMode } : {}) }, { ...(idempotencyKey !== undefined ? { headers: { "Idempotency-Key": idempotencyKey } } : {}), timeoutMs: PUSH_TIMEOUT_MS }))));
48
52
  }
@@ -1,6 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { USER_FIELD_READ_DOC, USER_FIELD_RECORD_WRITE_DOC, USER_FIELD_WRITE_DOC } from "./user-fields-doc.js";
3
3
  import { OFF_LIST_NOTE } from "./lender-options.js";
4
+ import { ROLE_COLUMNS_NOTE } from "./batch33-surface.js";
4
5
  import { formatResult } from "../client.js";
5
6
  import { FORMULA_WRITE_NOTE } from "./formula-fields.js";
6
7
  import { strictInput } from "./strict.js";
@@ -55,7 +56,7 @@ function boardSnapshotColumns(a, f) {
55
56
  return a.board_columns.map((c) => (c.limit === undefined ? c.stageId : `${c.stageId}:${c.limit}`)).join(",");
56
57
  }
57
58
  export function registerDealTools(server, client) {
58
- strictInput(server.tool("conduyt_list_deals", "List deals with filtering by pipeline, stage, assignee, or status. Returns deal title, value, stage, contact, and dates. Filter by pipeline/stage NAME (the same names you import with) or by UUID — both camelCase (pipelineName) and snake_case (pipeline_name) argument names are accepted. An unknown name returns a clear error, never the whole account. Each deal row carries hasNextStep (boolean: an open task or a booked appointment from a day ago on; the Needs next action rule's own answer) and nextAppointmentAt (ISO string or null; null unless your key can view the calendar, even when hasNextStep is true). PIPELINE HEALTH: pass health_summary=true to get the Pipeline health strip for the same filtered set instead of the deal list: { totalOpenDeals, atRiskValue, checks[] (key, label, severity, color, rule, count, value; the six checks high_value_idle, stale, unassigned, needs_action, missing_close_date, missing_contact, ordered by money at risk), deals }. Add health_check to also get that check's first page of deals (highest value first) as deals: { check, offset, items, hasMore, nextCursor, total }; deals is null without a check. Page with health_cursor (the previous nextCursor, passed back UNCHANGED: an opaque signed token) or health_offset, and health_rows_only=true to get just the page without the summary: the answer is {data:{deals:{check, offset, items, hasMore, nextCursor}}} (the page sits under data.deals). " + HEALTH_ERRORS + " " + BOARD_SNAPSHOT_DOC + " " + BUSY_503_DOC + MIRROR_READ_DOC + " A mirror key is not filterable (422 mirror_not_filterable). The API judges the query NAMES (batch32, #1313): a name GET /deals does not read is 400 unknown_query_param { message, unknown[], accepted[] (every name it reads), didYouMean { name: accepted twin } for the camelCase / snake_case twin of an accepted name } and is never silently ignored (it used to answer the unfiltered list); two different values for a single-value name (status, contact_id, search, stale, needsAction, summary, latest_updated, system_occupancy, sort, order, page, per_page, value_min / minValue, value_max / maxValue) are 400 query_param_conflict { message, param }, an exact repeat is accepted. This tool sends only accepted names (pipeline, pipeline_name, stage, stage_name, assigned_to, status, search, page, per_page, 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).", {
59
+ strictInput(server.tool("conduyt_list_deals", "List deals with filtering by pipeline, stage, assignee, or status. Returns deal title, value, stage, contact, and dates. Filter by pipeline/stage NAME (the same names you import with) or by UUID — both camelCase (pipelineName) and snake_case (pipeline_name) argument names are accepted. An unknown name returns a clear error, never the whole account. Each deal row carries hasNextStep (boolean: an open task or a booked appointment from a day ago on; the Needs next action rule's own answer) and nextAppointmentAt (ISO string or null; null unless your key can view the calendar, even when hasNextStep is true). PIPELINE HEALTH: pass health_summary=true to get the Pipeline health strip for the same filtered set instead of the deal list: { totalOpenDeals, atRiskValue, checks[] (key, label, severity, color, rule, count, value; the six checks high_value_idle, stale, unassigned, needs_action, missing_close_date, missing_contact, ordered by money at risk), deals }. Add health_check to also get that check's first page of deals (highest value first) as deals: { check, offset, items, hasMore, nextCursor, total }; deals is null without a check. Page with health_cursor (the previous nextCursor, passed back UNCHANGED: an opaque signed token) or health_offset, and health_rows_only=true to get just the page without the summary: the answer is {data:{deals:{check, offset, items, hasMore, nextCursor}}} (the page sits under data.deals). " + HEALTH_ERRORS + " " + BOARD_SNAPSHOT_DOC + " " + BUSY_503_DOC + MIRROR_READ_DOC + " A mirror key is not filterable (422 mirror_not_filterable). The API judges the query NAMES (batch32, #1313): a name GET /deals does not read is 400 unknown_query_param { message, unknown[], accepted[] (every name it reads), didYouMean { name: accepted twin } for the camelCase / snake_case twin of an accepted name } and is never silently ignored (it used to answer the unfiltered list); two different values for a single-value name (status, contact_id, search, stale, needsAction, summary, latest_updated, system_occupancy, sort, order, page, per_page, value_min / minValue, value_max / maxValue) are 400 query_param_conflict { message, param }, an exact repeat is accepted. This tool sends only accepted names (pipeline, pipeline_name, stage, stage_name, assigned_to, status, search, page, per_page, 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, {
59
60
  pipeline: z.string().optional().describe("Filter by pipeline UUID (canonical). Aliases: pipelineId, pipeline_id."),
60
61
  pipelineId: z.string().optional().describe("Filter by pipeline UUID (alias of pipeline)."),
61
62
  pipeline_id: z.string().optional().describe("snake_case alias of pipelineId."),
@@ -148,7 +149,7 @@ export function registerDealTools(server, client) {
148
149
  const result = await client.get(`/api/v1/deals?${params}`);
149
150
  return formatResult(result);
150
151
  }));
151
- strictInput(server.tool("conduyt_pipeline_health", "Pipeline health for one pipeline (or every visible active pipeline) over its OPEN deals (GET /api/v1/deals/inspection): { totalOpenDeals, atRiskValue (total value of the High-value idle deals), 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, summary (count per check), labels (label per check) }. With check, deals is that check's page { check, offset, items, hasMore, nextCursor, total } (highest value first, each item with its issues); without it deals is null. Page with cursor (the previous nextCursor, passed back UNCHANGED) or offset; never both. For the board's other filters (stage, assignee, saved view) use conduyt_list_deals with health_summary=true. " + HEALTH_ERRORS, {
152
+ strictInput(server.tool("conduyt_pipeline_health", "Pipeline health for one pipeline (or every visible active pipeline) over its OPEN deals (GET /api/v1/deals/inspection): { totalOpenDeals, atRiskValue (total value of the High-value idle deals), 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, summary (count per check), labels (label per check) }. With check, deals is that check's page { check, offset, items, hasMore, nextCursor, total } (highest value first, each item with its issues); without it deals is null. Page with cursor (the previous nextCursor, passed back UNCHANGED) or offset; never both. For the board's other filters (stage, assignee, saved view) use conduyt_list_deals with health_summary=true. A query name the route does not read is 400 unknown_query_param { message, unknown[], accepted[] (pipeline, check, limit, offset, cursor), didYouMean } (batch33; there is no query_param_conflict here: a param given twice keeps its own refusal, health_filter_conflict for pipeline, health_cursor_* for cursor, a message for check, limit and offset); this tool sends only those five names. " + HEALTH_ERRORS, {
152
153
  pipeline: z.string().optional().describe("Pipeline UUID; omit for every visible active pipeline."),
153
154
  check: healthCheckSchema.optional().describe("Adds `deals` for that check."),
154
155
  limit: z.number().int().min(1).max(100).optional().describe("With check: deals per page, 1-100 (default 5)."),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conduyt-mcp",
3
- "version": "4.105.23",
3
+ "version": "4.105.25",
4
4
  "mcpName": "com.conduyt/mcp",
5
5
  "description": "MCP server for Conduyt CRM — expose CRM operations as AI-accessible tools",
6
6
  "type": "module",
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-11-13T12:08:25.855Z",
2
+ "generatedAt": "2026-11-14T00:45:01.812Z",
3
3
  "toolCount": 430,
4
4
  "totalEndpoints": 1208,
5
5
  "counts": {