@agifyai/leadify-mcp 8.3.4 → 8.3.6

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
@@ -181,6 +181,8 @@ Conséquences pratiques :
181
181
  | `test_api_key` | Vérifier que la clé API configurée est valide (health check). |
182
182
  | `list_lead_groups` | Lister les groupes accessibles d'une organisation explicitement sélectionnée, en vue compacte. |
183
183
  | `get_lead_group` | Consulter les métadonnées compactes d'un groupe accessible par son ID. |
184
+ | `create_lead_group` | Créer un groupe et choisir son type canonique optionnel (`GENERIC`, `COMPANY` ou `PERSON`) via `entity_kind`. |
185
+ | `update_lead_group` | Modifier un groupe, y compris son `entity_kind`, avec réconciliation du schéma côté Leadify. |
184
186
  | `add_leads` | Ajouter un ou plusieurs leads à un groupe. |
185
187
  | `get_leads` | Rechercher et lister des leads avec filtres, recherche et pagination. |
186
188
  | `get_lead` | Récupérer les détails complets d'un lead par son ID. |
package/dist/server.js CHANGED
@@ -17,7 +17,7 @@ import { registerLeadViewTools } from "./tools/views.js";
17
17
  export function createServer() {
18
18
  const server = new McpServer({
19
19
  name: "leadify",
20
- version: "8.3.2",
20
+ version: "8.3.6",
21
21
  });
22
22
  registerAuthTools(server);
23
23
  registerOrganizationTools(server);
@@ -1,2 +1,5 @@
1
1
  import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
- export declare function registerLeadGroupTools(server: McpServer): void;
2
+ import { type LeadifyClient } from "../client.js";
3
+ type LeadGroupWriteClient = Pick<LeadifyClient, "post" | "put">;
4
+ export declare function registerLeadGroupTools(server: McpServer, writeClient?: LeadGroupWriteClient): void;
5
+ export {};
@@ -9,7 +9,8 @@ const DISABLABLE_TOOLS = [
9
9
  "linkedin_company",
10
10
  "skool_member",
11
11
  ];
12
- export function registerLeadGroupTools(server) {
12
+ const ENTITY_KINDS = ["GENERIC", "COMPANY", "PERSON"];
13
+ export function registerLeadGroupTools(server, writeClient) {
13
14
  // ── create_lead_group ──────────────────────────────────────────────────
14
15
  server.tool("create_lead_group", "Create a new lead group in the specified organization. A lead group holds leads, a " +
15
16
  "schema, and an optional persona assignment. Use list_organizations first to find the " +
@@ -20,6 +21,11 @@ export function registerLeadGroupTools(server) {
20
21
  .string()
21
22
  .describe("Target organization ID (Clerk org ID). Get one via list_organizations."),
22
23
  description: z.string().nullable().optional().describe("Group description."),
24
+ entity_kind: z
25
+ .enum(ENTITY_KINDS)
26
+ .optional()
27
+ .describe("Canonical entity type stored in this group: GENERIC, COMPANY, or PERSON. " +
28
+ "Changing it makes Leadify reconcile the group schema for that entity type."),
23
29
  persona_types: z
24
30
  .array(z.string())
25
31
  .optional()
@@ -50,6 +56,8 @@ export function registerLeadGroupTools(server) {
50
56
  };
51
57
  if (params.description !== undefined)
52
58
  body.description = params.description;
59
+ if (params.entity_kind !== undefined)
60
+ body.entityKind = params.entity_kind;
53
61
  if (params.persona_types !== undefined)
54
62
  body.personaTypes = params.persona_types;
55
63
  if (params.company_profile !== undefined)
@@ -58,7 +66,7 @@ export function registerLeadGroupTools(server) {
58
66
  body.disabledTools = params.disabled_tools;
59
67
  if (params.persona_id !== undefined)
60
68
  body.personaId = params.persona_id;
61
- const data = await getClient().post("/api/lead-group", body);
69
+ const data = await (writeClient ?? getClient()).post("/api/lead-group", body);
62
70
  return toolResult(data);
63
71
  }
64
72
  catch (error) {
@@ -73,6 +81,11 @@ export function registerLeadGroupTools(server) {
73
81
  id: z.string().describe("Lead group ID to update."),
74
82
  name: z.string().optional().describe("New group name."),
75
83
  description: z.string().nullable().optional().describe("New group description."),
84
+ entity_kind: z
85
+ .enum(ENTITY_KINDS)
86
+ .optional()
87
+ .describe("New canonical entity type: GENERIC, COMPANY, or PERSON. Leadify reconciles the " +
88
+ "group schema after the type change."),
76
89
  persona_id: z
77
90
  .string()
78
91
  .nullable()
@@ -99,6 +112,8 @@ export function registerLeadGroupTools(server) {
99
112
  body.name = params.name;
100
113
  if (params.description !== undefined)
101
114
  body.description = params.description;
115
+ if (params.entity_kind !== undefined)
116
+ body.entityKind = params.entity_kind;
102
117
  if (params.persona_id !== undefined)
103
118
  body.personaId = params.persona_id;
104
119
  if (params.persona_types !== undefined)
@@ -107,7 +122,7 @@ export function registerLeadGroupTools(server) {
107
122
  body.companyProfile = params.company_profile;
108
123
  if (params.disabled_tools !== undefined)
109
124
  body.disabledTools = params.disabled_tools;
110
- const data = await getClient().put(`/api/lead-group/${encodeURIComponent(params.id)}`, body);
125
+ const data = await (writeClient ?? getClient()).put(`/api/lead-group/${encodeURIComponent(params.id)}`, body);
111
126
  return toolResult(data);
112
127
  }
113
128
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agifyai/leadify-mcp",
3
- "version": "8.3.4",
3
+ "version": "8.3.6",
4
4
  "description": "MCP server for Leadify lead management API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",