conduyt-mcp 4.105.13 → 4.105.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  MCP server for [Conduyt CRM](https://conduyt.app) — expose your CRM as AI-accessible tools. Covers the core CRM surface (contacts, deals, pipelines, custom fields, automations, messaging, and more); use `conduyt_api_catalog` to discover the full set of 600+ REST endpoints.
4
4
 
5
- ## 399 Tools
5
+ ## 411 Tools
6
6
 
7
7
  ### Discovery
8
8
  | Tool | Description |
@@ -200,7 +200,17 @@ No tool carries call audio. Fetch it with `GET {API base}/api/v1/dialer/call/{id
200
200
  | `conduyt_get_invoice` | Get invoice with line items and payments |
201
201
  | `conduyt_create_invoice` | Create invoice with line items (auto-calculates totals) |
202
202
  | `conduyt_update_invoice` | Update draft invoice items or details |
203
- | `conduyt_send_invoice` | Send invoice via email with PDF and Stripe payment link |
203
+ | `conduyt_send_invoice` | Send invoice via email with PDF and Stripe payment link (`resend` starts a new send; typed busy answers `invoice_send_pending`, `invoice_send_complained`, `invoice_send_in_flight`, `gate_busy`) |
204
+ | `conduyt_get_invoice_send_options` | What Send can do now (Email, Text it, Copy link), with reasons and the Text it text |
205
+ | `conduyt_get_invoice_activity` | The invoice history (sent, viewed, payments, voided with its reason) |
206
+ | `conduyt_mark_invoice_sent` | Record that it went out another way (`via` manual or link) |
207
+ | `conduyt_record_invoice_payment` | Record a payment received outside Stripe (destructive: cannot be removed through the API) |
208
+ | `conduyt_void_invoice` | Void an invoice with a required reason (destructive) |
209
+ | `conduyt_delete_invoice` | Delete a draft with no payments (destructive; refused while a send is in flight) |
210
+ | `conduyt_duplicate_invoice` | Copy an invoice into a new draft |
211
+ | `conduyt_list_tax_rates` / `conduyt_create_tax_rate` / `conduyt_update_tax_rate` / `conduyt_archive_tax_rate` | Saved tax rates (archive is reversible) |
212
+
213
+ Text it is `conduyt_send_sms` with `invoiceId` (and `resend`).
204
214
 
205
215
  ### Webhooks
206
216
  | Tool | Description |
@@ -364,6 +374,7 @@ Team Chat 2.0 publishes thin events (ids and kinds, never message content) on th
364
374
  | Tool | Description |
365
375
  |------|-------------|
366
376
  | `conduyt_list_products` | List product catalog |
377
+ | `conduyt_delete_product` | Archive a product (reversible with `conduyt_update_product` `isActive` true) |
367
378
  | `conduyt_get_product` | Get product details |
368
379
  | `conduyt_create_product` | Create a product |
369
380
  | `conduyt_update_product` | Update product pricing or details |
@@ -41,6 +41,7 @@ import { registerSavedFilterTools } from "./tools/saved-filters.js";
41
41
  import { registerDripCampaignTools } from "./tools/drip-campaigns.js";
42
42
  import { registerScoringTools } from "./tools/scoring.js";
43
43
  import { registerProductTools } from "./tools/products.js";
44
+ import { registerTaxRateTools } from "./tools/tax-rates.js";
44
45
  import { registerTemplateTools } from "./tools/templates.js";
45
46
  import { registerDashboardTools } from "./tools/dashboard.js";
46
47
  import { registerAiExtendedTools } from "./tools/ai-extended.js";
@@ -106,6 +107,7 @@ export function registerAllTools(server, client) {
106
107
  registerDripCampaignTools(server, client);
107
108
  registerScoringTools(server, client);
108
109
  registerProductTools(server, client);
110
+ registerTaxRateTools(server, client);
109
111
  registerTemplateTools(server, client);
110
112
  registerDashboardTools(server, client);
111
113
  registerAiExtendedTools(server, client);
@@ -144,6 +144,17 @@ export const TOOL_ANNOTATIONS = {
144
144
  conduyt_create_invoice: create("Create Invoice"),
145
145
  conduyt_update_invoice: row("Update Invoice", false, true, false), // line-item replacement deletes and recreates items with new ids every call (invoices/[id]/route.ts:413)
146
146
  conduyt_send_invoice: create("Send Invoice"),
147
+ conduyt_get_invoice_send_options: ro("Get Invoice Send Options"),
148
+ conduyt_get_invoice_activity: ro("Get Invoice Activity"),
149
+ conduyt_mark_invoice_sent: create("Mark Invoice Sent"),
150
+ conduyt_record_invoice_payment: row("Record Invoice Payment", false, true, false), // a recorded payment cannot be removed through the API and a repeat records another (invoices/[id]/payments/route.ts)
151
+ conduyt_void_invoice: destroy("Void Invoice"), // terminal: a voided invoice cannot be edited, sent or paid; a repeat is refused
152
+ conduyt_delete_invoice: destroy("Delete Invoice"),
153
+ conduyt_duplicate_invoice: create("Duplicate Invoice"),
154
+ conduyt_list_tax_rates: ro("List Tax Rates"),
155
+ conduyt_create_tax_rate: create("Create Tax Rate"),
156
+ conduyt_update_tax_rate: update("Update Tax Rate"),
157
+ conduyt_archive_tax_rate: update("Archive Tax Rate"), // reversible archive (PATCH isActive true restores it)
147
158
  conduyt_list_webhooks: ro("List Webhooks"),
148
159
  conduyt_create_webhook: create("Create Webhook"),
149
160
  conduyt_update_webhook: update("Update Webhook"),
@@ -284,6 +295,7 @@ export const TOOL_ANNOTATIONS = {
284
295
  conduyt_get_product: ro("Get Product"),
285
296
  conduyt_create_product: create("Create Product"),
286
297
  conduyt_update_product: update("Update Product"),
298
+ conduyt_delete_product: update("Archive Product"), // answers { id, archived: true }; reversible with conduyt_update_product isActive true (products/[id]/route.ts DELETE)
287
299
  conduyt_list_templates: ro("List Templates"),
288
300
  conduyt_get_template: ro("Get Template"),
289
301
  conduyt_create_template: create("Create Template"),
@@ -18,12 +18,20 @@ import { formatResult, formatToolError } from "../client.js";
18
18
  const flowGraphSchema = z
19
19
  .object({ entryId: z.string(), nodes: z.array(z.unknown()) })
20
20
  .passthrough();
21
+ /** (#345) A flow's own recording and recording notice for calls coming into it. Strict like the API's 400s. */
22
+ const recordingChoice = z.enum(["inherit", "on", "off"]);
23
+ // Non-empty is expressed in the schema itself (an anyOf: record present, or disclosure present), so the JSON Schema clients
24
+ // read rejects {} like the API's 400 does; a zod refine would not reach the published schema.
25
+ const recordingOverrideSchema = z.union([
26
+ z.object({ record: recordingChoice, disclosure: recordingChoice.optional() }).strict(),
27
+ z.object({ record: recordingChoice.optional(), disclosure: recordingChoice }).strict(),
28
+ ]);
21
29
  export function registerCallFlowTools(server, client) {
22
30
  server.tool("conduyt_list_call_flows", "List call flows (IVR routing graphs) with their status (draft/published) and attached phone numbers.", {}, async () => {
23
31
  const result = await client.get("/api/v1/call-flows");
24
32
  return formatResult(result);
25
33
  });
26
- server.tool("conduyt_get_call_flow", "Get one call flow including its draft and published graphs.", {
34
+ server.tool("conduyt_get_call_flow", "Get one call flow including its draft and published graphs and recordingOverride ({ record, disclosure } for calls coming into this flow; null = follows the workspace setting).", {
27
35
  id: z.string().describe("Call flow UUID"),
28
36
  }, async ({ id }) => {
29
37
  const result = await client.get(`/api/v1/call-flows/${id}`);
@@ -37,12 +45,13 @@ export function registerCallFlowTools(server, client) {
37
45
  const result = await client.post("/api/v1/call-flows", params);
38
46
  return formatResult(result);
39
47
  });
40
- server.tool("conduyt_update_call_flow", "Update a call flow's DRAFT (name, number, graph). Published behavior does not change until the next publish. Replacing draftGraph REQUIRES expectedDraftRevision (the API 428s without it; a concurrent graph edit then 409s instead of being overwritten — the token is graph-specific, so live calls and publish never invalidate it).", {
48
+ server.tool("conduyt_update_call_flow", "Update a call flow (name, number, graph, recordingOverride). Name, number and graph change the DRAFT: published behavior does not change until the next publish. recordingOverride sets this flow's own recording and recording notice for calls coming into it (admin only: 403 for anyone else). Replacing draftGraph REQUIRES expectedDraftRevision (the API 428s without it; a concurrent graph edit then 409s instead of being overwritten; the token is graph-specific, so live calls and publish never invalidate it).", {
41
49
  id: z.string().describe("Call flow UUID"),
42
50
  name: z.string().optional().describe("New name"),
43
51
  phoneNumber: z.string().optional().describe("New E.164 number"),
44
52
  draftGraph: flowGraphSchema.optional().describe("Replacement draft graph — MUST have a string entryId and a nodes array; REQUIRES expectedDraftRevision. Kinds: entry, greeting, agent, group (queue.repeatRing = queue mode), menu (options[{digit,label,next}]), timing (hours, timezone, next/closedNext), voicemail, forward, hangup; every branch must reach an ending."),
45
53
  expectedDraftRevision: z.number().int().min(0).optional().describe("draftRevision from your last conduyt_get_call_flow read (REQUIRED when replacing draftGraph)"),
54
+ recordingOverride: recordingOverrideSchema.nullable().optional().describe("This flow's own recording choice for calls coming into this flow, over the workspace setting: { record?: inherit | on | off, disclosure?: inherit | on | off }. inherit = Follow workspace setting; record is the recording itself, disclosure is the recording notice (the wording stays the workspace's). A key left out keeps its stored value; null, or both inherit, clears the override so the flow follows the workspace. Any other key or value is a 400."),
46
55
  }, async ({ id, ...updates }) => {
47
56
  if (updates.draftGraph !== undefined && updates.expectedDraftRevision === undefined) {
48
57
  return formatToolError("Replacing draftGraph requires expectedDraftRevision — call conduyt_get_call_flow first and pass its draftRevision.");
@@ -1,5 +1,19 @@
1
1
  import { z } from "zod";
2
2
  import { formatResult } from "../client.js";
3
+ import { isPositiveAmount } from "./invoicing-checks.js";
4
+ // (parity25, conduyt-app batch25 #193 invoicing slice 1a-1) the typed answers the send routes give; a refusal is forwarded with its code, never retried
5
+ const SEND_CODES = "409 invoice_send_pending (an earlier send awaits the provider's confirmation; nothing was sent again, check the invoice later, do not send again), invoice_send_complained (the recipient marked an earlier send as spam), invoice_send_in_flight, invoice_not_sendable, no_contact; 503 gate_busy (nothing of this attempt exists; safe to try again shortly)";
6
+ const lineItem = z.object({
7
+ description: z.string().describe("Line item description"),
8
+ unitPrice: z.number().describe("Price per unit"),
9
+ quantity: z.number().optional().describe("Quantity (default 1)"),
10
+ productId: z.string().optional().describe("Product UUID to link"),
11
+ details: z.string().optional().describe("Extra text under the line"),
12
+ discountPercent: z.number().optional().describe("Discount on this line, percent"),
13
+ taxRateId: z.string().optional().describe("A saved tax rate (conduyt_list_tax_rates); the invoice keeps its own copy of the name and percent"),
14
+ taxName: z.string().optional().describe("A one-off tax name (with taxPercent)"),
15
+ taxPercent: z.number().optional().describe("A one-off tax percent (with taxName)"),
16
+ });
3
17
  export function registerInvoiceTools(server, client) {
4
18
  server.tool("conduyt_list_invoices", "List invoices with filtering by status, contact, or date range.", {
5
19
  status: z.string().optional().describe("Filter by status (e.g. 'draft', 'sent', 'paid', 'overdue', 'voided')"),
@@ -32,12 +46,7 @@ export function registerInvoiceTools(server, client) {
32
46
  return formatResult(result);
33
47
  });
34
48
  server.tool("conduyt_create_invoice", "Create a new invoice with line items. Automatically calculates subtotal, tax, and total.", {
35
- items: z.array(z.object({
36
- description: z.string().describe("Line item description"),
37
- unitPrice: z.number().describe("Price per unit"),
38
- quantity: z.number().optional().describe("Quantity (default 1)"),
39
- productId: z.string().optional().describe("Product UUID to link"),
40
- })).describe("Line items (at least 1 required)"),
49
+ items: z.array(lineItem).describe("Line items (at least 1 required)"),
41
50
  contactId: z.string().optional().describe("Bill-to contact UUID"),
42
51
  companyId: z.string().optional().describe("Bill-to company UUID"),
43
52
  dealId: z.string().optional().describe("Associated deal UUID"),
@@ -46,13 +55,18 @@ export function registerInvoiceTools(server, client) {
46
55
  currency: z.string().optional().describe("3-letter currency code (default: USD)"),
47
56
  notes: z.string().optional().describe("Notes visible to client"),
48
57
  terms: z.string().optional().describe("Payment terms"),
58
+ issueDate: z.string().optional().describe("Issue date (YYYY-MM-DD)"),
59
+ paymentTerms: z.string().optional().describe("Payment-terms preset; a preset sets the due date (400 due_date_set_by_terms if dueDate is also sent)"),
60
+ discountPercent: z.number().optional().describe("Invoice-level discount, percent"),
61
+ attachmentIds: z.array(z.string()).optional().describe("Uploaded file ids to attach"),
62
+ invoiceNumber: z.string().optional().describe("Invoice number (default: the next number)"),
49
63
  }, async (params) => {
50
64
  // The create route requires a valid currency (no server-side default),
51
65
  // so always send one — honoring the documented USD default.
52
66
  const result = await client.post("/api/v1/invoices", { ...params, currency: params.currency ?? "USD" });
53
67
  return formatResult(result);
54
68
  });
55
- server.tool("conduyt_update_invoice", "Update a draft invoice — change items, contact, due date, or terms. Cannot update paid or voided invoices.", {
69
+ server.tool("conduyt_update_invoice", "Update an invoice — change items, contact, due date, terms, issue date, discount or attachments. Cannot update paid or voided invoices (400). 409 refusals carry a code: total_below_paid (the new total is below the money already recorded), currency_locked (a payment exists), no_contact (a sent invoice keeps a contact), invoice_send_in_flight (a send still owes its outcome; try again in a moment).", {
56
70
  id: z.string().describe("Invoice UUID"),
57
71
  contactId: z.string().optional().describe("Updated bill-to contact"),
58
72
  companyId: z.string().optional().describe("Updated bill-to company"),
@@ -60,19 +74,61 @@ export function registerInvoiceTools(server, client) {
60
74
  notes: z.string().optional().describe("Updated notes"),
61
75
  terms: z.string().optional().describe("Updated terms"),
62
76
  taxRate: z.number().optional().describe("Updated tax rate"),
63
- items: z.array(z.object({
64
- description: z.string().describe("Line item description"),
65
- unitPrice: z.number().describe("Price per unit"),
66
- quantity: z.number().optional().describe("Quantity"),
67
- })).optional().describe("Replacement line items (replaces all existing items)"),
77
+ items: z.array(lineItem).optional().describe("Replacement line items (replaces all existing items)"),
78
+ issueDate: z.string().optional().describe("Updated issue date (YYYY-MM-DD)"),
79
+ paymentTerms: z.string().nullable().optional().describe("Payment-terms preset, or null to clear"),
80
+ discountPercent: z.number().optional().describe("Updated invoice-level discount, percent"),
81
+ attachmentIds: z.array(z.string()).optional().describe("Uploaded file ids to attach (replaces the attachments)"),
68
82
  }, async ({ id, ...updates }) => {
69
83
  const result = await client.patch(`/api/v1/invoices/${id}`, updates);
70
84
  return formatResult(result);
71
85
  });
72
- server.tool("conduyt_send_invoice", "Send an invoice to the contact via email. Generates PDF, creates Stripe payment link, and sends via email.", {
86
+ server.tool("conduyt_send_invoice", `Send an invoice to the contact via email. Generates PDF, creates Stripe payment link, and sends via email. A repeat is the current send or its retry, never a second email; resend true starts a NEW send. Refusals are forwarded with their code and never retried: ${SEND_CODES}. Text it is conduyt_send_sms with invoiceId; conduyt_get_invoice_send_options says what can be sent now.`, {
73
87
  id: z.string().describe("Invoice UUID — must be draft, pending, sent, or overdue"),
74
- }, async ({ id }) => {
75
- const result = await client.post(`/api/v1/invoices/${id}/send`, {});
88
+ resend: z.boolean().optional().describe("true sends the invoice again as a NEW send (a new intent key, a new email); omitted or false is the current send or its retry"),
89
+ }, async ({ id, resend }) => {
90
+ const result = await client.post(`/api/v1/invoices/${id}/send`, { resend: resend === true ? true : undefined });
91
+ return formatResult(result);
92
+ });
93
+ server.tool("conduyt_get_invoice_send_options", "What Send can do for an invoice right now (Email, Text it, Copy link; Mark as sent always works), each unavailable option with its reason, the hosted link and the exact text Text it would send.", { id: z.string().describe("Invoice UUID") }, async ({ id }) => {
94
+ const result = await client.get(`/api/v1/invoices/${id}/send-options`);
95
+ return formatResult(result);
96
+ });
97
+ server.tool("conduyt_get_invoice_activity", "The invoice's history, newest first: sent, viewed, payments, paid, overdue, voided with its reason.", { id: z.string().describe("Invoice UUID") }, async ({ id }) => {
98
+ const result = await client.get(`/api/v1/invoices/${id}/activity`);
99
+ return formatResult(result);
100
+ });
101
+ server.tool("conduyt_mark_invoice_sent", "Record that an invoice went out without the email: delivered another way (via manual) or its link copied to send (via link). A draft moves to Sent; a sent, viewed, partly paid or overdue invoice keeps its status and records the send. 409 invoice_not_sendable (paid or voided) and no_contact are forwarded with their code. Text it is conduyt_send_sms with invoiceId.", {
102
+ id: z.string().describe("Invoice UUID"),
103
+ via: z.enum(["manual", "link"]).describe("manual = delivered another way; link = the link was copied to send"),
104
+ }, async ({ id, via }) => {
105
+ const result = await client.post(`/api/v1/invoices/${id}/mark-sent`, { via });
106
+ return formatResult(result);
107
+ });
108
+ server.tool("conduyt_record_invoice_payment", "Record a payment received outside Stripe (cash, check, bank). The amount must be above 0 and at most the balance due (400 naming the balance); 409 invoice_zero_balance when nothing is owed. A recorded payment cannot be removed through the API. Needs the record_payment permission.", {
109
+ id: z.string().describe("Invoice UUID"),
110
+ amount: z.union([z.number(), z.string()]).refine(isPositiveAmount, "amount must be a finite number above 0 (a decimal such as 12.50)").describe("Amount received: a number (or numeric string) above 0, for example 12.50"),
111
+ method: z.enum(["card", "bank", "bank_transfer", "cash", "check", "other"]).optional().describe("How it was paid (default card)"),
112
+ reference: z.string().optional().describe("A check number, transfer id or other reference"),
113
+ notes: z.string().max(2000).optional().describe("A note kept with the payment (max 2000 characters)"),
114
+ paidAt: z.string().min(1).max(40).optional().describe("When it was received: a YYYY-MM-DD day or an ISO 8601 date-time"),
115
+ }, async ({ id, amount, method, reference, notes, paidAt }) => {
116
+ const result = await client.post(`/api/v1/invoices/${id}/payments`, { amount, method, reference, notes, paidAt });
117
+ return formatResult(result);
118
+ });
119
+ server.tool("conduyt_void_invoice", "Void an invoice with a reason (kept on the invoice and in its history). Destructive: a voided invoice cannot be edited, sent or paid. A paid or already voided invoice is refused (400); a missing or blank reason is 400 void_reason_required, over 500 characters 400 void_reason_too_long. Needs the record_payment permission.", {
120
+ id: z.string().describe("Invoice UUID"),
121
+ reason: z.string().trim().min(1).max(500).describe("Why the invoice is voided (required, 1-500 characters after trimming)"),
122
+ }, async ({ id, reason }) => {
123
+ const result = await client.post(`/api/v1/invoices/${id}/void`, { reason });
124
+ return formatResult(result);
125
+ });
126
+ server.tool("conduyt_delete_invoice", "Delete a DRAFT invoice with no payment history (anything else is a 400; void an invoice that went out instead). Refused while a send of it is in flight: 409 invoice_send_in_flight (check it again in a moment). Destructive.", { id: z.string().describe("Invoice UUID") }, async ({ id }) => {
127
+ const result = await client.del(`/api/v1/invoices/${id}`);
128
+ return formatResult(result);
129
+ });
130
+ server.tool("conduyt_duplicate_invoice", "Copy an invoice into a new DRAFT: the same customer, company, deal, currency, payment terms, notes, terms, discount and lines, a new number, issued today. The bill-to contact and deal are copied only when the caller may still attach them.", { id: z.string().describe("Invoice UUID to copy") }, async ({ id }) => {
131
+ const result = await client.post(`/api/v1/invoices/${id}/duplicate`, {});
76
132
  return formatResult(result);
77
133
  });
78
134
  }
@@ -0,0 +1,2 @@
1
+ export declare function isPositiveAmount(v: unknown): boolean;
2
+ export declare function isTaxPercent(v: unknown): boolean;
@@ -0,0 +1,29 @@
1
+ // (parity25 r2, Codex parity25-r1 P2-1 and P2-2) the server's number rules, mirrored before any request: a decimal literal only
2
+ // (a string like "abc", "-1", "1e3" is refused), finite, and either above 0 (payment amount) or within 0..100 with at most three
3
+ // decimals (tax percent, trailing zeros do not count: "8.8750" is three).
4
+ const DECIMAL_LITERAL = /^\d+(\.\d+)?$/;
5
+ function asNumber(v) {
6
+ if (typeof v === "number")
7
+ return Number.isFinite(v) ? { n: v, text: String(v) } : null;
8
+ if (typeof v !== "string")
9
+ return null;
10
+ const t = v.trim();
11
+ if (!DECIMAL_LITERAL.test(t))
12
+ return null;
13
+ const n = Number(t);
14
+ return Number.isFinite(n) ? { n, text: t } : null;
15
+ }
16
+ export function isPositiveAmount(v) {
17
+ const x = asNumber(v);
18
+ return x !== null && x.n > 0;
19
+ }
20
+ function decimalPlaces(text) {
21
+ if (/e/i.test(text))
22
+ return Number.POSITIVE_INFINITY; // an exponent form of a JS number (1e-7): not a plain decimal
23
+ const frac = text.split(".")[1] ?? "";
24
+ return frac.replace(/0+$/, "").length;
25
+ }
26
+ export function isTaxPercent(v) {
27
+ const x = asNumber(v);
28
+ return x !== null && x.n >= 0 && x.n <= 100 && decimalPlaces(x.text) <= 3;
29
+ }
@@ -75,7 +75,12 @@ export function registerMessagingTools(server, client) {
75
75
  whatsappContentSid: z.string().regex(/^HX[0-9a-fA-F]{32}$/).optional().describe("transport whatsapp: an APPROVED WhatsApp template (Twilio Content SID from conduyt_whatsapp_templates); Conduyt reads the template from Twilio at send time, records its text with the variables in place, and refuses an unlisted (whatsapp_template_invalid) or unapproved (whatsapp_template_not_approved) one. body is still required but the template's text is what is sent and recorded."),
76
76
  whatsappContentVariables: z.record(z.string().regex(/^\d+$/), z.string().max(1024)).optional().describe("transport whatsapp with a template: placeholder number → value, e.g. { \"1\": \"Alex\" }"),
77
77
  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
+ 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
+ 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."),
78
80
  }, async (params) => {
81
+ // (parity25 r2) resend goes on the wire only when true
82
+ if (params.resend !== true)
83
+ delete params.resend;
79
84
  const result = await client.post("/api/v1/messages/sms/send", params);
80
85
  return formatResult(result);
81
86
  });
@@ -35,6 +35,7 @@ export function registerProductTools(server, client) {
35
35
  taxable: z.boolean().optional().describe("Whether product is taxable (default true)"),
36
36
  isActive: z.boolean().optional().describe("Whether product is active (default true)"),
37
37
  metadata: z.any().optional().describe("Additional metadata object"),
38
+ defaultTaxRateId: z.string().uuid().nullable().optional().describe("The saved tax rate (conduyt_list_tax_rates) new invoice lines from this product start with"),
38
39
  }, async (params) => {
39
40
  const result = await client.post("/api/v1/products", params);
40
41
  return formatResult(result);
@@ -48,8 +49,15 @@ export function registerProductTools(server, client) {
48
49
  currency: z.string().optional().describe("Updated currency"),
49
50
  taxable: z.boolean().optional().describe("Updated taxable status"),
50
51
  isActive: z.boolean().optional().describe("Updated active status"),
52
+ unit: z.string().optional().describe("Updated unit of measure"),
53
+ metadata: z.any().optional().describe("Updated metadata object"),
54
+ defaultTaxRateId: z.string().uuid().nullable().optional().describe("The saved tax rate new invoice lines from this product start with; null clears it"),
51
55
  }, async ({ id, ...updates }) => {
52
56
  const result = await client.patch(`/api/v1/products/${id}`, updates);
53
57
  return formatResult(result);
54
58
  });
59
+ server.tool("conduyt_delete_product", "Archive (delete) a product: it leaves the catalog pickers and answers { id, archived: true }. Needs the invoices delete permission.", { id: z.string().describe("Product UUID") }, async ({ id }) => {
60
+ const result = await client.del(`/api/v1/products/${id}`);
61
+ return formatResult(result);
62
+ });
55
63
  }
@@ -0,0 +1,3 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { ConduytClient } from "../client.js";
3
+ export declare function registerTaxRateTools(server: McpServer, client: ConduytClient): void;
@@ -0,0 +1,34 @@
1
+ import { z } from "zod";
2
+ import { formatResult } from "../client.js";
3
+ import { isTaxPercent } from "./invoicing-checks.js";
4
+ // (parity25, conduyt-app batch25 #193 invoicing slice 1a-1) saved tax rates for invoice lines and products
5
+ const name = z.string().trim().min(1).max(80).describe("Rate name, 1-80 characters after trimming");
6
+ const percent = z.union([z.number(), z.string()]).refine(isTaxPercent, "percent must be a number from 0 to 100 with at most three decimals").describe("0 to 100 with at most three decimals (a number or numeric string, \"8.875\" is accepted); anything else is a 400");
7
+ export function registerTaxRateTools(server, client) {
8
+ server.tool("conduyt_list_tax_rates", "List the account's saved tax rates (the ones invoice lines and products can use). Archived rates are hidden unless includeArchived is true.", {
9
+ includeArchived: z.boolean().optional().describe("Also list archived rates"),
10
+ }, async ({ includeArchived }) => {
11
+ const params = new URLSearchParams();
12
+ if (includeArchived === true)
13
+ params.set("include_archived", "true");
14
+ const result = await client.get(`/api/v1/tax-rates?${params}`);
15
+ return formatResult(result);
16
+ });
17
+ server.tool("conduyt_create_tax_rate", "Create a saved tax rate. An account keeps up to a fixed number of active rates: 409 tax_rate_cap (archive one first).", { name, percent }, async (params) => {
18
+ const result = await client.post("/api/v1/tax-rates", params);
19
+ return formatResult(result);
20
+ });
21
+ server.tool("conduyt_update_tax_rate", "Rename a tax rate, change its percent, or archive / restore it (isActive). Invoices that already used the rate keep their own copy of the name and percent; only new lines pick up a change. Archiving or restoring needs the invoices delete permission (403 otherwise); restoring past the cap is 409 tax_rate_cap.", {
22
+ id: z.string().describe("Tax rate UUID"),
23
+ name: name.optional(),
24
+ percent: percent.optional(),
25
+ isActive: z.boolean().optional().describe("false archives the rate, true restores it"),
26
+ }, async ({ id, ...updates }) => {
27
+ const result = await client.patch(`/api/v1/tax-rates/${id}`, updates);
28
+ return formatResult(result);
29
+ });
30
+ server.tool("conduyt_archive_tax_rate", "Archive a tax rate (hidden from the pickers; products that defaulted to it keep it until changed; restore with conduyt_update_tax_rate isActive true). Answers { id, archived }. Needs the invoices delete permission.", { id: z.string().describe("Tax rate UUID") }, async ({ id }) => {
31
+ const result = await client.del(`/api/v1/tax-rates/${id}`);
32
+ return formatResult(result);
33
+ });
34
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conduyt-mcp",
3
- "version": "4.105.13",
3
+ "version": "4.105.15",
4
4
  "mcpName": "com.conduyt/mcp",
5
5
  "description": "MCP server for Conduyt CRM — expose CRM operations as AI-accessible tools",
6
6
  "type": "module",
@@ -1,11 +1,11 @@
1
1
  {
2
- "generatedAt": "2026-11-10T02:51:13.093Z",
3
- "toolCount": 399,
4
- "totalEndpoints": 1177,
2
+ "generatedAt": "2026-11-10T15:00:57.506Z",
3
+ "toolCount": 411,
4
+ "totalEndpoints": 1189,
5
5
  "counts": {
6
- "covered": 351,
7
- "excluded": 364,
8
- "planned": 462,
6
+ "covered": 363,
7
+ "excluded": 368,
8
+ "planned": 458,
9
9
  "uncategorized": 0
10
10
  },
11
11
  "matrix": {
@@ -186,8 +186,28 @@
186
186
  ]
187
187
  },
188
188
  "DELETE /api/v1/invoices/:id": {
189
- "status": "planned",
190
- "reason": "invoicing"
189
+ "status": "covered",
190
+ "tools": [
191
+ "conduyt_delete_invoice"
192
+ ]
193
+ },
194
+ "GET /api/v1/invoices/:id/activity": {
195
+ "status": "covered",
196
+ "tools": [
197
+ "conduyt_get_invoice_activity"
198
+ ]
199
+ },
200
+ "POST /api/v1/invoices/:id/duplicate": {
201
+ "status": "covered",
202
+ "tools": [
203
+ "conduyt_duplicate_invoice"
204
+ ]
205
+ },
206
+ "POST /api/v1/invoices/:id/mark-sent": {
207
+ "status": "covered",
208
+ "tools": [
209
+ "conduyt_mark_invoice_sent"
210
+ ]
191
211
  },
192
212
  "POST /api/v1/invoices/:id/overpayments/:overpaymentId/manual-refund": {
193
213
  "status": "planned",
@@ -206,8 +226,10 @@
206
226
  "reason": "invoicing"
207
227
  },
208
228
  "POST /api/v1/invoices/:id/payments": {
209
- "status": "planned",
210
- "reason": "invoicing"
229
+ "status": "covered",
230
+ "tools": [
231
+ "conduyt_record_invoice_payment"
232
+ ]
211
233
  },
212
234
  "GET /api/v1/invoices/:id/pdf": {
213
235
  "status": "planned",
@@ -219,9 +241,17 @@
219
241
  "conduyt_send_invoice"
220
242
  ]
221
243
  },
244
+ "GET /api/v1/invoices/:id/send-options": {
245
+ "status": "covered",
246
+ "tools": [
247
+ "conduyt_get_invoice_send_options"
248
+ ]
249
+ },
222
250
  "POST /api/v1/invoices/:id/void": {
223
- "status": "planned",
224
- "reason": "invoicing"
251
+ "status": "covered",
252
+ "tools": [
253
+ "conduyt_void_invoice"
254
+ ]
225
255
  },
226
256
  "GET /api/v1/invoices/next-number": {
227
257
  "status": "planned",
@@ -389,6 +419,18 @@
389
419
  "status": "excluded",
390
420
  "reason": "super-admin platform operations (Conduyt staff only)"
391
421
  },
422
+ "GET /api/v1/admin/external-deletions/calendar-ops": {
423
+ "status": "excluded",
424
+ "reason": "super-admin platform operations (Conduyt staff only)"
425
+ },
426
+ "POST /api/v1/admin/external-deletions/calendar-ops/:id/resolve": {
427
+ "status": "excluded",
428
+ "reason": "super-admin platform operations (Conduyt staff only)"
429
+ },
430
+ "POST /api/v1/admin/external-deletions/calendar-ops/:id/retry": {
431
+ "status": "excluded",
432
+ "reason": "super-admin platform operations (Conduyt staff only)"
433
+ },
392
434
  "POST /api/v1/admin/external-deletions/records/keep": {
393
435
  "status": "excluded",
394
436
  "reason": "super-admin platform operations (Conduyt staff only)"
@@ -2022,6 +2064,10 @@
2022
2064
  "status": "excluded",
2023
2065
  "reason": "CRON_SECRET-gated infrastructure jobs; never key-callable"
2024
2066
  },
2067
+ "GET /api/v1/cron/invoice-overdue": {
2068
+ "status": "excluded",
2069
+ "reason": "CRON_SECRET-gated infrastructure jobs; never key-callable"
2070
+ },
2025
2071
  "GET /api/v1/cron/job-run-monitor": {
2026
2072
  "status": "excluded",
2027
2073
  "reason": "CRON_SECRET-gated infrastructure jobs; never key-callable"
@@ -3946,8 +3992,10 @@
3946
3992
  ]
3947
3993
  },
3948
3994
  "DELETE /api/v1/products/:id": {
3949
- "status": "planned",
3950
- "reason": "product catalog subroutes"
3995
+ "status": "covered",
3996
+ "tools": [
3997
+ "conduyt_delete_product"
3998
+ ]
3951
3999
  },
3952
4000
  "GET /api/v1/public/booking/:slug": {
3953
4001
  "status": "excluded",
@@ -5101,6 +5149,30 @@
5101
5149
  "status": "planned",
5102
5150
  "reason": "task subroutes beyond core CRUD"
5103
5151
  },
5152
+ "GET /api/v1/tax-rates": {
5153
+ "status": "covered",
5154
+ "tools": [
5155
+ "conduyt_list_tax_rates"
5156
+ ]
5157
+ },
5158
+ "POST /api/v1/tax-rates": {
5159
+ "status": "covered",
5160
+ "tools": [
5161
+ "conduyt_create_tax_rate"
5162
+ ]
5163
+ },
5164
+ "PATCH /api/v1/tax-rates/:id": {
5165
+ "status": "covered",
5166
+ "tools": [
5167
+ "conduyt_update_tax_rate"
5168
+ ]
5169
+ },
5170
+ "DELETE /api/v1/tax-rates/:id": {
5171
+ "status": "covered",
5172
+ "tools": [
5173
+ "conduyt_archive_tax_rate"
5174
+ ]
5175
+ },
5104
5176
  "GET /api/v1/team/members": {
5105
5177
  "status": "planned",
5106
5178
  "reason": "team member listing alias"