@nightsquawktech/gohighlevel-mcp-server 0.1.0

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 (108) hide show
  1. package/COMMERCIAL.md +35 -0
  2. package/LICENSE +661 -0
  3. package/README.md +172 -0
  4. package/dist/constants.d.ts +14 -0
  5. package/dist/constants.d.ts.map +1 -0
  6. package/dist/constants.js +14 -0
  7. package/dist/constants.js.map +1 -0
  8. package/dist/index.d.ts +3 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +24 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/schemas/calendars.d.ts +185 -0
  13. package/dist/schemas/calendars.d.ts.map +1 -0
  14. package/dist/schemas/calendars.js +74 -0
  15. package/dist/schemas/calendars.js.map +1 -0
  16. package/dist/schemas/common.d.ts +10 -0
  17. package/dist/schemas/common.d.ts.map +1 -0
  18. package/dist/schemas/common.js +33 -0
  19. package/dist/schemas/common.js.map +1 -0
  20. package/dist/schemas/contacts.d.ts +401 -0
  21. package/dist/schemas/contacts.d.ts.map +1 -0
  22. package/dist/schemas/contacts.js +132 -0
  23. package/dist/schemas/contacts.js.map +1 -0
  24. package/dist/schemas/conversations.d.ts +89 -0
  25. package/dist/schemas/conversations.d.ts.map +1 -0
  26. package/dist/schemas/conversations.js +39 -0
  27. package/dist/schemas/conversations.js.map +1 -0
  28. package/dist/schemas/custom-fields.d.ts +360 -0
  29. package/dist/schemas/custom-fields.d.ts.map +1 -0
  30. package/dist/schemas/custom-fields.js +154 -0
  31. package/dist/schemas/custom-fields.js.map +1 -0
  32. package/dist/schemas/custom-values.d.ts +87 -0
  33. package/dist/schemas/custom-values.d.ts.map +1 -0
  34. package/dist/schemas/custom-values.js +43 -0
  35. package/dist/schemas/custom-values.js.map +1 -0
  36. package/dist/schemas/locations.d.ts +30 -0
  37. package/dist/schemas/locations.d.ts.map +1 -0
  38. package/dist/schemas/locations.js +17 -0
  39. package/dist/schemas/locations.js.map +1 -0
  40. package/dist/schemas/opportunities.d.ts +196 -0
  41. package/dist/schemas/opportunities.d.ts.map +1 -0
  42. package/dist/schemas/opportunities.js +83 -0
  43. package/dist/schemas/opportunities.js.map +1 -0
  44. package/dist/schemas/tags.d.ts +81 -0
  45. package/dist/schemas/tags.d.ts.map +1 -0
  46. package/dist/schemas/tags.js +41 -0
  47. package/dist/schemas/tags.js.map +1 -0
  48. package/dist/services/config.d.ts +3 -0
  49. package/dist/services/config.d.ts.map +1 -0
  50. package/dist/services/config.js +26 -0
  51. package/dist/services/config.js.map +1 -0
  52. package/dist/services/errors.d.ts +2 -0
  53. package/dist/services/errors.d.ts.map +1 -0
  54. package/dist/services/errors.js +47 -0
  55. package/dist/services/errors.js.map +1 -0
  56. package/dist/services/gohighlevel-client.d.ts +13 -0
  57. package/dist/services/gohighlevel-client.d.ts.map +1 -0
  58. package/dist/services/gohighlevel-client.js +42 -0
  59. package/dist/services/gohighlevel-client.js.map +1 -0
  60. package/dist/tools/calendars.d.ts +4 -0
  61. package/dist/tools/calendars.d.ts.map +1 -0
  62. package/dist/tools/calendars.js +163 -0
  63. package/dist/tools/calendars.js.map +1 -0
  64. package/dist/tools/contacts.d.ts +4 -0
  65. package/dist/tools/contacts.d.ts.map +1 -0
  66. package/dist/tools/contacts.js +492 -0
  67. package/dist/tools/contacts.js.map +1 -0
  68. package/dist/tools/conversations.d.ts +4 -0
  69. package/dist/tools/conversations.d.ts.map +1 -0
  70. package/dist/tools/conversations.js +76 -0
  71. package/dist/tools/conversations.js.map +1 -0
  72. package/dist/tools/custom-fields.d.ts +4 -0
  73. package/dist/tools/custom-fields.d.ts.map +1 -0
  74. package/dist/tools/custom-fields.js +337 -0
  75. package/dist/tools/custom-fields.js.map +1 -0
  76. package/dist/tools/custom-values.d.ts +4 -0
  77. package/dist/tools/custom-values.d.ts.map +1 -0
  78. package/dist/tools/custom-values.js +121 -0
  79. package/dist/tools/custom-values.js.map +1 -0
  80. package/dist/tools/format.d.ts +9 -0
  81. package/dist/tools/format.d.ts.map +1 -0
  82. package/dist/tools/format.js +49 -0
  83. package/dist/tools/format.js.map +1 -0
  84. package/dist/tools/index.d.ts +4 -0
  85. package/dist/tools/index.d.ts.map +1 -0
  86. package/dist/tools/index.js +19 -0
  87. package/dist/tools/index.js.map +1 -0
  88. package/dist/tools/locations.d.ts +4 -0
  89. package/dist/tools/locations.d.ts.map +1 -0
  90. package/dist/tools/locations.js +43 -0
  91. package/dist/tools/locations.js.map +1 -0
  92. package/dist/tools/opportunities.d.ts +4 -0
  93. package/dist/tools/opportunities.d.ts.map +1 -0
  94. package/dist/tools/opportunities.js +182 -0
  95. package/dist/tools/opportunities.js.map +1 -0
  96. package/dist/tools/read-tools.d.ts +22 -0
  97. package/dist/tools/read-tools.d.ts.map +1 -0
  98. package/dist/tools/read-tools.js +68 -0
  99. package/dist/tools/read-tools.js.map +1 -0
  100. package/dist/tools/tags.d.ts +4 -0
  101. package/dist/tools/tags.d.ts.map +1 -0
  102. package/dist/tools/tags.js +113 -0
  103. package/dist/tools/tags.js.map +1 -0
  104. package/dist/types.d.ts +28 -0
  105. package/dist/types.d.ts.map +1 -0
  106. package/dist/types.js +2 -0
  107. package/dist/types.js.map +1 -0
  108. package/package.json +47 -0
