@velaro/mcp-server 2.0.114 → 2.0.116

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velaro/mcp-server",
3
- "version": "2.0.114",
3
+ "version": "2.0.116",
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
@@ -5052,6 +5052,20 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
5052
5052
  // ── Booking defaults and presets ──────────────────────────────────────────────
5053
5053
  // Backend: server/Velaro.Messaging/Controllers/BookingDefaultsController.cs at /BookingDefaults.
5054
5054
  // SiteId derives from the caller's auth context, never a tool argument (IDOR).
5055
+ {
5056
+ name: 'scheduler_selection_get',
5057
+ description: 'Show which scheduler receives new bookings for this site (writeTargetSlug; empty means the first connected calendar).',
5058
+ inputSchema: { type: 'object', properties: {}, required: [] },
5059
+ },
5060
+ {
5061
+ name: 'scheduler_selection_update',
5062
+ description: 'Choose which scheduler receives new bookings. Pass writeTargetSlug: GoogleCalendar, OutlookCalendar, MicrosoftBookings, Calendly, Acuity, CalCom, or null for Velaro.',
5063
+ inputSchema: {
5064
+ type: 'object',
5065
+ properties: { writeTargetSlug: { type: ['string', 'null'], description: 'Provider slug or null' } },
5066
+ required: ['writeTargetSlug'],
5067
+ },
5068
+ },
5055
5069
  {
5056
5070
  name: 'booking_defaults_get',
5057
5071
  description: 'Get this site\'s booking defaults (default provider, preset, length, meeting type, location, time zone, which contact fields are pre-filled) and its booking presets ("Demo 30 min" style choices offered on every channel). A site with nothing saved returns the built-in defaults and an empty preset list.',
@@ -5319,6 +5333,73 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
5319
5333
  },
5320
5334
  },
5321
5335
 
