@trylighthouse/mcp-server 0.1.2 → 0.1.3
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/build/index.js +67 -6
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -384,11 +384,13 @@ server.registerTool("lighthouse_crm_delete_record", {
|
|
|
384
384
|
// ─── CRM: Lists ──────────────────────────────────────────
|
|
385
385
|
server.registerTool("lighthouse_crm_create_list", {
|
|
386
386
|
title: "Create CRM List",
|
|
387
|
-
description: "Create a new CRM list to organize records."
|
|
387
|
+
description: "Create a new CRM list to organize records. Defaults to 'private' visibility. " +
|
|
388
|
+
"To share with specific teams after creation, use lighthouse_crm_share_list_with_teams. " +
|
|
389
|
+
"Requires lists.edit permission.",
|
|
388
390
|
inputSchema: {
|
|
389
391
|
name: z.string().describe("List name"),
|
|
390
|
-
type: z.enum(["company", "person", "deal"
|
|
391
|
-
sharing: z.enum(["private", "workspace"]).default("private").optional().describe("Visibility: 'private' or 'workspace'"),
|
|
392
|
+
type: z.enum(["company", "person", "deal"]).describe("Record type for this list"),
|
|
393
|
+
sharing: z.enum(["private", "workspace"]).default("private").optional().describe("Visibility: 'private' (default) or 'workspace'"),
|
|
392
394
|
color: z.string().optional().describe("Hex color code for the list"),
|
|
393
395
|
},
|
|
394
396
|
}, async (params) => {
|
|
@@ -490,7 +492,7 @@ server.registerTool("lighthouse_crm_add_to_list", {
|
|
|
490
492
|
inputSchema: {
|
|
491
493
|
list_id: z.string().uuid().describe("List ID"),
|
|
492
494
|
record_id: z.string().uuid().describe("Record ID to add"),
|
|
493
|
-
type: z.enum(["company", "person", "deal"
|
|
495
|
+
type: z.enum(["company", "person", "deal"]).describe("Record type"),
|
|
494
496
|
},
|
|
495
497
|
}, async (params) => {
|
|
496
498
|
try {
|
|
@@ -520,6 +522,65 @@ server.registerTool("lighthouse_crm_remove_from_list", {
|
|
|
520
522
|
return err(`Failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
521
523
|
}
|
|
522
524
|
});
|
|
525
|
+
// ─── Sharing: List Teams ──────────────────────────────────
|
|
526
|
+
server.registerTool("lighthouse_crm_share_list_with_teams", {
|
|
527
|
+
title: "Share List with Teams",
|
|
528
|
+
description: "Grant team-level access to a CRM list. Only the list owner can share. " +
|
|
529
|
+
"Use lighthouse_workspace_list_teams to find team IDs first. " +
|
|
530
|
+
"Requires lists.share permission. " +
|
|
531
|
+
"Returns formatted list: {id, name, type, sharing, color, count, owner, shared_with_teams, created_at, updated_at}.",
|
|
532
|
+
inputSchema: {
|
|
533
|
+
id: z.string().uuid().describe("List ID"),
|
|
534
|
+
team_ids: z.array(z.string().uuid()).describe("Array of team UUIDs to grant access to"),
|
|
535
|
+
},
|
|
536
|
+
}, async (params) => {
|
|
537
|
+
try {
|
|
538
|
+
const { id, ...body } = params;
|
|
539
|
+
const res = await api.post(`/lists/${id}/teams`, body);
|
|
540
|
+
return text(res);
|
|
541
|
+
}
|
|
542
|
+
catch (e) {
|
|
543
|
+
return err(`Failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
544
|
+
}
|
|
545
|
+
});
|
|
546
|
+
server.registerTool("lighthouse_crm_revoke_list_from_teams", {
|
|
547
|
+
title: "Revoke List Team Access",
|
|
548
|
+
description: "Revoke team-level access from a CRM list. Only the list owner can revoke. " +
|
|
549
|
+
"Requires lists.share permission. " +
|
|
550
|
+
"Returns formatted list: {id, name, type, sharing, color, count, owner, shared_with_teams, created_at, updated_at}.",
|
|
551
|
+
inputSchema: {
|
|
552
|
+
id: z.string().uuid().describe("List ID"),
|
|
553
|
+
team_ids: z.array(z.string().uuid()).describe("Array of team UUIDs to revoke access from"),
|
|
554
|
+
},
|
|
555
|
+
}, async (params) => {
|
|
556
|
+
try {
|
|
557
|
+
const { id, ...body } = params;
|
|
558
|
+
const res = await api.delete(`/lists/${id}/teams`, body);
|
|
559
|
+
return text(res);
|
|
560
|
+
}
|
|
561
|
+
catch (e) {
|
|
562
|
+
return err(`Failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
563
|
+
}
|
|
564
|
+
});
|
|
565
|
+
server.registerTool("lighthouse_crm_update_list_sharing", {
|
|
566
|
+
title: "Update List Sharing Status",
|
|
567
|
+
description: "Change a CRM list's sharing visibility. Setting to 'private' also removes all team permissions. " +
|
|
568
|
+
"Only the list owner can change sharing. Requires lists.share permission. " +
|
|
569
|
+
"Returns formatted list: {id, name, type, sharing, color, count, owner, shared_with_teams, created_at, updated_at}.",
|
|
570
|
+
inputSchema: {
|
|
571
|
+
id: z.string().uuid().describe("List ID"),
|
|
572
|
+
sharing: z.enum(["private", "workspace"]).describe("New sharing visibility"),
|
|
573
|
+
},
|
|
574
|
+
}, async (params) => {
|
|
575
|
+
try {
|
|
576
|
+
const { id, ...body } = params;
|
|
577
|
+
const res = await api.patch(`/lists/${id}/sharing`, body);
|
|
578
|
+
return text(res);
|
|
579
|
+
}
|
|
580
|
+
catch (e) {
|
|
581
|
+
return err(`Failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
582
|
+
}
|
|
583
|
+
});
|
|
523
584
|
// ─── CRM: Notes ──────────────────────────────────────────
|
|
524
585
|
server.registerTool("lighthouse_crm_list_notes", {
|
|
525
586
|
title: "List Notes",
|
|
@@ -750,7 +811,7 @@ server.registerTool("lighthouse_crm_list_views", {
|
|
|
750
811
|
title: "List CRM Views",
|
|
751
812
|
description: "Get all saved CRM views. Views store filter/sort configurations that can be loaded in search_records.",
|
|
752
813
|
inputSchema: {
|
|
753
|
-
entity_type: z.enum(["company", "person", "deal"
|
|
814
|
+
entity_type: z.enum(["company", "person", "deal"]).optional().describe("Filter by record type"),
|
|
754
815
|
},
|
|
755
816
|
}, async (params) => {
|
|
756
817
|
try {
|
|
@@ -771,7 +832,7 @@ server.registerTool("lighthouse_crm_create_view", {
|
|
|
771
832
|
"The saved filters will auto-apply when search_records is called with this view_id.",
|
|
772
833
|
inputSchema: {
|
|
773
834
|
name: z.string().describe("View name"),
|
|
774
|
-
entity_type: z.enum(["company", "person", "deal"
|
|
835
|
+
entity_type: z.enum(["company", "person", "deal"]).describe("Record type"),
|
|
775
836
|
filters: z
|
|
776
837
|
.record(z.unknown())
|
|
777
838
|
.optional()
|