@velaro/mcp-server 2.0.110 → 2.0.112
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/package.json +1 -1
- package/parity/crm-views-bulk-webforms.customer.js +51 -3
- package/server.js +19 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velaro/mcp-server",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.112",
|
|
4
4
|
"description": "Velaro MCP server — connect Claude and other AI agents directly to your Velaro account: KB, workflows, bots, conversations, contacts, routing, and more.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -83,17 +83,44 @@ export const tools = [
|
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
85
|
name: 'crm_webform_list',
|
|
86
|
-
description: 'List the CRM form layouts that are published as public web forms, with each form\'s page path and whether it is online. Administrator only.',
|
|
86
|
+
description: 'List the CRM form layouts that are published as public web forms, with each form\'s page path, hosted url, embed snippet and whether it is online. Administrator only.',
|
|
87
87
|
inputSchema: { type: 'object', properties: {} },
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
90
|
name: 'crm_webform_get',
|
|
91
|
-
description: 'Show the web form published from one form layout (page path, question count, whether it is online). Administrator only.',
|
|
91
|
+
description: 'Show the web form published from one form layout (page path, hosted url, embed snippet, question count, success message and redirect settings, whether it is online). Administrator only.',
|
|
92
92
|
inputSchema: { type: 'object', properties: { layoutId: { type: 'number' } }, required: ['layoutId'] },
|
|
93
93
|
},
|
|
94
|
+
{
|
|
95
|
+
name: 'crm_webform_settings',
|
|
96
|
+
description: 'Set what a visitor sees after submitting a published CRM web form: a plain text success message (up to 500 characters, no markup) and an optional redirect address (a full http or https address, up to 500 characters, no user name or password in it). Options you leave out keep their stored value; pass clear true to reset both to the defaults. The form must be published. Administrator only; part of the CRM Studio package (see your plan).',
|
|
97
|
+
inputSchema: {
|
|
98
|
+
type: 'object',
|
|
99
|
+
properties: {
|
|
100
|
+
layoutId: { type: 'number' },
|
|
101
|
+
successMessage: { type: 'string', description: 'Plain text; an empty string restores the standard thank you.' },
|
|
102
|
+
redirectUrl: { type: 'string', description: 'Full http or https address; an empty string removes the redirect.' },
|
|
103
|
+
clear: { type: 'boolean', description: 'Reset both settings to the defaults.' },
|
|
104
|
+
},
|
|
105
|
+
required: ['layoutId'],
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: 'crm_webform_submissions',
|
|
110
|
+
description: 'List what visitors submitted through a published CRM web form, newest first, as question and answer pairs per submission. Paged: page starts at 1, pageSize is at most 100. Administrator only; works on any plan.',
|
|
111
|
+
inputSchema: {
|
|
112
|
+
type: 'object',
|
|
113
|
+
properties: {
|
|
114
|
+
layoutId: { type: 'number' },
|
|
115
|
+
page: { type: 'number', description: 'Starts at 1.' },
|
|
116
|
+
pageSize: { type: 'number', description: 'At most 100; default 25.' },
|
|
117
|
+
},
|
|
118
|
+
required: ['layoutId'],
|
|
119
|
+
},
|
|
120
|
+
},
|
|
94
121
|
{
|
|
95
122
|
name: 'crm_webform_publish',
|
|
96
|
-
description: 'Publish a CRM form layout as a public web form, or update the one already published (same link). The form is a survey with one CRM field question per layout field, served at the hosted survey page; the reply lists any layout fields that were left out and why. Administrator only; part of the CRM Studio package (see your plan).',
|
|
123
|
+
description: 'Publish a CRM form layout as a public web form, or update the one already published (same link). The form is a survey with one CRM field question per layout field, served at the hosted survey page; the reply lists any layout fields that were left out and why, and gives the hosted url and an embed snippet to put the form on a website. Administrator only; part of the CRM Studio package (see your plan).',
|
|
97
124
|
inputSchema: { type: 'object', properties: { layoutId: { type: 'number' } }, required: ['layoutId'] },
|
|
98
125
|
},
|
|
99
126
|
{
|
|
@@ -141,4 +168,25 @@ export const handlers = {
|
|
|
141
168
|
crm_webform_get: async (a, ctx) => data(await ctx.messagingGet(`/CrmWebForms/${id(a.layoutId)}`)),
|
|
142
169
|
crm_webform_publish: async (a, ctx) => data(await ctx.messagingPost(`/CrmWebForms/${id(a.layoutId)}/publish`, {})),
|
|
143
170
|
crm_webform_unpublish: async (a, ctx) => data(await ctx.messagingDel(`/CrmWebForms/${id(a.layoutId)}/publish`)),
|
|
171
|
+
crm_webform_settings: async (a, ctx) => {
|
|
172
|
+
// The server replaces both fields, so a field that was not sent keeps its stored value.
|
|
173
|
+
let body;
|
|
174
|
+
if (a.clear) {
|
|
175
|
+
if (a.successMessage !== undefined || a.redirectUrl !== undefined) throw new Error('[CRM] clear cannot be combined with successMessage or redirectUrl.');
|
|
176
|
+
body = { successMessage: '', redirectUrl: '' };
|
|
177
|
+
} else {
|
|
178
|
+
if (a.successMessage === undefined && a.redirectUrl === undefined) throw new Error('[CRM] Pass successMessage, redirectUrl or clear.');
|
|
179
|
+
const cur = data(await ctx.messagingGet(`/CrmWebForms/${id(a.layoutId)}`))?.settings ?? {};
|
|
180
|
+
body = {
|
|
181
|
+
successMessage: a.successMessage !== undefined ? String(a.successMessage) : (cur.successMessage ?? ''),
|
|
182
|
+
redirectUrl: a.redirectUrl !== undefined ? String(a.redirectUrl).trim() : (cur.redirectUrl ?? ''),
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
return data(await ctx.messagingPut(`/CrmWebForms/${id(a.layoutId)}/settings`, body));
|
|
186
|
+
},
|
|
187
|
+
crm_webform_submissions: async (a, ctx) => {
|
|
188
|
+
const page = Number.isInteger(a.page) && a.page >= 1 ? a.page : 1;
|
|
189
|
+
const pageSize = Number.isInteger(a.pageSize) && a.pageSize >= 1 ? Math.min(a.pageSize, 100) : 25;
|
|
190
|
+
return data(await ctx.messagingGet(`/CrmWebForms/${id(a.layoutId)}/submissions${q({ page, pageSize })}`));
|
|
191
|
+
},
|
|
144
192
|
};
|
package/server.js
CHANGED
|
@@ -5297,6 +5297,18 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
|
|
|
5297
5297
|
required: ['bookingId'],
|
|
5298
5298
|
},
|
|
5299
5299
|
},
|
|
5300
|
+
{
|
|
5301
|
+
name: 'booking_reschedule_appointment',
|
|
5302
|
+
description: 'Move a booking to another open slot (staff-initiated). The new slot must be for the same service (and the same resource when the booking has one) with enough free seats. Customers can do the same from the Manage link in their confirmation email.',
|
|
5303
|
+
inputSchema: {
|
|
5304
|
+
type: 'object',
|
|
5305
|
+
properties: {
|
|
5306
|
+
bookingId: { type: 'number', description: 'Booking ID. Required.' },
|
|
5307
|
+
newSlotId: { type: 'number', description: 'Target booking slot ID. Required.' },
|
|
5308
|
+
},
|
|
5309
|
+
required: ['bookingId', 'newSlotId'],
|
|
5310
|
+
},
|
|
5311
|
+
},
|
|
5300
5312
|
{
|
|
5301
5313
|
name: 'booking_cancel_appointment',
|
|
5302
5314
|
description: 'Cancel a booking (Phase 1c), staff-initiated. Releases the held slot capacity.',
|
|
@@ -9986,6 +9998,13 @@ ${JSON.stringify(result, null, 2)}`;
|
|
|
9986
9998
|
return JSON.stringify(result, null, 2);
|
|
9987
9999
|
}
|
|
9988
10000
|
|
|
10001
|
+
case 'booking_reschedule_appointment': {
|
|
10002
|
+
if (args.bookingId == null) return 'bookingId is required.';
|
|
10003
|
+
if (args.newSlotId == null) return 'newSlotId is required.';
|
|
10004
|
+
const result = await messagingPost(`/Bookings/${encodeURIComponent(args.bookingId)}/reschedule`, { newSlotId: args.newSlotId });
|
|
10005
|
+
return JSON.stringify(result, null, 2);
|
|
10006
|
+
}
|
|
10007
|
+
|
|
9989
10008
|
case 'booking_cancel_appointment': {
|
|
9990
10009
|
if (args.bookingId == null) return 'bookingId is required.';
|
|
9991
10010
|
const result = await messagingPost(`/Bookings/${encodeURIComponent(args.bookingId)}/cancel`, {});
|