5336
+ // -- Scheduler floor + booking no-show / deposits / analytics (velaro-messaging FloorController + BookingsController). SiteId derives server-side from the caller's auth, never a tool argument (IDOR).
5337
+ {
5338
+ name: 'booking_floor_list_waitlist',
5339
+ description: 'List the current floor waitlist and walk-ins (party size, status, quoted wait). GET /Floor/Waitlist.',
5340
+ inputSchema: { type: 'object', properties: {}, required: [] },
5341
+ },
5342
+ {
5343
+ name: 'booking_floor_add_waitlist',
5344
+ description: 'Add a guest to the floor waitlist. POST /Floor/Waitlist.',
5345
+ inputSchema: { type: 'object', properties: { guestName: { type: 'string', description: 'Guest name. Required.' }, phone: { type: 'string', description: 'Phone for the table-ready text. Required.' }, partySize: { type: 'number', description: 'Party size. Required.' }, isVip: { type: 'boolean', description: 'VIP flag' }, quotedWaitMinutes: { type: 'number', description: 'Quoted wait in minutes' }, notes: { type: 'string', description: 'Notes' } }, required: ['guestName', 'phone', 'partySize'] },
5346
+ },
5347
+ {
5348
+ name: 'booking_floor_add_walk_in',
5349
+ description: 'Record a walk-in on the floor. POST /Floor/WalkIn.',
5350
+ inputSchema: { type: 'object', properties: { guestName: { type: 'string', description: 'Guest name. Required.' }, phone: { type: 'string', description: 'Phone. Required.' }, partySize: { type: 'number', description: 'Party size. Required.' }, isVip: { type: 'boolean', description: 'VIP flag' }, quotedWaitMinutes: { type: 'number', description: 'Quoted wait in minutes' }, notes: { type: 'string', description: 'Notes' } }, required: ['guestName', 'phone', 'partySize'] },
5351
+ },
5352
+ {
5353
+ name: 'booking_floor_waitlist_action',
5354
+ description: 'Act on a waitlist entry: ready (texts the guest the table is ready), seat, remove or noshow. POST /Floor/Waitlist/{id}/Ready|Seat|Remove|NoShow.',
5355
+ inputSchema: { type: 'object', properties: { entryId: { type: 'number', description: 'Waitlist entry ID. Required.' }, action: { type: 'string', description: 'ready | seat | remove | noshow. Required.' }, resourceId: { type: 'number', description: 'Table (resource) ID, for seat' } }, required: ['entryId', 'action'] },
5356
+ },
5357
+ {
5358
+ name: 'booking_floor_get_settings',
5359
+ description: 'Read the floor settings (turn minutes, overbook percent, seatings, confirmation SMS, automatic meeting link, default instructions). GET /Floor/Settings.',
5360
+ inputSchema: { type: 'object', properties: {}, required: [] },
5361
+ },
5362
+ {
5363
+ name: 'booking_floor_update_settings',
5364
+ description: 'Partially update the floor settings; only fields passed change. PUT /Floor/Settings.',
5365
+ inputSchema: { type: 'object', properties: { defaultTurnMinutes: { type: 'number', description: '5 to 600' }, overbookPercent: { type: 'number', description: '0 to 50' }, seatingsJson: { type: 'string', description: 'Seatings JSON' }, sendBookingConfirmationSms: { type: 'boolean', description: 'Send a confirmation SMS' }, autoCreateMeetingLink: { type: 'boolean', description: 'Create meeting links automatically' }, meetingOrganizerUpn: { type: 'string', description: 'Meeting organizer UPN' }, defaultInstructions: { type: 'string', description: 'Default guest instructions' } }, required: [] },
5366
+ },
5367
+ {
5368
+ name: 'booking_floor_update_table',
5369
+ description: 'Update one table: party range, turn minutes, combine group (empty text clears it). Only fields passed change. PUT /Floor/Tables/{resourceId}.',
5370
+ inputSchema: { type: 'object', properties: { resourceId: { type: 'number', description: 'Table (resource) ID. Required.' }, minParty: { type: 'number', description: 'Minimum party' }, maxParty: { type: 'number', description: 'Maximum party' }, turnMinutes: { type: 'number', description: 'Turn minutes' }, combineGroup: { type: 'string', description: 'Combine group' } }, required: ['resourceId'] },
5371
+ },
5372
+ {
5373
+ name: 'booking_floor_send_meeting_link',
5374
+ description: 'Send the meeting link for a booking to the guest now. POST /Floor/Bookings/{id}/SendMeetingLink.',
5375
+ inputSchema: { type: 'object', properties: { bookingId: { type: 'number', description: 'Booking ID. Required.' }, channel: { type: 'string', description: 'sms or email (default sms)' } }, required: ['bookingId'] },
5376
+ },
5377
+ {
5378
+ name: 'booking_mark_no_show',
5379
+ description: 'Mark a booking as a no-show. POST /Bookings/{id}/no-show.',
5380
+ inputSchema: { type: 'object', properties: { bookingId: { type: 'number', description: 'Booking ID. Required.' } }, required: ['bookingId'] },
5381
+ },
5382
+ {
5383
+ name: 'booking_set_deposit',
5384
+ description: 'Require or clear a deposit on a booking, with an optional amount. PUT /Bookings/{id}/deposit.',
5385
+ inputSchema: { type: 'object', properties: { bookingId: { type: 'number', description: 'Booking ID. Required.' }, required: { type: 'boolean', description: 'Whether a deposit is required. Required.' }, amount: { type: 'number', description: 'Deposit amount' } }, required: ['bookingId', 'required'] },
5386
+ },
5387
+ {
5388
+ name: 'booking_create_deposit_link',
5389
+ description: 'Create a deposit payment link for a booking. POST /Bookings/{id}/deposit/link.',
5390
+ inputSchema: { type: 'object', properties: { bookingId: { type: 'number', description: 'Booking ID. Required.' } }, required: ['bookingId'] },
5391
+ },
5392
+ {
5393
+ name: 'booking_deposit_status',
5394
+ description: 'Check a deposit payment by payment id. GET /Bookings/deposit/status.',
5395
+ inputSchema: { type: 'object', properties: { paymentId: { type: 'string', description: 'Payment ID. Required.' } }, required: ['paymentId'] },
5396
+ },
5397
+ {
5398
+ name: 'booking_analytics',
5399
+ description: 'Booking analytics for a date range: bookings and seats by status, no-shows, utilization per resource. GET /Bookings/analytics.',
5400
+ inputSchema: { type: 'object', properties: { fromUtc: { type: 'string', description: 'ISO 8601 UTC start' }, toUtc: { type: 'string', description: 'ISO 8601 UTC end' } }, required: [] },
5401
+ },
5402
+
5322
5403
  // Focus Inbox -- draft pregeneration usage/cap report ("Always Learning" addon,
5323
5404
  // issue #582 Phase D). Entitlements-gated (EnableFocusDraftPregeneration), not a
5324
5405
  // Subscription.cs flag -- the response's own `entitled` field is the source of
@@ -9821,6 +9902,12 @@ ${JSON.stringify(result, null, 2)}`;
9821
9902
  }
9822
9903
 
9823
9904
  // -- Booking defaults and presets --
9905
+ case 'scheduler_selection_get': {
9906
+ return JSON.stringify(await messagingGet('/Appointments/Settings'), null, 2);
9907
+ }
9908
+ case 'scheduler_selection_update': {
9909
+ return JSON.stringify(await messagingPost('/Appointments/Settings', { writeTargetSlug: args.writeTargetSlug ?? null }), null, 2);
9910
+ }
9824
9911
  case 'booking_defaults_get': {
9825
9912
  const result = await messagingGet('/BookingDefaults');
9826
9913
  return JSON.stringify(result, null, 2);
@@ -10011,6 +10098,62 @@ ${JSON.stringify(result, null, 2)}`;
10011
10098
  return JSON.stringify(result, null, 2);
10012
10099
  }
10013
10100
 
