@trylighthouse/mcp-server 0.1.8 → 0.1.9
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/server.js +25 -25
- package/package.json +1 -1
package/build/server.js
CHANGED
|
@@ -16,7 +16,7 @@ export function createServer(apiKey) {
|
|
|
16
16
|
const api = new LighthouseAPI(apiKey);
|
|
17
17
|
const server = new McpServer({
|
|
18
18
|
name: "lighthouse",
|
|
19
|
-
version: "0.1.
|
|
19
|
+
version: "0.1.9",
|
|
20
20
|
});
|
|
21
21
|
// ─────────────────────────────────────────────────────────
|
|
22
22
|
// FILTER FORMAT REFERENCE (used in tool descriptions)
|
|
@@ -112,8 +112,8 @@ export function createServer(apiKey) {
|
|
|
112
112
|
"Returns field keys, types, and options needed to construct valid filter conditions. " +
|
|
113
113
|
"This queries YOUR WORKSPACE's custom fields (CRM data you manage).",
|
|
114
114
|
inputSchema: {
|
|
115
|
-
|
|
116
|
-
.enum(["company", "person", "deal"])
|
|
115
|
+
record_type: z
|
|
116
|
+
.enum(["company", "person", "deal", "task"])
|
|
117
117
|
.describe("Record type to get attributes for"),
|
|
118
118
|
},
|
|
119
119
|
}, async (params) => {
|
|
@@ -130,11 +130,11 @@ export function createServer(apiKey) {
|
|
|
130
130
|
description: "Get a single custom field definition by its field_permalink.",
|
|
131
131
|
inputSchema: {
|
|
132
132
|
field_permalink: z.string().describe("Field permalink (unique key) of the attribute"),
|
|
133
|
-
|
|
133
|
+
record_type: z.enum(["company", "person", "deal", "task"]).describe("Record type (required)"),
|
|
134
134
|
},
|
|
135
135
|
}, async (params) => {
|
|
136
136
|
try {
|
|
137
|
-
const res = await api.get(`/attributes/${params.
|
|
137
|
+
const res = await api.get(`/attributes/${params.record_type}/${params.field_permalink}`);
|
|
138
138
|
return text(res);
|
|
139
139
|
}
|
|
140
140
|
catch (e) {
|
|
@@ -147,9 +147,9 @@ export function createServer(apiKey) {
|
|
|
147
147
|
"Types: text, number, currency, percentage, date, datetimez, select, multi_select, status, checkbox, url, email, phone, rating, record, multi_record, user, multi_user.",
|
|
148
148
|
inputSchema: {
|
|
149
149
|
label: z.string().describe("Display label for the field"),
|
|
150
|
-
|
|
150
|
+
record_type: z.enum(["company", "person", "deal"]).describe("Record type this field belongs to"),
|
|
151
151
|
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)"),
|
|
152
|
-
|
|
152
|
+
links_to: z.enum(["company", "person", "deal", "task"]).optional().describe("For record/multi_record fields: which record type to link to"),
|
|
153
153
|
options: z
|
|
154
154
|
.array(z.record(z.unknown()))
|
|
155
155
|
.optional()
|
|
@@ -169,13 +169,13 @@ export function createServer(apiKey) {
|
|
|
169
169
|
description: "Update a custom field's label or configuration.",
|
|
170
170
|
inputSchema: {
|
|
171
171
|
field_permalink: z.string().describe("Field permalink of the attribute to update"),
|
|
172
|
-
|
|
172
|
+
record_type: z.enum(["company", "person", "deal"]).describe("Record type (required)"),
|
|
173
173
|
label: z.string().optional().describe("New display label"),
|
|
174
174
|
},
|
|
175
175
|
}, async (params) => {
|
|
176
176
|
try {
|
|
177
|
-
const { field_permalink,
|
|
178
|
-
const res = await api.patch(`/attributes/${
|
|
177
|
+
const { field_permalink, record_type, ...body } = params;
|
|
178
|
+
const res = await api.patch(`/attributes/${record_type}/${field_permalink}`, body);
|
|
179
179
|
return text(res);
|
|
180
180
|
}
|
|
181
181
|
catch (e) {
|
|
@@ -187,11 +187,11 @@ export function createServer(apiKey) {
|
|
|
187
187
|
description: "Delete (archive) a custom field. Only custom fields can be deleted, not system fields.",
|
|
188
188
|
inputSchema: {
|
|
189
189
|
field_permalink: z.string().describe("Field permalink of the attribute to delete"),
|
|
190
|
-
|
|
190
|
+
record_type: z.enum(["company", "person", "deal"]).describe("Record type (required)"),
|
|
191
191
|
},
|
|
192
192
|
}, async (params) => {
|
|
193
193
|
try {
|
|
194
|
-
const res = await api.delete(`/attributes/${params.
|
|
194
|
+
const res = await api.delete(`/attributes/${params.record_type}/${params.field_permalink}`);
|
|
195
195
|
return text(res);
|
|
196
196
|
}
|
|
197
197
|
catch (e) {
|
|
@@ -219,12 +219,12 @@ export function createServer(apiKey) {
|
|
|
219
219
|
description: "Get select/multi_select field options. " +
|
|
220
220
|
"Use this to discover available values for select fields before setting them on records.",
|
|
221
221
|
inputSchema: {
|
|
222
|
-
|
|
222
|
+
record_type: z.enum(["company", "person", "deal", "task"]).describe("Record type"),
|
|
223
223
|
field_permalink: z.string().describe("Field permalink of the select/multi_select field"),
|
|
224
224
|
},
|
|
225
225
|
}, async (params) => {
|
|
226
226
|
try {
|
|
227
|
-
const res = await api.get(`/options/${params.
|
|
227
|
+
const res = await api.get(`/options/${params.record_type}/${params.field_permalink}`);
|
|
228
228
|
return text(res);
|
|
229
229
|
}
|
|
230
230
|
catch (e) {
|
|
@@ -235,15 +235,15 @@ export function createServer(apiKey) {
|
|
|
235
235
|
title: "Create CRM Field Option",
|
|
236
236
|
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.",
|
|
237
237
|
inputSchema: {
|
|
238
|
-
|
|
238
|
+
record_type: z.enum(["company", "person", "deal", "task"]).describe("Record type"),
|
|
239
239
|
field_permalink: z.string().describe("Field permalink of the select/multi_select field"),
|
|
240
240
|
label: z.string().describe("Option display label"),
|
|
241
241
|
color: z.string().optional().describe("Option color (hex code from palette, auto-assigned if omitted)"),
|
|
242
242
|
},
|
|
243
243
|
}, async (params) => {
|
|
244
244
|
try {
|
|
245
|
-
const {
|
|
246
|
-
const res = await api.post(`/options/${
|
|
245
|
+
const { record_type, field_permalink, ...body } = params;
|
|
246
|
+
const res = await api.post(`/options/${record_type}/${field_permalink}`, body);
|
|
247
247
|
return text(res);
|
|
248
248
|
}
|
|
249
249
|
catch (e) {
|
|
@@ -254,13 +254,13 @@ export function createServer(apiKey) {
|
|
|
254
254
|
title: "Delete CRM Field Option",
|
|
255
255
|
description: "Delete an option value from a select/multi_select field. Cannot delete system default options.",
|
|
256
256
|
inputSchema: {
|
|
257
|
-
|
|
257
|
+
record_type: z.enum(["company", "person", "deal", "task"]).describe("Record type"),
|
|
258
258
|
field_permalink: z.string().describe("Field permalink of the select/multi_select field"),
|
|
259
259
|
value: z.string().describe("Option value to delete"),
|
|
260
260
|
},
|
|
261
261
|
}, async (params) => {
|
|
262
262
|
try {
|
|
263
|
-
const res = await api.delete(`/options/${params.
|
|
263
|
+
const res = await api.delete(`/options/${params.record_type}/${params.field_permalink}/${params.value}`);
|
|
264
264
|
return text(res);
|
|
265
265
|
}
|
|
266
266
|
catch (e) {
|
|
@@ -273,10 +273,10 @@ export function createServer(apiKey) {
|
|
|
273
273
|
description: "Search and filter records in YOUR CRM workspace (companies, people, or deals you've added). " +
|
|
274
274
|
"Supports filters, sorting, pagination, and saved views. " +
|
|
275
275
|
"NEVER guess field keys — ALWAYS call lighthouse_crm_get_attributes first to get the exact field keys " +
|
|
276
|
-
"for the
|
|
276
|
+
"for the record_type, then use those keys in your filter conditions. " +
|
|
277
277
|
"NOT for discovering new companies/people — use lighthouse_discovery_* tools for that.",
|
|
278
278
|
inputSchema: {
|
|
279
|
-
|
|
279
|
+
record_type: z.enum(["company", "person", "deal", "task"]).describe("Record type"),
|
|
280
280
|
filters: z
|
|
281
281
|
.record(z.unknown())
|
|
282
282
|
.optional()
|
|
@@ -295,7 +295,7 @@ export function createServer(apiKey) {
|
|
|
295
295
|
},
|
|
296
296
|
}, async (params) => {
|
|
297
297
|
try {
|
|
298
|
-
const res = await api.post(`/records/${params.
|
|
298
|
+
const res = await api.post(`/records/${params.record_type}/search`, {
|
|
299
299
|
filters: params.filters,
|
|
300
300
|
sort: params.sort,
|
|
301
301
|
limit: params.limit,
|
|
@@ -781,7 +781,7 @@ export function createServer(apiKey) {
|
|
|
781
781
|
description: "Get all saved CRM views, or list views scoped to a specific list. " +
|
|
782
782
|
"Views store filter/sort configurations that can be loaded in search_records.",
|
|
783
783
|
inputSchema: {
|
|
784
|
-
|
|
784
|
+
record_type: z.enum(["company", "person", "deal"]).optional().describe("Filter by record type"),
|
|
785
785
|
list_id: z.string().uuid().optional().describe("Filter views by list ID. When provided, returns only views scoped to that list."),
|
|
786
786
|
},
|
|
787
787
|
}, async (params) => {
|
|
@@ -804,7 +804,7 @@ export function createServer(apiKey) {
|
|
|
804
804
|
"The saved filters will auto-apply when search_records is called with this view_id.",
|
|
805
805
|
inputSchema: {
|
|
806
806
|
name: z.string().describe("View name"),
|
|
807
|
-
|
|
807
|
+
record_type: z.enum(["company", "person", "deal"]).describe("Record type"),
|
|
808
808
|
filters: z
|
|
809
809
|
.record(z.unknown())
|
|
810
810
|
.optional()
|
|
@@ -814,7 +814,7 @@ export function createServer(apiKey) {
|
|
|
814
814
|
grouped_by: z.string().optional().describe("Field key to group by (required for kanban views)"),
|
|
815
815
|
sharing: z.enum(["private", "workspace"]).default("private").describe("Visibility"),
|
|
816
816
|
team_ids: z.array(z.string().uuid()).optional().describe("Team UUIDs to share the view with. Replaces any existing team shares."),
|
|
817
|
-
list_id: z.string().uuid().optional().describe("List ID to scope this view to a specific list. The
|
|
817
|
+
list_id: z.string().uuid().optional().describe("List ID to scope this view to a specific list. The record_type must match the list type."),
|
|
818
818
|
},
|
|
819
819
|
}, async (params) => {
|
|
820
820
|
try {
|