conduyt-mcp 4.105.25 → 4.105.26

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.
@@ -33,6 +33,8 @@ export const TOOL_ANNOTATIONS = {
33
33
  conduyt_refingerprint_import: destroy("Confirm Or Discard Parked Import"),
34
34
  conduyt_list_deals: ro("List Deals"),
35
35
  conduyt_pipeline_health: ro("Get Pipeline Health"),
36
+ conduyt_get_deals_forecast: ro("Get Deals Forecast"),
37
+ conduyt_lookup_deal_by_lead_id: ro("Look Up Deal By Lead ID"),
36
38
  conduyt_pipeline_health_fix_deal: update("Fix Deal From Pipeline Health"),
37
39
  conduyt_pipeline_health_fix_next_action: create("Set Next Action From Pipeline Health"),
38
40
  conduyt_get_deal: ro("Get Deal"),
@@ -266,6 +268,7 @@ export const TOOL_ANNOTATIONS = {
266
268
  conduyt_ai_import_contacts: create("Import Contacts With AI"),
267
269
  conduyt_export_contacts: create("Export Contacts"),
268
270
  conduyt_export_deals: create("Export Deals"),
271
+ conduyt_export_companies: create("Export Companies"), // GET /companies/export appends an Activity row and an audit log row on EVERY call (not readOnly, not idempotent), like the contacts and deals exports
269
272
  conduyt_bulk_tag_contacts: update("Bulk Tag Contacts"),
270
273
  conduyt_bulk_untag_contacts: update("Bulk Untag Contacts"),
271
274
  conduyt_bulk_edit_contacts: row("Bulk Edit Contacts", false, true, true), // optedOutSms / optedOutEmail / doNotContact can clear consent and re-enable outreach; switches are state-predicated absolute writes, so a repeat of the same body lands the same state
@@ -1,6 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { formatResult } from "../client.js";
3
3
  import { INVALID_NUMBER_REFUSALS } from "./contacts.js";
4
+ import { strictInput } from "./strict.js";
4
5
  /** (#136, Codex r1 m2) POST /bulk/contacts/update is NOT atomic and answers per row: an impossible phone is a per-row success:false inside HTTP 200 (no code) while other rows commit; the route takes no country */
5
6
  export const BULK_UPDATE_REFUSALS = " Results are PER ROW inside an HTTP 200 (not atomic: some rows can be saved while others fail): read data.summary { total, succeeded, failed } and data.results, each { id, success, error? }. An impossible US/Canada number (area code or exchange starting 0 or 1) fails only that row, success: false with the error text (no phone_invalid code, no top-level 400), and nothing is saved for that row. This route does not take country: a country-only row fails as a row, and a country sent beside another field is ignored while that field is applied (use conduyt_bulk_edit_contacts for a country; it refuses a null or blank country 400 country_invalid).";
6
7
  export function registerBulkTools(server, client) {
@@ -83,6 +84,35 @@ export function registerBulkTools(server, client) {
83
84
  });
84
85
  return formatResult(result);
85
86
  });
