@velaro/mcp-server 0.6.99 → 0.6.100
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/server.js +134 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velaro/mcp-server",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.100",
|
|
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": {
|
package/server.js
CHANGED
|
@@ -848,12 +848,12 @@ const TOOLS = [
|
|
|
848
848
|
{
|
|
849
849
|
name: 'canned_learning_suggestions',
|
|
850
850
|
description: 'List AI-proposed canned message improvements awaiting human review (learned from low ratings and never-used messages). Each row shows currentText, proposedText, the reason, the signals it learned from, and a review state (pending_review, approved, rejected, rolled_back). Intelligence Suite entitlement required.',
|
|
851
|
-
inputSchema: { type: 'object', properties: { state: { type: 'string', description: 'pending_review (default), approved, rejected, rolled_back, or all' } } },
|
|
851
|
+
inputSchema: { type: 'object', properties: { state: { type: 'string', description: 'pending_review (default), approved, rejected, rolled_back, or all' }, teamId: { type: 'number', description: 'Only suggestions for canned responses on this team. Team managers only ever see their own teams.' } } },
|
|
852
852
|
},
|
|
853
853
|
{
|
|
854
854
|
name: 'canned_learning_generate',
|
|
855
|
-
description: 'Analyze this site canned message usage and ratings and queue AI-proposed improvements for human review. Nothing changes until approved. Capped at 5 messages per run and one run per day; text is PII-redacted before it reaches the model.',
|
|
856
|
-
inputSchema: { type: 'object', properties: {} },
|
|
855
|
+
description: 'Analyze this site canned message usage and ratings and queue AI-proposed improvements for human review. Nothing changes until approved. Capped at 5 messages per run and one run per day (per team when teamId is given); text is PII-redacted before it reaches the model. Team managers must pass a teamId they manage.',
|
|
856
|
+
inputSchema: { type: 'object', properties: { teamId: { type: 'number', description: 'Only generate for canned responses on this team' } } },
|
|
857
857
|
},
|
|
858
858
|
{
|
|
859
859
|
name: 'canned_learning_approve',
|
|
@@ -868,6 +868,11 @@ const TOOLS = [
|
|
|
868
868
|
{
|
|
869
869
|
name: 'canned_learning_edit_summary',
|
|
870
870
|
description: 'Which canned messages agents edit most before sending (last 90 days): canned response id, shortcut, edit count and average similarity of the sent text to the original. This is the edited-before-send evidence the weekly canned message learning job uses. Intelligence Suite entitlement required.',
|
|
871
|
+
inputSchema: { type: 'object', properties: { teamId: { type: 'number', description: 'Only canned responses on this team' } } },
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
name: 'canned_learning_teams',
|
|
875
|
+
description: 'Teams the caller can review canned message learning for: every site team for a site supervisor, only managed teams for a team manager. Use the ids as teamId on the other canned_learning tools.',
|
|
871
876
|
inputSchema: { type: 'object', properties: {} },
|
|
872
877
|
},
|
|
873
878
|
{
|
|
@@ -2155,6 +2160,62 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
|
|
|
2155
2160
|
required: ['fromIndex', 'toIndex'],
|
|
2156
2161
|
},
|
|
2157
2162
|
},
|
|
2163
|
+
{
|
|
2164
|
+
name: 'safety_events_list',
|
|
2165
|
+
description: "List the site's safety events (emergency, emergency_unconfirmed, therapy_setting_change, fail_closed, output_guardrail_block, visitor_report, off_topic_attempt). Needs the EnableTroubleshootingKnowledge entitlement. Wraps GET SafetyEvents; the site comes from the caller auth, never an argument.",
|
|
2166
|
+
inputSchema: {
|
|
2167
|
+
type: 'object',
|
|
2168
|
+
properties: {
|
|
2169
|
+
from: { type: 'string', description: 'ISO start date/time' },
|
|
2170
|
+
to: { type: 'string', description: 'ISO end date/time' },
|
|
2171
|
+
type: { type: 'string', description: 'One event type' },
|
|
2172
|
+
status: { type: 'string', enum: ['open', 'acknowledged'] },
|
|
2173
|
+
take: { type: 'number', description: 'Page size, default 25' },
|
|
2174
|
+
skip: { type: 'number', description: 'Rows to skip, default 0' },
|
|
2175
|
+
},
|
|
2176
|
+
},
|
|
2177
|
+
},
|
|
2178
|
+
{
|
|
2179
|
+
name: 'safety_events_summary',
|
|
2180
|
+
description: 'Per-day and total safety event counts by type for the last N days (default 7). Wraps GET SafetyEvents/summary.',
|
|
2181
|
+
inputSchema: { type: 'object', properties: { days: { type: 'number', description: 'Default 7, e.g. 30' } } },
|
|
2182
|
+
},
|
|
2183
|
+
{
|
|
2184
|
+
name: 'safety_event_ack',
|
|
2185
|
+
description: 'Mark one safety event as reviewed. Wraps POST SafetyEvents/{id}/acknowledge.',
|
|
2186
|
+
inputSchema: { type: 'object', properties: { id: { type: 'string' } }, required: ['id'] },
|
|
2187
|
+
},
|
|
2188
|
+
{
|
|
2189
|
+
name: 'safety_settings_get',
|
|
2190
|
+
description: 'Get the safety alert settings: enabled, emailRecipients, smsRecipients, immediateTypes, digest (off|daily|weekly), threshold {count, windowMinutes}. Wraps GET SafetyEvents/settings.',
|
|
2191
|
+
inputSchema: { type: 'object', properties: {} },
|
|
2192
|
+
},
|
|
2193
|
+
{
|
|
2194
|
+
name: 'safety_settings_set',
|
|
2195
|
+
description: 'Change the safety alert settings. Only the fields you pass change; the rest keep their current value. Wraps PUT SafetyEvents/settings (reads the current settings first).',
|
|
2196
|
+
inputSchema: {
|
|
2197
|
+
type: 'object',
|
|
2198
|
+
properties: {
|
|
2199
|
+
enabled: { type: 'boolean' },
|
|
2200
|
+
emailRecipients: { type: 'array', items: { type: 'string' } },
|
|
2201
|
+
smsRecipients: { type: 'array', items: { type: 'string' }, description: 'E.164 numbers, e.g. +15551234567' },
|
|
2202
|
+
immediateTypes: { type: 'array', items: { type: 'string' }, description: 'Event types that alert right away' },
|
|
2203
|
+
digest: { type: 'string', enum: ['off', 'daily', 'weekly'] },
|
|
2204
|
+
thresholdCount: { type: 'number', description: 'Alert when this many events happen inside the window. 0 turns it off.' },
|
|
2205
|
+
thresholdWindowMinutes: { type: 'number', description: '1 to 10080' },
|
|
2206
|
+
},
|
|
2207
|
+
},
|
|
2208
|
+
},
|
|
2209
|
+
{
|
|
2210
|
+
name: 'safety_settings_test',
|
|
2211
|
+
description: 'Send a test safety alert to the configured recipients. Wraps POST SafetyEvents/settings/test.',
|
|
2212
|
+
inputSchema: { type: 'object', properties: {} },
|
|
2213
|
+
},
|
|
2214
|
+
{
|
|
2215
|
+
name: 'safety_need_help',
|
|
2216
|
+
description: 'Tell the Velaro team the bot is going off the rails and you need help now. Wraps POST SafetyEvents/need-help.',
|
|
2217
|
+
inputSchema: { type: 'object', properties: { message: { type: 'string', description: 'What is happening' } }, required: ['message'] },
|
|
2218
|
+
},
|
|
2158
2219
|
{
|
|
2159
2220
|
name: 'index_move_status',
|
|
2160
2221
|
description: 'Status of one move (moveId) or the recent moves (omit moveId): status, per-document progress, canResume/canAbort/canUndo. Wraps GET IndexMove/Moves[/{id}].',
|
|
@@ -2867,6 +2928,25 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
|
|
|
2867
2928
|
},
|
|
2868
2929
|
},
|
|
2869
2930
|
|
|
2931
|
+
// ── Chat Window launcher copy (per-page launcher label + greeting) ─────────
|
|
2932
|
+
{
|
|
2933
|
+
name: 'chat_window_list',
|
|
2934
|
+
description: 'List chat windows for this site with the launcher label (launcherText) and greeting. Point a Select Chat Window workflow node or Determine Experience Bundle rule at a window to show its label and greeting on specific pages.',
|
|
2935
|
+
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
2936
|
+
},
|
|
2937
|
+
{
|
|
2938
|
+
name: 'chat_window_set_launcher_copy',
|
|
2939
|
+
description: 'Set the launcher label (the text pill on the chat button, max 60 chars) and/or the opening greeting (max 256 chars) on one chat window. Omitted fields are left unchanged; an empty string clears the field and the widget falls back to its default. For per-page copy, create one chat window per page type (and per language) and select it with a Select Chat Window workflow node.',
|
|
2940
|
+
inputSchema: {
|
|
2941
|
+
type: 'object',
|
|
2942
|
+
properties: {
|
|
2943
|
+
id: { type: 'number', description: 'Chat window ID (see chat_window_list)' },
|
|
2944
|
+
launcherText: { type: 'string', description: 'Launcher label, e.g. "Troubleshoot my device"' },
|
|
2945
|
+
greeting: { type: 'string', description: 'Opening greeting shown when the window opens' },
|
|
2946
|
+
},
|
|
2947
|
+
required: ['id'],
|
|
2948
|
+
},
|
|
2949
|
+
},
|
|
2870
2950
|
// ── Page Widget Containers ────────────────────────────────────────────────
|
|
2871
2951
|
{
|
|
2872
2952
|
name: 'widget_container_list',
|
|
@@ -6343,15 +6423,17 @@ async function handleTool(name, args) {
|
|
|
6343
6423
|
if (args.confirm) return await messagingPost('/ChatIntelligenceTopics/analysis', { confirm: true });
|
|
6344
6424
|
return { estimate: await messagingGet('/ChatIntelligenceTopics/analysis/estimate'), cached: await messagingGet('/ChatIntelligenceTopics/analysis') };
|
|
6345
6425
|
case 'canned_learning_suggestions':
|
|
6346
|
-
return await messagingGet(`/CannedLearning/suggestions?state=${encodeURIComponent(args.state ?? 'pending_review')}`);
|
|
6426
|
+
return await messagingGet(`/CannedLearning/suggestions?state=${encodeURIComponent(args.state ?? 'pending_review')}${args.teamId != null ? `&teamId=${encodeURIComponent(args.teamId)}` : ''}`);
|
|
6347
6427
|
case 'canned_learning_generate':
|
|
6348
|
-
return await messagingPost('/CannedLearning/generate', {});
|
|
6428
|
+
return await messagingPost('/CannedLearning/generate', { teamId: args.teamId ?? null });
|
|
6429
|
+
case 'canned_learning_teams':
|
|
6430
|
+
return await messagingGet('/CannedLearning/teams');
|
|
6349
6431
|
case 'canned_learning_approve':
|
|
6350
6432
|
return await messagingPost(`/CannedLearning/suggestions/${args.suggestionId}/approve`, { editedText: args.editedText ?? null });
|
|
6351
6433
|
case 'canned_learning_reject':
|
|
6352
6434
|
return await messagingPost(`/CannedLearning/suggestions/${args.suggestionId}/reject`, {});
|
|
6353
6435
|
case 'canned_learning_edit_summary':
|
|
6354
|
-
return await messagingGet(
|
|
6436
|
+
return await messagingGet(`/CannedLearning/edit-events${args.teamId != null ? `?teamId=${encodeURIComponent(args.teamId)}` : ''}`);
|
|
6355
6437
|
case 'canned_learning_record_edit':
|
|
6356
6438
|
return await messagingPost('/CannedLearning/edit-events', { cannedResponseId: args.cannedResponseId, finalText: args.finalText });
|
|
6357
6439
|
case 'canned_learning_rollback':
|
|
@@ -7769,6 +7851,35 @@ async function handleTool(name, args) {
|
|
|
7769
7851
|
const r = await messagingPost('/IndexMove/Split/Execute', body);
|
|
7770
7852
|
return JSON.stringify(r, null, 2);
|
|
7771
7853
|
}
|
|
7854
|
+
case 'safety_events_list': {
|
|
7855
|
+
const q = new URLSearchParams();
|
|
7856
|
+
for (const k of ['from', 'to', 'type', 'status']) if (args[k]) q.set(k, String(args[k]));
|
|
7857
|
+
q.set('take', String(args.take ?? 25));
|
|
7858
|
+
q.set('skip', String(args.skip ?? 0));
|
|
7859
|
+
return JSON.stringify(await messagingGet(`/SafetyEvents?${q}`), null, 2);
|
|
7860
|
+
}
|
|
7861
|
+
case 'safety_events_summary':
|
|
7862
|
+
return JSON.stringify(await messagingGet(`/SafetyEvents/summary?days=${Number(args.days) || 7}`), null, 2);
|
|
7863
|
+
case 'safety_event_ack':
|
|
7864
|
+
return JSON.stringify(await messagingPost(`/SafetyEvents/${encodeURIComponent(args.id)}/acknowledge`), null, 2);
|
|
7865
|
+
case 'safety_settings_get':
|
|
7866
|
+
return JSON.stringify(await messagingGet('/SafetyEvents/settings'), null, 2);
|
|
7867
|
+
case 'safety_settings_set': {
|
|
7868
|
+
const cur = (await messagingGet('/SafetyEvents/settings')) ?? {};
|
|
7869
|
+
const next = { ...cur };
|
|
7870
|
+
for (const k of ['enabled', 'emailRecipients', 'smsRecipients', 'immediateTypes', 'digest']) if (args[k] !== undefined) next[k] = args[k];
|
|
7871
|
+
if (args.thresholdCount !== undefined || args.thresholdWindowMinutes !== undefined) {
|
|
7872
|
+
next.threshold = {
|
|
7873
|
+
count: args.thresholdCount ?? cur.threshold?.count ?? 0,
|
|
7874
|
+
windowMinutes: args.thresholdWindowMinutes ?? cur.threshold?.windowMinutes ?? 60,
|
|
7875
|
+
};
|
|
7876
|
+
}
|
|
7877
|
+
return JSON.stringify(await messagingPut('/SafetyEvents/settings', next), null, 2);
|
|
7878
|
+
}
|
|
7879
|
+
case 'safety_settings_test':
|
|
7880
|
+
return JSON.stringify(await messagingPost('/SafetyEvents/settings/test'), null, 2);
|
|
7881
|
+
case 'safety_need_help':
|
|
7882
|
+
return JSON.stringify(await messagingPost('/SafetyEvents/need-help', { message: args.message }), null, 2);
|
|
7772
7883
|
case 'index_move_status': {
|
|
7773
7884
|
const r = await messagingGet(args.moveId
|
|
7774
7885
|
? `/IndexMove/Moves/${encodeURIComponent(args.moveId)}`
|
|
@@ -8723,6 +8834,23 @@ async function handleTool(name, args) {
|
|
|
8723
8834
|
).join('\n');
|
|
8724
8835
|
}
|
|
8725
8836
|
|
|
8837
|
+
case 'chat_window_list': {
|
|
8838
|
+
const r = (await messagingGet('/ChatWindow/list')) ?? [];
|
|
8839
|
+
return JSON.stringify(r.map((w) => ({
|
|
8840
|
+
id: w.id, name: w.name, language: w.languageConfig?.language,
|
|
8841
|
+
launcherText: w.styleConfig?.launcherText ?? null, greeting: w.languageConfig?.greeting ?? null,
|
|
8842
|
+
})), null, 2);
|
|
8843
|
+
}
|
|
8844
|
+
|
|
8845
|
+
case 'chat_window_set_launcher_copy': {
|
|
8846
|
+
if (!args.id) throw new Error('id is required');
|
|
8847
|
+
const body = {};
|
|
8848
|
+
if (args.launcherText !== undefined) body.launcherText = args.launcherText;
|
|
8849
|
+
if (args.greeting !== undefined) body.greeting = args.greeting;
|
|
8850
|
+
if (!Object.keys(body).length) throw new Error('provide launcherText and/or greeting');
|
|
8851
|
+
return JSON.stringify(await messagingPut(`/ChatWindow/${args.id}/launcher-copy`, body), null, 2);
|
|
8852
|
+
}
|
|
8853
|
+
|
|
8726
8854
|
case 'widget_container_get': {
|
|
8727
8855
|
const c = await api('GET', `/PageWidgetContainers/${args.id}`);
|
|
8728
8856
|
return JSON.stringify(c, null, 2);
|