package/README.md ADDED
@@ -0,0 +1,172 @@
1
+ # @nightsquawktech/gohighlevel-mcp-server
2
+
3
+ [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/NightSquawk/gohighlevel-mcp-server/badge)](https://scorecard.dev/viewer/?uri=github.com/NightSquawk/gohighlevel-mcp-server)
4
+
5
+ Stdio MCP server for curated GoHighLevel API v2 coverage. It is intended to run beside the official hosted HighLevel MCP and fill the gaps that server does not expose:
6
+
7
+ - create, update, and delete custom fields
8
+ - delete contacts
9
+ - guarded duplicate-contact merge workaround for records that are safe to hard-delete
10
+
11
+ This implementation covers all phases in `SCOPE.md`: custom fields, custom values, contacts, opportunities, tags, conversations, calendars, locations/users, contact notes/tasks, and Custom Fields V2/folders. Destructive and outbound tools (deletes, merges, message sends) require an explicit `confirm: true` parameter and should only be run with explicit human approval.
12
+
13
+ ## Custom Field API Fork
14
+
15
+ The P1 custom-field write tools use the current location-scoped endpoints:
16
+
17
+ - `PUT /locations/{locationId}/customFields/{id}`
18
+ - `DELETE /locations/{locationId}/customFields/{id}`
19
+
20
+ The newer `/custom-fields/{id}` V2 API is documented separately and says it only supports Custom Objects and Company/Business today. It is implemented as separate V2/folder tools instead of replacing the location-scoped contact/opportunity custom-field tools.
21
+
22
+ ## Setup
23
+
24
+ Configure your MCP client to run the server with `npx`:
25
+
26
+ ```json
27
+ {
28
+ "mcpServers": {
29
+ "gohighlevel": {
30
+ "command": "npx",
31
+ "args": ["-y", "@nightsquawktech/gohighlevel-mcp-server"],
32
+ "env": {
33
+ "GHL_API_TOKEN": "pit-...",
34
+ "GHL_LOCATION_ID": "<location id>",
35
+ "GHL_API_VERSION": "2021-07-28"
36
+ }
37
+ }
38
+ }
39
+ }
40
+ ```
41
+
42
+ ## Environment
43
+
44
+ - `GHL_API_TOKEN` required. Private Integration Token or OAuth sub-account access token.
45
+ - `GHL_LOCATION_ID` required. Default sub-account/location ID.
46
+ - `GHL_BASE_URL` optional, default `https://services.leadconnectorhq.com`.
47
+ - `GHL_API_VERSION` optional, default `2021-07-28`.
48
+ - `GHL_TIMEOUT_MS` optional, default `30000`.
49
+
50
+ Required Private Integration scopes for the full server roadmap:
51
+
52
+ - `locations/customFields.readonly`, `locations/customFields.write`
53
+ - `locations/customValues.readonly`, `locations/customValues.write`
54
+ - `contacts.readonly`, `contacts.write`
55
+ - `opportunities.readonly`, `opportunities.write`
56
+ - `conversations.readonly`, `conversations.write`
57
+ - `conversations/message.readonly`, `conversations/message.write`
58
+ - `calendars.readonly`, `calendars.write`
59
+ - `calendars/events.readonly`, `calendars/events.write`
60
+ - `locations.readonly`, `locations.write`
61
+ - `workflows.readonly`
62
+
63
+ ## Tools
64
+
65
+ - `ghl_list_custom_fields`
66
+ - `ghl_get_custom_field`
67
+ - `ghl_create_custom_field`
68
+ - `ghl_update_custom_field`
69
+ - `ghl_delete_custom_field` requires `confirm: true`
70
+ - `ghl_list_custom_values`
71
+ - `ghl_get_custom_value`
72
+ - `ghl_create_custom_value`
73
+ - `ghl_update_custom_value`
74
+ - `ghl_delete_custom_value` requires `confirm: true`
75
+ - `ghl_search_contacts`
76
+ - `ghl_get_contact`
77
+ - `ghl_create_contact`
78
+ - `ghl_update_contact`
79
+ - `ghl_upsert_contact`
80
+ - `ghl_delete_contact` requires `confirm: true`
81
+ - `ghl_merge_contacts_delete_loser` previews by default; requires `confirm: true`, deletes the loser only after zero-history preflight checks, then updates the survivor email
82
+ - `ghl_add_contact_tags`
83
+ - `ghl_remove_contact_tags` requires `confirm: true`
84
+ - `ghl_add_contact_to_workflow`
85
+ - `ghl_remove_contact_from_workflow` requires `confirm: true`
86
+ - `ghl_get_contact_notes`
87
+ - `ghl_create_contact_note`
88
+ - `ghl_get_contact_tasks`
89
+ - `ghl_create_contact_task`
90
+ - `ghl_search_opportunities`
91
+ - `ghl_get_pipelines`
92
+ - `ghl_get_opportunity`
93
+ - `ghl_create_opportunity`
94
+ - `ghl_update_opportunity`
95
+ - `ghl_update_opportunity_status`
96
+ - `ghl_delete_opportunity` requires `confirm: true`
97
+ - `ghl_list_tags`
98
+ - `ghl_get_tag`
99
+ - `ghl_create_tag`
100
+ - `ghl_update_tag`
101
+ - `ghl_delete_tag` requires `confirm: true`
102
+ - `ghl_search_conversations`
103
+ - `ghl_get_conversation_messages`
104
+ - `ghl_send_message` requires `confirm: true`
105
+ - `ghl_list_calendars`
106
+ - `ghl_get_calendar_events`
107
+ - `ghl_get_free_slots`
108
+ - `ghl_create_appointment`
109
+ - `ghl_update_appointment`
110
+ - `ghl_delete_appointment` requires `confirm: true`
111
+ - `ghl_get_location`
112
+ - `ghl_list_users`
113
+ - `ghl_list_custom_fields_v2`
114
+ - `ghl_get_custom_field_v2`
115
+ - `ghl_create_custom_field_v2`
116
+ - `ghl_update_custom_field_v2`
117
+ - `ghl_delete_custom_field_v2` requires `confirm: true`
118
+ - `ghl_create_custom_field_folder`
119
+ - `ghl_update_custom_field_folder`
120
+ - `ghl_delete_custom_field_folder` requires `confirm: true`
121
+
122
+ All tools return both text content and `structuredContent`. Read tools support `response_format: "markdown" | "json"`.
123
+
124
+ ## Verification
125
+
126
+ Read-only smoke tests:
127
+
128
+ ```powershell
129
+ $h = @{
130
+ Authorization = "Bearer $env:GHL_API_TOKEN"
131
+ Version = $env:GHL_API_VERSION ?? "2021-07-28"
132
+ Accept = "application/json"
133
+ }
134
+ Invoke-RestMethod "https://services.leadconnectorhq.com/locations/$env:GHL_LOCATION_ID/customFields" -Headers $h
135
+ Invoke-RestMethod "https://services.leadconnectorhq.com/locations/$env:GHL_LOCATION_ID/customValues" -Headers $h
136
+ Invoke-RestMethod "https://services.leadconnectorhq.com/locations/$env:GHL_LOCATION_ID/tags" -Headers $h
137
+ Invoke-RestMethod "https://services.leadconnectorhq.com/contacts/search" -Method Post -Headers $h -ContentType "application/json" -Body (@{ locationId = $env:GHL_LOCATION_ID; pageLimit = 1 } | ConvertTo-Json)
138
+ Invoke-RestMethod "https://services.leadconnectorhq.com/opportunities/pipelines?locationId=$env:GHL_LOCATION_ID" -Headers $h
139
+ Invoke-RestMethod "https://services.leadconnectorhq.com/calendars/?locationId=$env:GHL_LOCATION_ID" -Headers $h
140
+ Invoke-RestMethod "https://services.leadconnectorhq.com/users/?locationId=$env:GHL_LOCATION_ID" -Headers $h
141
+ ```
142
+
143
+ Owner-approved write/delete test plan:
144
+
145
+ 1. Create a disposable custom value, read it back, update its `value`, then delete it with `confirm: true`.
146
+ 2. Create a disposable custom field named with a clear test prefix, read it back, update its placeholder, then delete it with `confirm: true`.
147
+ 3. Pick or create a disposable contact, add a disposable tag, remove the tag with `confirm: true`, then delete the contact with `confirm: true` only if the owner approves contact deletion.
148
+ 4. Add a disposable contact to a safe test workflow, then remove it with `confirm: true`.
149
+ 5. Create/update/upsert a disposable contact, then verify no production contact was modified.
150
+ 6. Create a disposable opportunity in a test pipeline/stage, update it, update its status, then delete it with `confirm: true`.
151
+ 7. Send a message only to an owner-approved test contact/channel with `confirm: true`.
152
+ 8. Create/update/delete a disposable appointment on a test calendar with `confirm: true` for delete.
153
+ 9. Create/update/delete a disposable Custom Fields V2 field and folder only under an owner-approved test object key, with `confirm: true` for deletes.
154
+ 10. Create a disposable contact note and task only on an owner-approved test contact.
155
+ 11. For each destructive tool, first call it without `confirm: true` and verify it returns an MCP error without calling GoHighLevel.
156
+ 12. For `ghl_merge_contacts_delete_loser`, first run `confirm: false` against an owner-approved duplicate pair and verify the preview shows the loser email, survivor email, and zero notes/tasks/conversations/opportunities/history-check errors. For the destructive test, use only disposable contacts: create a survivor and loser, set the loser's email, verify no history exists, run with `confirm: true`, verify the loser is gone and the survivor has the copied email. Separately verify the guard by adding a note/task to a disposable loser and confirming the merge is skipped without deletion.
157
+
158
+ Use stderr only for logs. Never commit `.env` or real tokens.
159
+
160
+ ## Development
161
+
162
+ ```sh
163
+ npm install
164
+ npm run dev
165
+ npm run build
166
+ ```
167
+
168
+ ## License
169
+
170
+ Licensed under the [GNU AGPL v3.0](./LICENSE). Free for personal and open-source use.
171
+
172
+ Organizations that cannot comply with the AGPL can purchase a commercial license. See [COMMERCIAL.md](./COMMERCIAL.md) or contact hello@nightsquawk.tech.
@@ -0,0 +1,14 @@
1
+ export declare const SERVER_NAME = "gohighlevel-mcp-server";
2
+ export declare const SERVER_VERSION = "0.1.0";
3
+ export declare const ENV: {
4
+ readonly apiToken: "GHL_API_TOKEN";
5
+ readonly locationId: "GHL_LOCATION_ID";
6
+ readonly baseUrl: "GHL_BASE_URL";
7
+ readonly apiVersion: "GHL_API_VERSION";
8
+ readonly timeoutMs: "GHL_TIMEOUT_MS";
9
+ };
10
+ export declare const DEFAULT_BASE_URL = "https://services.leadconnectorhq.com";
11
+ export declare const DEFAULT_API_VERSION = "2021-07-28";
12
+ export declare const DEFAULT_TIMEOUT_MS = 30000;
13
+ export declare const RESPONSE_CHARACTER_LIMIT = 25000;
14
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,2BAA2B,CAAC;AACpD,eAAO,MAAM,cAAc,UAAU,CAAC;AAEtC,eAAO,MAAM,GAAG;;;;;;CAMN,CAAC;AAEX,eAAO,MAAM,gBAAgB,yCAAyC,CAAC;AACvE,eAAO,MAAM,mBAAmB,eAAe,CAAC;AAChD,eAAO,MAAM,kBAAkB,QAAS,CAAC;AACzC,eAAO,MAAM,wBAAwB,QAAS,CAAC"}
@@ -0,0 +1,14 @@
1
+ export const SERVER_NAME = "gohighlevel-mcp-server";
2
+ export const SERVER_VERSION = "0.1.0";
3
+ export const ENV = {
4
+ apiToken: "GHL_API_TOKEN",
5
+ locationId: "GHL_LOCATION_ID",
6
+ baseUrl: "GHL_BASE_URL",
7
+ apiVersion: "GHL_API_VERSION",
8
+ timeoutMs: "GHL_TIMEOUT_MS"
9
+ };
10
+ export const DEFAULT_BASE_URL = "https://services.leadconnectorhq.com";
11
+ export const DEFAULT_API_VERSION = "2021-07-28";
12
+ export const DEFAULT_TIMEOUT_MS = 30_000;
13
+ export const RESPONSE_CHARACTER_LIMIT = 25_000;
14
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,wBAAwB,CAAC;AACpD,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC;AAEtC,MAAM,CAAC,MAAM,GAAG,GAAG;IACjB,QAAQ,EAAE,eAAe;IACzB,UAAU,EAAE,iBAAiB;IAC7B,OAAO,EAAE,cAAc;IACvB,UAAU,EAAE,iBAAiB;IAC7B,SAAS,EAAE,gBAAgB;CACnB,CAAC;AAEX,MAAM,CAAC,MAAM,gBAAgB,GAAG,sCAAsC,CAAC;AACvE,MAAM,CAAC,MAAM,mBAAmB,GAAG,YAAY,CAAC;AAChD,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC;AACzC,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC"}
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js ADDED
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env node
2
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
+ import { SERVER_NAME, SERVER_VERSION } from "./constants.js";
5
+ import { loadConfig } from "./services/config.js";
6
+ import { GoHighLevelClient } from "./services/gohighlevel-client.js";
7
+ import { registerTools } from "./tools/index.js";
8
+ async function main() {
9
+ const config = loadConfig();
10
+ const client = new GoHighLevelClient(config);
11
+ const server = new McpServer({
12
+ name: SERVER_NAME,
13
+ version: SERVER_VERSION
14
+ });
15
+ registerTools(server, client);
16
+ const transport = new StdioServerTransport();
17
+ await server.connect(transport);
18
+ console.error(`${SERVER_NAME} ${SERVER_VERSION} running on stdio`);
19
+ }
20
+ main().catch((error) => {
21
+ console.error(error instanceof Error ? error.message : String(error));
22
+ process.exit(1);
23
+ });
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;IAC5B,MAAM,MAAM,GAAG,IAAI,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAC7C,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;QAC3B,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,cAAc;KACxB,CAAC,CAAC;IAEH,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE9B,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,GAAG,WAAW,IAAI,cAAc,mBAAmB,CAAC,CAAC;AACrE,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IAC9B,OAAO,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACtE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,185 @@
1
+ import { z } from "zod";
2
+ export declare const ListCalendarsSchema: z.ZodObject<{
3
+ location_id: z.ZodOptional<z.ZodString>;
4
+ limit: z.ZodDefault<z.ZodNumber>;
5
+ offset: z.ZodDefault<z.ZodNumber>;
6
+ response_format: z.ZodDefault<z.ZodEnum<["markdown", "json"]>>;
7
+ }, "strict", z.ZodTypeAny, {
8
+ offset: number;
9
+ limit: number;
10
+ response_format: "markdown" | "json";
11
+ location_id?: string | undefined;
12
+ }, {
13
+ offset?: number | undefined;
14
+ location_id?: string | undefined;
15
+ limit?: number | undefined;
16
+ response_format?: "markdown" | "json" | undefined;
17
+ }>;
18
+ export declare const CalendarEventsSchema: z.ZodObject<{
19
+ location_id: z.ZodOptional<z.ZodString>;
20
+ calendarId: z.ZodOptional<z.ZodString>;
21
+ groupId: z.ZodOptional<z.ZodString>;
22
+ contactId: z.ZodOptional<z.ZodString>;
23
+ startTime: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
24
+ endTime: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
25
+ limit: z.ZodDefault<z.ZodNumber>;
26
+ offset: z.ZodDefault<z.ZodNumber>;
27
+ response_format: z.ZodDefault<z.ZodEnum<["markdown", "json"]>>;
28
+ extra_query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
29
+ }, "strict", z.ZodTypeAny, {
30
+ offset: number;
31
+ limit: number;
32
+ response_format: "markdown" | "json";
33
+ location_id?: string | undefined;
34
+ calendarId?: string | undefined;
35
+ groupId?: string | undefined;
36
+ contactId?: string | undefined;
37
+ startTime?: string | number | undefined;
38
+ endTime?: string | number | undefined;
39
+ extra_query?: Record<string, unknown> | undefined;
40
+ }, {
41
+ offset?: number | undefined;
42
+ location_id?: string | undefined;
43
+ limit?: number | undefined;
44
+ response_format?: "markdown" | "json" | undefined;
45
+ calendarId?: string | undefined;
46
+ groupId?: string | undefined;
47
+ contactId?: string | undefined;
48
+ startTime?: string | number | undefined;
49
+ endTime?: string | number | undefined;
50
+ extra_query?: Record<string, unknown> | undefined;
51
+ }>;
52
+ export declare const FreeSlotsSchema: z.ZodObject<{
53
+ calendar_id: z.ZodString;
54
+ startDate: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
55
+ endDate: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
56
+ timezone: z.ZodOptional<z.ZodString>;
57
+ userId: z.ZodOptional<z.ZodString>;
58
+ response_format: z.ZodDefault<z.ZodEnum<["markdown", "json"]>>;
59
+ extra_query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
60
+ }, "strict", z.ZodTypeAny, {
61
+ response_format: "markdown" | "json";
62
+ calendar_id: string;
63
+ startDate: string | number;
64
+ endDate: string | number;
65
+ extra_query?: Record<string, unknown> | undefined;
66
+ timezone?: string | undefined;
67
+ userId?: string | undefined;
68
+ }, {
69
+ calendar_id: string;
70
+ startDate: string | number;
71
+ endDate: string | number;
72
+ response_format?: "markdown" | "json" | undefined;
73
+ extra_query?: Record<string, unknown> | undefined;
74
+ timezone?: string | undefined;
75
+ userId?: string | undefined;
76
+ }>;
77
+ export declare const CreateAppointmentSchema: z.ZodObject<{
78
+ calendarId: z.ZodString;
79
+ locationId: z.ZodOptional<z.ZodString>;
80
+ contactId: z.ZodString;
81
+ startTime: z.ZodString;
82
+ response_format: z.ZodDefault<z.ZodEnum<["markdown", "json"]>>;
83
+ endTime: z.ZodOptional<z.ZodString>;
84
+ title: z.ZodOptional<z.ZodString>;
85
+ appointmentStatus: z.ZodOptional<z.ZodString>;
86
+ assignedUserId: z.ZodOptional<z.ZodString>;
87
+ address: z.ZodOptional<z.ZodString>;
88
+ ignoreDateRange: z.ZodOptional<z.ZodBoolean>;
89
+ toNotify: z.ZodOptional<z.ZodBoolean>;
90
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
91
+ }, "strict", z.ZodTypeAny, {
92
+ response_format: "markdown" | "json";
93
+ calendarId: string;
94
+ contactId: string;
95
+ startTime: string;
96
+ endTime?: string | undefined;
97
+ locationId?: string | undefined;
98
+ title?: string | undefined;
99
+ appointmentStatus?: string | undefined;
100
+ assignedUserId?: string | undefined;
101
+ address?: string | undefined;
102
+ ignoreDateRange?: boolean | undefined;
103
+ toNotify?: boolean | undefined;
104
+ extra?: Record<string, unknown> | undefined;
105
+ }, {
106
+ calendarId: string;
107
+ contactId: string;
108
+ startTime: string;
109
+ response_format?: "markdown" | "json" | undefined;
110
+ endTime?: string | undefined;
111
+ locationId?: string | undefined;
112
+ title?: string | undefined;
113
+ appointmentStatus?: string | undefined;
114
+ assignedUserId?: string | undefined;
115
+ address?: string | undefined;
116
+ ignoreDateRange?: boolean | undefined;
117
+ toNotify?: boolean | undefined;
118
+ extra?: Record<string, unknown> | undefined;
119
+ }>;
120
+ export declare const UpdateAppointmentSchema: z.ZodObject<{
121
+ response_format: z.ZodDefault<z.ZodEnum<["markdown", "json"]>>;
122
+ calendarId: z.ZodOptional<z.ZodString>;
123
+ locationId: z.ZodOptional<z.ZodString>;
124
+ contactId: z.ZodOptional<z.ZodString>;
125
+ startTime: z.ZodOptional<z.ZodString>;
126
+ endTime: z.ZodOptional<z.ZodString>;
127
+ title: z.ZodOptional<z.ZodString>;
128
+ appointmentStatus: z.ZodOptional<z.ZodString>;
129
+ assignedUserId: z.ZodOptional<z.ZodString>;
130
+ address: z.ZodOptional<z.ZodString>;
131
+ ignoreDateRange: z.ZodOptional<z.ZodBoolean>;
132
+ toNotify: z.ZodOptional<z.ZodBoolean>;
133
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
134
+ appointment_id: z.ZodString;
135
+ }, "strict", z.ZodTypeAny, {
136
+ response_format: "markdown" | "json";
137
+ appointment_id: string;
138
+ calendarId?: string | undefined;
139
+ contactId?: string | undefined;
140
+ startTime?: string | undefined;
141
+ endTime?: string | undefined;
142
+ locationId?: string | undefined;
143
+ title?: string | undefined;
144
+ appointmentStatus?: string | undefined;
145
+ assignedUserId?: string | undefined;
146
+ address?: string | undefined;
147
+ ignoreDateRange?: boolean | undefined;
148
+ toNotify?: boolean | undefined;
149
+ extra?: Record<string, unknown> | undefined;
150
+ }, {
151
+ appointment_id: string;
152
+ response_format?: "markdown" | "json" | undefined;
153
+ calendarId?: string | undefined;
154
+ contactId?: string | undefined;
155
+ startTime?: string | undefined;
156
+ endTime?: string | undefined;
157
+ locationId?: string | undefined;
158
+ title?: string | undefined;
159
+ appointmentStatus?: string | undefined;
160
+ assignedUserId?: string | undefined;
161
+ address?: string | undefined;
162
+ ignoreDateRange?: boolean | undefined;
163
+ toNotify?: boolean | undefined;
164
+ extra?: Record<string, unknown> | undefined;
165
+ }>;
166
+ export declare const DeleteAppointmentSchema: z.ZodObject<{
167
+ event_id: z.ZodString;
168
+ confirm: z.ZodBoolean;
169
+ response_format: z.ZodDefault<z.ZodEnum<["markdown", "json"]>>;
170
+ }, "strict", z.ZodTypeAny, {
171
+ response_format: "markdown" | "json";
172
+ event_id: string;
173
+ confirm: boolean;
174
+ }, {
175
+ event_id: string;
176
+ confirm: boolean;
177
+ response_format?: "markdown" | "json" | undefined;
178
+ }>;
179
+ export type ListCalendarsInput = z.infer<typeof ListCalendarsSchema>;
180
+ export type CalendarEventsInput = z.infer<typeof CalendarEventsSchema>;
181
+ export type FreeSlotsInput = z.infer<typeof FreeSlotsSchema>;
182
+ export type CreateAppointmentInput = z.infer<typeof CreateAppointmentSchema>;
183
+ export type UpdateAppointmentInput = z.infer<typeof UpdateAppointmentSchema>;
184
+ export type DeleteAppointmentInput = z.infer<typeof DeleteAppointmentSchema>;
185
+ //# sourceMappingURL=calendars.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendars.d.ts","sourceRoot":"","sources":["../../src/schemas/calendars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;EAOrB,CAAC;AAEZ,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAatB,CAAC;AAEZ,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;EAUjB,CAAC;AAiBZ,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASzB,CAAC;AAEZ,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMzB,CAAC;AAEZ,eAAO,MAAM,uBAAuB;;;;;;;;;;;;EAMzB,CAAC;AAEZ,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACrE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACvE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAC7D,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC7E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC7E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,74 @@
1
+ import { z } from "zod";
2
+ import { ConfirmSchema, ExtraSchema, IdSchema, LimitSchema, LocationIdSchema, OffsetSchema, ResponseFormatSchema } from "./common.js";
3
+ export const ListCalendarsSchema = z
4
+ .object({
5
+ location_id: LocationIdSchema,
6
+ limit: LimitSchema,
7
+ offset: OffsetSchema,
8
+ response_format: ResponseFormatSchema
9
+ })
10
+ .strict();
11
+ export const CalendarEventsSchema = z
12
+ .object({
13
+ location_id: LocationIdSchema,
14
+ calendarId: z.string().min(1).optional(),
15
+ groupId: z.string().min(1).optional(),
16
+ contactId: z.string().min(1).optional(),
17
+ startTime: z.union([z.string().min(1), z.number().int().nonnegative()]).optional().describe("Start time in milliseconds, as number or string."),
18
+ endTime: z.union([z.string().min(1), z.number().int().nonnegative()]).optional().describe("End time in milliseconds, as number or string."),
19
+ limit: LimitSchema,
20
+ offset: OffsetSchema,
21
+ response_format: ResponseFormatSchema,
22
+ extra_query: ExtraSchema
23
+ })
24
+ .strict();
25
+ export const FreeSlotsSchema = z
26
+ .object({
27
+ calendar_id: IdSchema.describe("Calendar ID."),
28
+ startDate: z.union([z.string().min(1), z.number().int().nonnegative()]).describe("Start date/time in milliseconds, as number or string."),
29
+ endDate: z.union([z.string().min(1), z.number().int().nonnegative()]).describe("End date/time in milliseconds, as number or string."),
30
+ timezone: z.string().min(1).optional(),
31
+ userId: z.string().min(1).optional(),
32
+ response_format: ResponseFormatSchema,
33
+ extra_query: ExtraSchema
34
+ })
35
+ .strict();
36
+ const AppointmentBodyShape = {
37
+ calendarId: z.string().min(1).optional(),
38
+ locationId: z.string().min(1).optional(),
39
+ contactId: z.string().min(1).optional(),
40
+ startTime: z.string().min(1).optional(),
41
+ endTime: z.string().min(1).optional(),
42
+ title: z.string().min(1).optional(),
43
+ appointmentStatus: z.string().min(1).optional(),
44
+ assignedUserId: z.string().min(1).optional(),
45
+ address: z.string().min(1).optional(),
46
+ ignoreDateRange: z.boolean().optional(),
47
+ toNotify: z.boolean().optional(),
48
+ extra: ExtraSchema
49
+ };
50
+ export const CreateAppointmentSchema = z
51
+ .object({
52
+ ...AppointmentBodyShape,
53
+ calendarId: z.string().min(1).describe("Calendar ID."),
54
+ locationId: z.string().min(1).optional().describe("Optional location ID. Defaults to GHL_LOCATION_ID when omitted."),
55
+ contactId: z.string().min(1).describe("Contact ID."),
56
+ startTime: z.string().min(1).describe("Appointment start time."),
57
+ response_format: ResponseFormatSchema
58
+ })
59
+ .strict();
60
+ export const UpdateAppointmentSchema = z
61
+ .object({
62
+ appointment_id: IdSchema.describe("Appointment/event ID."),
63
+ ...AppointmentBodyShape,
64
+ response_format: ResponseFormatSchema
65
+ })
66
+ .strict();
67
+ export const DeleteAppointmentSchema = z
68
+ .object({
69
+ event_id: IdSchema.describe("Calendar event ID."),
70
+ confirm: ConfirmSchema,
71
+ response_format: ResponseFormatSchema
72
+ })
73
+ .strict();
74
+ //# sourceMappingURL=calendars.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendars.js","sourceRoot":"","sources":["../../src/schemas/calendars.ts"],"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AyB,CAAC;IAChE,eAAe,EAAE,oBAAoB;CACtC,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC;KACrC,MAAM,CAAC;IACN,cAAc,EAAE,QAAQ,CAAC,QAAQ,CAAC,uBAAuB,CAAC;IAC1D,GAAG,oBAAoB;IACvB,eAAe,EAAE,oBAAoB;CACtC,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC;KACrC,MAAM,CAAC;IACN,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,oBAAoB,CAAC;IACjD,OAAO,EAAE,aAAa;IACtB,eAAe,EAAE,oBAAoB;CACtC,CAAC;KACD,MAAM,EAAE,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { z } from "zod";
2
+ export declare const ResponseFormatSchema: z.ZodDefault<z.ZodEnum<["markdown", "json"]>>;
3
+ export declare const LimitSchema: z.ZodDefault<z.ZodNumber>;
4
+ export declare const OffsetSchema: z.ZodDefault<z.ZodNumber>;
5
+ export declare const LocationIdSchema: z.ZodOptional<z.ZodString>;
6
+ export declare const ConfirmSchema: z.ZodBoolean;
7
+ export declare const IdSchema: z.ZodString;
8
+ export declare const NonEmptyStringArraySchema: z.ZodArray<z.ZodString, "many">;
9
+ export declare const ExtraSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
10
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/schemas/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,oBAAoB,+CAG+D,CAAC;AAEjG,eAAO,MAAM,WAAW,2BAM6C,CAAC;AAEtE,eAAO,MAAM,YAAY,2BAKuD,CAAC;AAEjF,eAAO,MAAM,gBAAgB,4BAIyD,CAAC;AAEvF,eAAO,MAAM,aAAa,cAE+E,CAAC;AAE1G,eAAO,MAAM,QAAQ,aAAgE,CAAC;AAEtF,eAAO,MAAM,yBAAyB,iCAAoC,CAAC;AAE3E,eAAO,MAAM,WAAW,uDAGoG,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { z } from "zod";
2
+ export const ResponseFormatSchema = z
3
+ .enum(["markdown", "json"])
4
+ .default("markdown")
5
+ .describe("Output format: markdown for human-readable summaries, json for structured output.");
6
+ export const LimitSchema = z
7
+ .number()
8
+ .int()
9
+ .min(1)
10
+ .max(100)
11
+ .default(25)
12
+ .describe("Maximum number of items to return from the local page.");
13
+ export const OffsetSchema = z
14
+ .number()
15
+ .int()
16
+ .min(0)
17
+ .default(0)
18
+ .describe("Number of items to skip locally after receiving the API response.");
19
+ export const LocationIdSchema = z
20
+ .string()
21
+ .min(1)
22
+ .optional()
23
+ .describe("Optional GoHighLevel location ID override. Defaults to GHL_LOCATION_ID.");
24
+ export const ConfirmSchema = z
25
+ .boolean()
26
+ .describe("Required for destructive tools. The API call is made only when confirm is explicitly true.");
27
+ export const IdSchema = z.string().min(1).describe("GoHighLevel opaque resource ID.");
28
+ export const NonEmptyStringArraySchema = z.array(z.string().min(1)).min(1);
29
+ export const ExtraSchema = z
30
+ .record(z.unknown())
31
+ .optional()
32
+ .describe("Optional additional GoHighLevel fields to pass through when the API supports fields not modeled by this tool.");
33
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/schemas/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KAClC,IAAI,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;KAC1B,OAAO,CAAC,UAAU,CAAC;KACnB,QAAQ,CAAC,mFAAmF,CAAC,CAAC;AAEjG,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC;KACzB,MAAM,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