87
+ strictInput(server.tool("conduyt_export_companies", "Export companies as JSON with filtering (GET /api/v1/companies/export, JSON only here): { companies, meta { total, exported_at, filters_applied } }. Owner or admin only (otherwise 403); Secure custom field values are always masked. At most 50,000 rows: past that 413 and nothing is exported (narrow the filters); the response is bounded at 25 MB (past it a structured response_too_large error says to narrow the filters). Rate limited to 5 exports a minute per workspace and address (429, wait Retry-After). The export is audited (an Activity row and an audit log row), so it is not a pure read. 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 company exported) and two different values of format or of a single-value filter 400 query_param_conflict { message, param }; ownerId or ids that are not UUIDs are 400. This tool sends only accepted names.", {
88
+ search: z.string().optional().describe("Search name, domain or phone"),
89
+ industry: z.string().optional().describe("Filter by industry"),
90
+ ownerId: z.string().uuid().optional().describe("Filter by owner user UUID"),
91
+ lifecycleStage: z.string().optional().describe("Filter by lifecycle stage"),
92
+ hasOpenDeals: z.boolean().optional().describe("true = only companies with an open deal (false sends nothing)"),
93
+ ids: z.array(z.string().uuid()).min(1).max(1000).optional().describe("Only these company UUIDs (1 to 1000; omit for no id filter: an empty list is refused, never an unfiltered export)"),
94
+ }, async (params) => {
95
+ const qp = new URLSearchParams({ format: "json" });
96
+ if (params.search)
97
+ qp.set("search", params.search);
98
+ if (params.industry)
99
+ qp.set("industry", params.industry);
100
+ if (params.ownerId)
101
+ qp.set("ownerId", params.ownerId);
102
+ if (params.lifecycleStage)
103
+ qp.set("lifecycleStage", params.lifecycleStage);
104
+ if (params.hasOpenDeals === true)
105
+ qp.set("hasOpenDeals", "true");
106
+ if (params.ids && params.ids.length > 0)
107
+ qp.set("ids", params.ids.join(","));
108
+ // Same widened-but-bounded budget as the contacts and deals exports, but never retried.
109
+ const result = await client.get(`/api/v1/companies/export?${qp}`, {
110
+ timeoutMs: 120_000,
111
+ maxResponseBytes: 25_000_000,
112
+ noRetry: true, // the export appends audit rows: a lost response is never replayed by the client
113
+ });
114
+ return formatResult(result);
115
+ }));
86
116
  server.tool("conduyt_bulk_tag_contacts", "Add one tag to many contacts in a single call. Requires contacts:edit.", {
87
117
  contactIds: z.array(z.string()).describe("Contact UUIDs to tag"),
88
118
  tagId: z.string().describe("Tag UUID to add to all of them"),
@@ -172,6 +172,23 @@ export function registerDealTools(server, client) {
172
172
  const result = qs ? await client.get("/api/v1/deals/inspection?" + qs) : await client.get("/api/v1/deals/inspection");
173
173
  return formatResult(result);
174
174
  }));