10101
+ // -- Scheduler floor + booking no-show / deposits / analytics --
10102
+ case 'booking_floor_list_waitlist': return JSON.stringify(await messagingGet('/Floor/Waitlist'), null, 2);
10103
+ case 'booking_floor_add_waitlist':
10104
+ case 'booking_floor_add_walk_in': {
10105
+ if (!args.guestName || !args.phone || args.partySize == null) return 'guestName, phone and partySize are required.';
10106
+ const body = { guestName: args.guestName, phone: args.phone, partySize: args.partySize, isVip: args.isVip, quotedWaitMinutes: args.quotedWaitMinutes, notes: args.notes };
10107
+ return JSON.stringify(await messagingPost(name === 'booking_floor_add_walk_in' ? '/Floor/WalkIn' : '/Floor/Waitlist', body), null, 2);
10108
+ }
10109
+ case 'booking_floor_waitlist_action': {
10110
+ const verbs = { ready: 'Ready', seat: 'Seat', remove: 'Remove', noshow: 'NoShow' };
10111
+ const verb = verbs[String(args.action || '').toLowerCase()];
10112
+ if (args.entryId == null || !verb) return 'entryId and action (ready | seat | remove | noshow) are required.';
10113
+ const body = args.resourceId != null ? { resourceId: args.resourceId } : {};
10114
+ return JSON.stringify(await messagingPost(`/Floor/Waitlist/${encodeURIComponent(args.entryId)}/${verb}`, body), null, 2);
10115
+ }
10116
+ case 'booking_floor_get_settings': return JSON.stringify(await messagingGet('/Floor/Settings'), null, 2);
10117
+ case 'booking_floor_update_settings': {
10118
+ const keys = ['defaultTurnMinutes', 'overbookPercent', 'seatingsJson', 'sendBookingConfirmationSms', 'autoCreateMeetingLink', 'meetingOrganizerUpn', 'defaultInstructions'];
10119
+ const body = {}; for (const k of keys) if (args[k] !== undefined) body[k] = args[k];
10120
+ if (!Object.keys(body).length) return 'Pass at least one setting to change.';
10121
+ return JSON.stringify(await messagingPut('/Floor/Settings', body), null, 2);
10122
+ }
10123
+ case 'booking_floor_update_table': {
10124
+ if (args.resourceId == null) return 'resourceId is required.';
10125
+ const body = {}; for (const k of ['minParty', 'maxParty', 'turnMinutes', 'combineGroup']) if (args[k] !== undefined) body[k] = args[k];
10126
+ if (!Object.keys(body).length) return 'Pass at least one table field to change.';
10127
+ return JSON.stringify(await messagingPut(`/Floor/Tables/${encodeURIComponent(args.resourceId)}`, body), null, 2);
10128
+ }
10129
+ case 'booking_floor_send_meeting_link': {
10130
+ if (args.bookingId == null) return 'bookingId is required.';
10131
+ return JSON.stringify(await messagingPost(`/Floor/Bookings/${encodeURIComponent(args.bookingId)}/SendMeetingLink`, { channel: args.channel || 'sms' }), null, 2);
10132
+ }
10133
+ case 'booking_mark_no_show': {
10134
+ if (args.bookingId == null) return 'bookingId is required.';
10135
+ return JSON.stringify(await messagingPost(`/Bookings/${encodeURIComponent(args.bookingId)}/no-show`, {}), null, 2);
10136
+ }
10137
+ case 'booking_set_deposit': {
10138
+ if (args.bookingId == null || typeof args.required !== 'boolean') return 'bookingId and required (true or false) are required.';
10139
+ const body = { required: args.required }; if (args.amount != null) body.amount = args.amount;
10140
+ return JSON.stringify(await messagingPut(`/Bookings/${encodeURIComponent(args.bookingId)}/deposit`, body), null, 2);
10141
+ }
10142
+ case 'booking_create_deposit_link': {
10143
+ if (args.bookingId == null) return 'bookingId is required.';
10144
+ return JSON.stringify(await messagingPost(`/Bookings/${encodeURIComponent(args.bookingId)}/deposit/link`, {}), null, 2);
10145
+ }
10146
+ case 'booking_deposit_status': {
10147
+ if (!args.paymentId) return 'paymentId is required.';
10148
+ return JSON.stringify(await messagingGet(`/Bookings/deposit/status?paymentId=${encodeURIComponent(args.paymentId)}`), null, 2);
10149
+ }
10150
+ case 'booking_analytics': {
10151
+ const params = [];
10152
+ if (args.fromUtc != null) params.push(`fromUtc=${encodeURIComponent(args.fromUtc)}`);
10153
+ if (args.toUtc != null) params.push(`toUtc=${encodeURIComponent(args.toUtc)}`);
10154
+ return JSON.stringify(await messagingGet(`/Bookings/analytics${params.length ? '?' + params.join('&') : ''}`), null, 2);
10155
+ }
10156
+
10014
10157
 
10015
10158
  // -- Wave: sentiment / quality / keyword intelligence / skill routing / QA rubric --
10016
10159
  case 'sentiment_report': {