@trylighthouse/mcp-server 0.1.1 → 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.
Files changed (2) hide show
  1. package/build/index.js +103 -27
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -126,7 +126,7 @@ server.registerTool("lighthouse_crm_get_attribute", {
126
126
  description: "Get a single custom field definition by its field_permalink.",
127
127
  inputSchema: {
128
128
  field_permalink: z.string().describe("Field permalink (unique key) of the attribute"),
129
- entity_type: z.enum(["company", "person", "deal"]).describe("Record type (required)"),
129
+ entity_type: z.enum(["company", "person", "deal", "task"]).describe("Record type (required)"),
130
130
  },
131
131
  }, async (params) => {
132
132
  try {
@@ -143,9 +143,9 @@ server.registerTool("lighthouse_crm_create_attribute", {
143
143
  "Types: text, number, currency, percentage, date, datetimez, select, multi_select, status, checkbox, url, email, phone, rating, record, multi_record, user, multi_user.",
144
144
  inputSchema: {
145
145
  label: z.string().describe("Display label for the field"),
146
- entity_type: z.enum(["company", "person", "deal"]).describe("Record type this field belongs to"),
146
+ entity_type: z.enum(["company", "person", "deal", "task"]).describe("Record type this field belongs to"),
147
147
  data_type: z.string().describe("Field type (text, number, currency, percentage, date, datetimez, select, multi_select, status, checkbox, url, email, phone, rating, record, multi_record, user, multi_user)"),
148
- record_type: z.enum(["company", "person", "deal"]).optional().describe("For record/multi_record fields: which record type to link to"),
148
+ record_type: z.enum(["company", "person", "deal", "task"]).optional().describe("For record/multi_record fields: which record type to link to"),
149
149
  options: z
150
150
  .array(z.record(z.unknown()))
151
151
  .optional()
@@ -165,7 +165,7 @@ server.registerTool("lighthouse_crm_update_attribute", {
165
165
  description: "Update a custom field's label or configuration.",
166
166
  inputSchema: {
167
167
  field_permalink: z.string().describe("Field permalink of the attribute to update"),
168
- entity_type: z.enum(["company", "person", "deal"]).describe("Record type (required)"),
168
+ entity_type: z.enum(["company", "person", "deal", "task"]).describe("Record type (required)"),
169
169
  label: z.string().optional().describe("New display label"),
170
170
  },
171
171
  }, async (params) => {
@@ -183,7 +183,7 @@ server.registerTool("lighthouse_crm_delete_attribute", {
183
183
  description: "Delete (archive) a custom field. Only custom fields can be deleted, not system fields.",
184
184
  inputSchema: {
185
185
  field_permalink: z.string().describe("Field permalink of the attribute to delete"),
186
- entity_type: z.enum(["company", "person", "deal"]).describe("Record type (required)"),
186
+ entity_type: z.enum(["company", "person", "deal", "task"]).describe("Record type (required)"),
187
187
  },
188
188
  }, async (params) => {
189
189
  try {
@@ -215,7 +215,7 @@ server.registerTool("lighthouse_crm_list_options", {
215
215
  description: "Get select/multi_select field options. " +
216
216
  "Use this to discover available values for select fields before setting them on records.",
217
217
  inputSchema: {
218
- entity_type: z.enum(["company", "person", "deal"]).describe("Record type"),
218
+ entity_type: z.enum(["company", "person", "deal", "task"]).describe("Record type"),
219
219
  field_permalink: z.string().describe("Field permalink of the select/multi_select field"),
220
220
  },
221
221
  }, async (params) => {
@@ -231,7 +231,7 @@ server.registerTool("lighthouse_crm_create_option", {
231
231
  title: "Create CRM Field Option",
232
232
  description: "Add a new option to a select/multi_select field. The option value is auto-generated from the label. Returns the updated list of options for the field.",
233
233
  inputSchema: {
234
- entity_type: z.enum(["company", "person", "deal"]).describe("Record type"),
234
+ entity_type: z.enum(["company", "person", "deal", "task"]).describe("Record type"),
235
235
  field_permalink: z.string().describe("Field permalink of the select/multi_select field"),
236
236
  label: z.string().describe("Option display label"),
237
237
  color: z.string().optional().describe("Option color (hex code from palette, auto-assigned if omitted)"),
@@ -250,7 +250,7 @@ server.registerTool("lighthouse_crm_delete_option", {
250
250
  title: "Delete CRM Field Option",
251
251
  description: "Delete an option value from a select/multi_select field. Cannot delete system default options.",
252
252
  inputSchema: {
253
- entity_type: z.enum(["company", "person", "deal"]).describe("Record type"),
253
+ entity_type: z.enum(["company", "person", "deal", "task"]).describe("Record type"),
254
254
  field_permalink: z.string().describe("Field permalink of the select/multi_select field"),
255
255
  value: z.string().describe("Option value to delete"),
256
256
  },
@@ -272,7 +272,7 @@ server.registerTool("lighthouse_crm_search_records", {
272
272
  "for the entity_type, then use those keys in your filter conditions. " +
273
273
  "NOT for discovering new companies/people — use lighthouse_discovery_* tools for that.",
274
274
  inputSchema: {
275
- type: z.enum(["company", "person", "deal"]).describe("Record type"),
275
+ type: z.enum(["company", "person", "deal", "task"]).describe("Record type"),
276
276
  filters: z
277
277
  .record(z.unknown())
278
278
  .optional()
@@ -308,7 +308,7 @@ server.registerTool("lighthouse_crm_get_record", {
308
308
  title: "Get CRM Record",
309
309
  description: "Get a single CRM record by ID with all fields and relationships.",
310
310
  inputSchema: {
311
- type: z.enum(["company", "person", "deal"]).describe("Record type"),
311
+ type: z.enum(["company", "person", "deal", "task"]).describe("Record type"),
312
312
  id: z.string().uuid().describe("Record ID"),
313
313
  },
314
314
  }, async (params) => {
@@ -325,7 +325,7 @@ server.registerTool("lighthouse_crm_create_record", {
325
325
  description: "Create a new CRM record. Required fields: " +
326
326
  "company (name, domain), person (first_name, last_name), deal (name).",
327
327
  inputSchema: {
328
- type: z.enum(["company", "person", "deal"]).describe("Record type"),
328
+ type: z.enum(["company", "person", "deal", "task"]).describe("Record type"),
329
329
  data: z.record(z.unknown()).describe("Record fields (name, domain, first_name, last_name, etc.)"),
330
330
  attributes: z
331
331
  .record(z.unknown())
@@ -348,7 +348,7 @@ server.registerTool("lighthouse_crm_update_record", {
348
348
  title: "Update CRM Record",
349
349
  description: "Update an existing CRM record's fields.",
350
350
  inputSchema: {
351
- type: z.enum(["company", "person", "deal"]).describe("Record type"),
351
+ type: z.enum(["company", "person", "deal", "task"]).describe("Record type"),
352
352
  id: z.string().uuid().describe("Record ID"),
353
353
  data: z.record(z.unknown()).describe("Fields to update"),
354
354
  attributes: z.record(z.unknown()).optional().describe("Custom field values to update (keyed by field_permalink)"),
@@ -369,7 +369,7 @@ server.registerTool("lighthouse_crm_delete_record", {
369
369
  title: "Delete CRM Record",
370
370
  description: "Permanently delete a CRM record.",
371
371
  inputSchema: {
372
- type: z.enum(["company", "person", "deal"]).describe("Record type"),
372
+ type: z.enum(["company", "person", "deal", "task"]).describe("Record type"),
373
373
  id: z.string().uuid().describe("Record ID"),
374
374
  },
375
375
  }, async (params) => {
@@ -384,10 +384,14 @@ 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
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'"),
394
+ color: z.string().optional().describe("Hex color code for the list"),
391
395
  },
392
396
  }, async (params) => {
393
397
  try {
@@ -432,6 +436,8 @@ server.registerTool("lighthouse_crm_update_list", {
432
436
  inputSchema: {
433
437
  id: z.string().uuid().describe("List ID"),
434
438
  name: z.string().optional().describe("New list name"),
439
+ sharing: z.enum(["private", "workspace"]).optional().describe("New visibility setting"),
440
+ color: z.string().optional().describe("New hex color code"),
435
441
  },
436
442
  }, async (params) => {
437
443
  try {
@@ -516,13 +522,72 @@ server.registerTool("lighthouse_crm_remove_from_list", {
516
522
  return err(`Failed: ${e instanceof Error ? e.message : String(e)}`);
517
523
  }
518
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
+ });
519
584
  // ─── CRM: Notes ──────────────────────────────────────────
520
585
  server.registerTool("lighthouse_crm_list_notes", {
521
586
  title: "List Notes",
522
587
  description: "Get notes for a CRM record.",
523
588
  inputSchema: {
524
- record_id: z.string().uuid().optional().describe("Record ID to filter notes by (optional — omit to list all notes)"),
525
- record_type: z.enum(["company", "person", "deal"]).optional().describe("Record type (required if record_id is provided)"),
589
+ record_id: z.string().uuid().optional().describe("Record ID to filter notes by (required)"),
590
+ record_type: z.enum(["company", "person", "deal", "task"]).optional().describe("Record type: company, person, or deal (required)"),
526
591
  limit: z.number().min(1).max(100).default(25),
527
592
  offset: z.number().min(0).default(0),
528
593
  },
@@ -547,7 +612,7 @@ server.registerTool("lighthouse_crm_create_note", {
547
612
  "Tagged users receive an in-app notification.",
548
613
  inputSchema: {
549
614
  record_id: z.string().uuid().describe("Record ID to attach the note to"),
550
- record_type: z.enum(["company", "person", "deal"]).describe("Record type"),
615
+ record_type: z.enum(["company", "person", "deal", "task"]).describe("Record type"),
551
616
  title: z.string().describe("Note title"),
552
617
  content: z.string().describe("Note content (plain text or HTML). Use <p> tags for paragraphs. For @mentions, include mention spans (see description)."),
553
618
  tagged_users: z
@@ -1012,7 +1077,9 @@ const WIDGET_CONFIG_DESCRIPTION = "Widget config object. Structure depends on re
1012
1077
  server.registerTool("lighthouse_reports_list_dashboards", {
1013
1078
  title: "List Dashboards",
1014
1079
  description: "List all report dashboards accessible to the current user. " +
1015
- "Returns dashboards you own, workspace-shared dashboards, and team-shared dashboards.",
1080
+ "Returns dashboards you own, workspace-shared dashboards, and team-shared dashboards. " +
1081
+ "Each dashboard includes: id, name, description, sharing (private/workspace), is_owner, " +
1082
+ "owner {id, first_name, last_name, full_name}, widget_count, shared_with_teams, created_at, updated_at.",
1016
1083
  inputSchema: {},
1017
1084
  }, async () => {
1018
1085
  try {
@@ -1026,7 +1093,7 @@ server.registerTool("lighthouse_reports_list_dashboards", {
1026
1093
  server.registerTool("lighthouse_reports_create_dashboard", {
1027
1094
  title: "Create Dashboard",
1028
1095
  description: "Create a new report dashboard. Dashboards contain report widgets (charts, tables, KPIs). " +
1029
- "Requires reports.create permission.",
1096
+ "Requires reports.create permission. Returns the full dashboard object (same format as get dashboard).",
1030
1097
  inputSchema: {
1031
1098
  name: z.string().describe("Dashboard name"),
1032
1099
  description: z.string().optional().describe("Dashboard description"),
@@ -1050,7 +1117,9 @@ server.registerTool("lighthouse_reports_create_dashboard", {
1050
1117
  });
1051
1118
  server.registerTool("lighthouse_reports_get_dashboard", {
1052
1119
  title: "Get Dashboard",
1053
- description: "Get a single dashboard by ID with all its widgets.",
1120
+ description: "Get a single dashboard by ID with all its widgets. " +
1121
+ "Returns: id, name, description, sharing, is_owner, owner {id, first_name, last_name, full_name}, " +
1122
+ "widget_count, shared_with_teams, widgets [{id, name, widget_type, config, created_at, updated_at}], created_at, updated_at.",
1054
1123
  inputSchema: {
1055
1124
  id: z.string().uuid().describe("Dashboard ID"),
1056
1125
  },
@@ -1065,7 +1134,8 @@ server.registerTool("lighthouse_reports_get_dashboard", {
1065
1134
  });
1066
1135
  server.registerTool("lighthouse_reports_update_dashboard", {
1067
1136
  title: "Update Dashboard",
1068
- description: "Update a dashboard's name, description, or sharing. Only the dashboard owner can update.",
1137
+ description: "Update a dashboard's name, description, or sharing. Only the dashboard owner can update. " +
1138
+ "Returns the full dashboard object (same format as get dashboard).",
1069
1139
  inputSchema: {
1070
1140
  id: z.string().uuid().describe("Dashboard ID"),
1071
1141
  name: z.string().optional().describe("New dashboard name"),
@@ -1116,7 +1186,8 @@ server.registerTool("lighthouse_reports_refresh_dashboard", {
1116
1186
  // ─── Reports: Widgets ────────────────────────────────────
1117
1187
  server.registerTool("lighthouse_reports_list_widgets", {
1118
1188
  title: "List Dashboard Widgets",
1119
- description: "Get all widgets for a dashboard.",
1189
+ description: "Get all widgets for a dashboard. " +
1190
+ "Each widget includes: id, name, widget_type, config, created_at, updated_at.",
1120
1191
  inputSchema: {
1121
1192
  id: z.string().uuid().describe("Dashboard ID"),
1122
1193
  },
@@ -1135,7 +1206,8 @@ server.registerTool("lighthouse_reports_create_widget", {
1135
1206
  "WORKFLOW: 1) Call lighthouse_crm_get_attributes to discover field keys for the entity type, " +
1136
1207
  "2) Build a config object using those keys, 3) Create the widget. " +
1137
1208
  "Widget types: bar, line, pie, table, kpi, funnel, area. " +
1138
- "Report types: standard (aggregate by field), funnel (pipeline conversion), stage_changes (historical transitions).",
1209
+ "Report types: standard (aggregate by field), funnel (pipeline conversion), stage_changes (historical transitions). " +
1210
+ "Returns: {id, name, widget_type, config, created_at, updated_at}.",
1139
1211
  inputSchema: {
1140
1212
  dashboard_id: z.string().uuid().describe("Dashboard ID to add widget to"),
1141
1213
  name: z.string().describe("Widget/report name"),
@@ -1161,7 +1233,8 @@ server.registerTool("lighthouse_reports_create_widget", {
1161
1233
  server.registerTool("lighthouse_reports_update_widget", {
1162
1234
  title: "Update Report Widget",
1163
1235
  description: "Update a report widget's name, type, config, or position. " +
1164
- "Only provide fields you want to change — others are preserved.",
1236
+ "Only provide fields you want to change — others are preserved. " +
1237
+ "Returns: {id, name, widget_type, config, created_at, updated_at}.",
1165
1238
  inputSchema: {
1166
1239
  dashboard_id: z.string().uuid().describe("Dashboard ID"),
1167
1240
  widget_id: z.string().uuid().describe("Widget ID"),
@@ -1262,7 +1335,8 @@ server.registerTool("lighthouse_crm_share_view_with_teams", {
1262
1335
  title: "Share View with Teams",
1263
1336
  description: "Grant team-level access to a CRM view. Only the view owner can share. " +
1264
1337
  "Use lighthouse_workspace_list_teams to find team IDs first. " +
1265
- "Requires views.share permission.",
1338
+ "Requires views.share permission. " +
1339
+ "Returns formatted view: {id, name, entity_type, view_type, filters, sort, grouped_by, sharing, owner, shared_with_teams, created_at}.",
1266
1340
  inputSchema: {
1267
1341
  id: z.string().uuid().describe("View ID"),
1268
1342
  team_ids: z.array(z.string().uuid()).describe("Array of team UUIDs to grant access to"),
@@ -1280,7 +1354,8 @@ server.registerTool("lighthouse_crm_share_view_with_teams", {
1280
1354
  server.registerTool("lighthouse_crm_revoke_view_from_teams", {
1281
1355
  title: "Revoke View Team Access",
1282
1356
  description: "Revoke team-level access from a CRM view. Only the view owner can revoke. " +
1283
- "Requires views.share permission.",
1357
+ "Requires views.share permission. " +
1358
+ "Returns formatted view: {id, name, entity_type, view_type, filters, sort, grouped_by, sharing, owner, shared_with_teams, created_at}.",
1284
1359
  inputSchema: {
1285
1360
  id: z.string().uuid().describe("View ID"),
1286
1361
  team_ids: z.array(z.string().uuid()).describe("Array of team UUIDs to revoke access from"),
@@ -1298,7 +1373,8 @@ server.registerTool("lighthouse_crm_revoke_view_from_teams", {
1298
1373
  server.registerTool("lighthouse_crm_update_view_sharing", {
1299
1374
  title: "Update View Sharing Status",
1300
1375
  description: "Change a CRM view's sharing visibility. Setting to 'private' also removes all team permissions. " +
1301
- "Only the view owner can change sharing. Requires views.share permission.",
1376
+ "Only the view owner can change sharing. Requires views.share permission. " +
1377
+ "Returns formatted view: {id, name, entity_type, view_type, filters, sort, grouped_by, sharing, owner, shared_with_teams, created_at}.",
1302
1378
  inputSchema: {
1303
1379
  id: z.string().uuid().describe("View ID"),
1304
1380
  sharing: z.enum(["private", "workspace"]).describe("New sharing visibility"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trylighthouse/mcp-server",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "MCP server for the Lighthouse CRM API",
5
5
  "type": "module",
6
6
  "bin": {