175
+ strictInput(server.tool("conduyt_get_deals_forecast", "Weighted pipeline value and the probability forecast (GET /api/v1/deals/forecast): per pipeline and stage, the year's monthly open and won values, win rate. Needs deals.view (an API key needs the deals scope) and a Professional-or-above plan: a lower plan, a free trial included, is 403 code plan_required; an account whose billing is not active is 402. `pipeline` limits it to one pipeline (a UUID that is not one is 400; a hidden or unknown one is 404 Pipeline not found); omit it for every visible active pipeline. The API judges the query names: a name the route does not read is 400 unknown_query_param { message, unknown[], accepted[], didYouMean } (it used to be ignored and every pipeline was forecast); this tool sends only `pipeline`. Read-only.", {
176
+ pipeline: z.string().uuid().optional().describe("Pipeline UUID; omit for every visible active pipeline."),
177
+ }, async ({ pipeline }) => {
178
+ // literal paths on purpose: the coverage scanner reads the first string after client.get(
179
+ const result = pipeline !== undefined ? await client.get("/api/v1/deals/forecast?pipeline=" + encodeURIComponent(pipeline)) : await client.get("/api/v1/deals/forecast");
180
+ return formatResult(result);
181
+ }));
182
+ strictInput(server.tool("conduyt_lookup_deal_by_lead_id", "Resolve a Lead ID to deals (GET /api/v1/deals/lead-id): the first 8 to 32 hex characters of a deal id or of a contact id, dashes optional, any case (a whole id matches exactly). Answers { term, total, deals[{ id, title, pipeline, stage, contact, matchedBy: deal|contact, onBoard }] }; contact is null when the caller may not see it, and a Lead ID the caller cannot see answers like one nobody has (total 0). Read with the deal-detail visibility (deals.view, owned or shared leads, the pipeline allowlist). 400 when the term is not a Lead ID, when more than 100 visible records share it, or on a limit outside 1..20 (default 5; total counts every match); 400 unknown_query_param { message, unknown[], accepted[], didYouMean } for a name the route does not read (this tool sends only term and limit). Read-only.", {
183
+ term: z.string().regex(/^[0-9a-fA-F-]+$/, "a Lead ID is hex characters (dashes optional)").refine((t) => /^[0-9a-f]{8,32}$/i.test(t.replace(/-/g, "")), "a Lead ID is 8 to 32 hex digits once dashes are removed").describe("The Lead ID: 8 to 32 hex characters of a deal or contact id (dashes optional)."),
184
+ limit: z.number().int().min(1).max(20).optional().describe("Deals to list, 1-20 (default 5); total counts every match."),
185
+ }, async ({ term, limit }) => {
186
+ const params = new URLSearchParams({ term });
187
+ if (limit !== undefined)
188
+ params.set("limit", String(limit));
189
+ const result = await client.get(`/api/v1/deals/lead-id?${params}`);
190
+ return formatResult(result);
191
+ }));
175
192
  strictInput(server.tool("conduyt_pipeline_health_fix_deal", "Pipeline health QUICK FIX for a deal row (PATCH /api/v1/deals/{id} with checkOrigin). Pass the health check the row came from, the deal's updatedAt exactly as the health row carried it (expectedUpdatedAt, REQUIRED), and ONLY that check's fix: stale = stageId (+ optional expectedStageId, the stage the move was chosen against); unassigned = assignedTo; missing_close_date = expectedCloseDate; missing_contact = contactId. Each set to a value; any other combination is refused 400 health_fix_mismatch and nothing is read or written. For the next-action checks (high_value_idle, needs_action) use conduyt_pipeline_health_fix_next_action instead. Refusals reach you verbatim (status, server message, code, and the deal's CURRENT health row) and are NEVER retried. Error text grammar: `Conduyt API <status>: <message>[ [Retry-After: Ns]][ <one JSON object, the final token>]` (see README, Error text grammar). 409 deal_changed (the deal is no longer at expectedUpdatedAt; error text carries updatedAt and the current row: read it, choose again against row.updatedAt), 409 deal_check_cleared (the deal no longer fails that check; nothing written), a 409 without a code (a stage move by another writer, a stale expectedStageId, an in-flight publication), 400 health_fix_mismatch, 404 (no such deal, or your key cannot see it). The row in a refusal is null when your key can no longer see the deal. Ordinary edits (several fields, no health context) stay on conduyt_update_deal.", {
176
193
  dealId: z.string().uuid().describe("Deal UUID"),
177
194
  checkOrigin: z.enum(["stale", "unassigned", "missing_close_date", "missing_contact"]).describe("The health check this edit fixes"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conduyt-mcp",
3
- "version": "4.105.25",
3
+ "version": "4.105.26",
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
2
  "generatedAt": "2026-11-14T00:45:01.812Z",
3
- "toolCount": 430,
3
+ "toolCount": 433,
4
4
  "totalEndpoints": 1208,
5
5
  "counts": {
6
- "covered": 379,
6
+ "covered": 382,
7
7
  "excluded": 372,
8
- "planned": 457,
8
+ "planned": 454,
9
9
  "uncategorized": 0
10
10
  },
11
11
  "matrix": {
@@ -1762,8 +1762,10 @@
1762
1762
  "reason": "company subroutes beyond core CRUD"
1763
1763
  },
1764
1764
  "GET /api/v1/companies/export": {
1765
- "status": "planned",
1766
- "reason": "company subroutes beyond core CRUD"
1765
+ "status": "covered",
1766
+ "tools": [
1767
+ "conduyt_export_companies"
1768
+ ]
1767
1769
  },
1768
1770
  "POST /api/v1/companies/merge": {
1769
1771
  "status": "planned",
@@ -2729,8 +2731,10 @@
2729
2731
  ]
2730
2732
  },
2731
2733
  "GET /api/v1/deals/forecast": {
2732
- "status": "planned",
2733
- "reason": "deal subroutes beyond core CRUD (history, files, links)"
2734
+ "status": "covered",
2735
+ "tools": [
2736
+ "conduyt_get_deals_forecast"
2737
+ ]
2734
2738
  },
2735
2739
  "GET /api/v1/deals/inspection": {
2736
2740
  "status": "covered",
@@ -2739,8 +2743,10 @@
2739
2743
  ]
2740
2744
  },
2741
2745
  "GET /api/v1/deals/lead-id": {
2742
- "status": "planned",
2743
- "reason": "deal subroutes beyond core CRUD (history, files, links)"
2746
+ "status": "covered",
2747
+ "tools": [
2748
+ "conduyt_lookup_deal_by_lead_id"
2749
+ ]
2744
2750
  },
2745
2751
  "POST /api/v1/deals/probabilities": {
2746
2752
  "status": "planned",