@trylighthouse/mcp-server 0.1.8 → 0.1.10

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/server.js +34 -34
  2. 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.7",
19
+ version: "0.1.10",
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
- entity_type: z
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) => {
@@ -127,14 +127,14 @@ export function createServer(apiKey) {
127
127
  });
128
128
  server.registerTool("lighthouse_crm_get_attribute", {
129
129
  title: "Get CRM Attribute",
130
- description: "Get a single custom field definition by its field_permalink.",
130
+ description: "Get a single custom field definition. Response returns 'permalink', 'is_custom', 'data_type', 'links_to'.",
131
131
  inputSchema: {
132
- field_permalink: z.string().describe("Field permalink (unique key) of the attribute"),
133
- entity_type: z.enum(["company", "person", "deal", "task"]).describe("Record type (required)"),
132
+ permalink: z.string().describe("Field permalink (unique key) of the attribute"),
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.entity_type}/${params.field_permalink}`);
137
+ const res = await api.get(`/attributes/${params.record_type}/${params.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
- entity_type: z.enum(["company", "person", "deal", "task"]).describe("Record type this field belongs to"),
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
- record_type: z.enum(["company", "person", "deal", "task"]).optional().describe("For record/multi_record fields: which record type to link to"),
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()
@@ -168,14 +168,14 @@ export function createServer(apiKey) {
168
168
  title: "Update CRM Attribute",
169
169
  description: "Update a custom field's label or configuration.",
170
170
  inputSchema: {
171
- field_permalink: z.string().describe("Field permalink of the attribute to update"),
172
- entity_type: z.enum(["company", "person", "deal", "task"]).describe("Record type (required)"),
171
+ permalink: z.string().describe("Field permalink of the attribute to update"),
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, entity_type, ...body } = params;
178
- const res = await api.patch(`/attributes/${entity_type}/${field_permalink}`, body);
177
+ const { permalink, record_type, ...body } = params;
178
+ const res = await api.patch(`/attributes/${record_type}/${permalink}`, body);
179
179
  return text(res);
180
180
  }
181
181
  catch (e) {
@@ -186,12 +186,12 @@ export function createServer(apiKey) {
186
186
  title: "Delete CRM Attribute",
187
187
  description: "Delete (archive) a custom field. Only custom fields can be deleted, not system fields.",
188
188
  inputSchema: {
189
- field_permalink: z.string().describe("Field permalink of the attribute to delete"),
190
- entity_type: z.enum(["company", "person", "deal", "task"]).describe("Record type (required)"),
189
+ permalink: z.string().describe("Field permalink of the attribute to delete"),
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.entity_type}/${params.field_permalink}`);
194
+ const res = await api.delete(`/attributes/${params.record_type}/${params.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
- entity_type: z.enum(["company", "person", "deal", "task"]).describe("Record type"),
223
- field_permalink: z.string().describe("Field permalink of the select/multi_select field"),
222
+ record_type: z.enum(["company", "person", "deal", "task"]).describe("Record type"),
223
+ 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.entity_type}/${params.field_permalink}`);
227
+ const res = await api.get(`/options/${params.record_type}/${params.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
- entity_type: z.enum(["company", "person", "deal", "task"]).describe("Record type"),
239
- field_permalink: z.string().describe("Field permalink of the select/multi_select field"),
238
+ record_type: z.enum(["company", "person", "deal", "task"]).describe("Record type"),
239
+ 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 { entity_type, field_permalink, ...body } = params;
246
- const res = await api.post(`/options/${entity_type}/${field_permalink}`, body);
245
+ const { record_type, permalink, ...body } = params;
246
+ const res = await api.post(`/options/${record_type}/${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
- entity_type: z.enum(["company", "person", "deal", "task"]).describe("Record type"),
258
- field_permalink: z.string().describe("Field permalink of the select/multi_select field"),
257
+ record_type: z.enum(["company", "person", "deal", "task"]).describe("Record type"),
258
+ 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.entity_type}/${params.field_permalink}/${params.value}`);
263
+ const res = await api.delete(`/options/${params.record_type}/${params.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 entity_type, then use those keys in your filter conditions. " +
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
- type: z.enum(["company", "person", "deal", "task"]).describe("Record type"),
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.type}/search`, {
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,
@@ -713,7 +713,7 @@ export function createServer(apiKey) {
713
713
  })
714
714
  .optional()
715
715
  .describe("Records to link: {company: [ids], person: [ids], deal: [ids]}"),
716
- attributes: z.record(z.any()).optional().describe("Custom task field values as {field_permalink: value}"),
716
+ attributes: z.record(z.any()).optional().describe("Custom task field values as {permalink: value}"),
717
717
  },
718
718
  }, async (params) => {
719
719
  try {
@@ -748,7 +748,7 @@ export function createServer(apiKey) {
748
748
  })
749
749
  .optional()
750
750
  .describe("Records to link (replaces current): {company: [ids], person: [ids], deal: [ids]}"),
751
- attributes: z.record(z.any()).optional().describe("Custom task field values as {field_permalink: value}"),
751
+ attributes: z.record(z.any()).optional().describe("Custom task field values as {permalink: value}"),
752
752
  },
753
753
  }, async (params) => {
754
754
  try {
@@ -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
- entity_type: z.enum(["company", "person", "deal"]).optional().describe("Filter by record type"),
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
- entity_type: z.enum(["company", "person", "deal"]).describe("Record type"),
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 entity_type must match the list type."),
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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trylighthouse/mcp-server",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "MCP server for the Lighthouse CRM API",
5
5
  "type": "module",
6
6
  "main": "./build/server.js",