@velaro/mcp-server 2.0.13 → 2.0.15
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/callpresence.customer.js +24 -2
- package/server.js +9 -2
- package/tool-annotations.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velaro/mcp-server",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.15",
|
|
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": {
|
|
@@ -25,7 +25,7 @@ export const tools = [
|
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
name: 'callpresence_set',
|
|
28
|
-
description: 'Set the call-presence policy at one level. Omit a setting to inherit it. whileOnCall: NoChats | TakeChats | FinishThenOffline. afterCall: ReturnAutomatically | AskAgent | StayOffline. callsWhileBusy: NoCallsWhileBusy | RingEvenWhenBusy. allowAgentOverrides applies to the site level only.',
|
|
28
|
+
description: 'Set the call-presence policy at one level. Omit a setting to inherit it. whileOnCall: NoChats | TakeChats | FinishThenOffline. afterCall: ReturnAutomatically | AskAgent | StayOffline. callsWhileBusy: NoCallsWhileBusy | RingLeastBusyIfAllBusy | RingEvenWhenBusy. allowAgentOverrides applies to the site level only.',
|
|
29
29
|
inputSchema: {
|
|
30
30
|
type: 'object',
|
|
31
31
|
properties: {
|
|
@@ -33,12 +33,27 @@ export const tools = [
|
|
|
33
33
|
id: { type: 'integer', description: 'Team id (group) or agent id (agent). Omit for site.' },
|
|
34
34
|
whileOnCall: { type: 'string', enum: ['NoChats', 'TakeChats', 'FinishThenOffline'] },
|
|
35
35
|
afterCall: { type: 'string', enum: ['ReturnAutomatically', 'AskAgent', 'StayOffline'] },
|
|
36
|
-
callsWhileBusy: { type: 'string', enum: ['NoCallsWhileBusy', 'RingEvenWhenBusy'] },
|
|
36
|
+
callsWhileBusy: { type: 'string', enum: ['NoCallsWhileBusy', 'RingLeastBusyIfAllBusy', 'RingEvenWhenBusy'] },
|
|
37
37
|
allowAgentOverrides: { type: 'boolean', description: 'Site level only: may agents set their own override' },
|
|
38
|
+
applyTo: { type: 'string', enum: ['inheritingGroups', 'allGroups', 'newGroupsOnly'], description: 'Site level only: how the change reaches existing groups. inheritingGroups (default): groups with their own setting keep it. allGroups: clear every group override. newGroupsOnly: freeze every existing group as it is today.' },
|
|
38
39
|
},
|
|
39
40
|
required: ['scope'],
|
|
40
41
|
},
|
|
41
42
|
},
|
|
43
|
+
{
|
|
44
|
+
name: 'callpresence_set_groups',
|
|
45
|
+
description: 'Set the same call-presence policy on several routing groups at once (bulk). Omit a setting to inherit it.',
|
|
46
|
+
inputSchema: {
|
|
47
|
+
type: 'object',
|
|
48
|
+
properties: {
|
|
49
|
+
teamIds: { type: 'array', items: { type: 'integer' }, description: 'Routing group (team) ids' },
|
|
50
|
+
whileOnCall: { type: 'string', enum: ['NoChats', 'TakeChats', 'FinishThenOffline'] },
|
|
51
|
+
afterCall: { type: 'string', enum: ['ReturnAutomatically', 'AskAgent', 'StayOffline'] },
|
|
52
|
+
callsWhileBusy: { type: 'string', enum: ['NoCallsWhileBusy', 'RingLeastBusyIfAllBusy', 'RingEvenWhenBusy'] },
|
|
53
|
+
},
|
|
54
|
+
required: ['teamIds'],
|
|
55
|
+
},
|
|
56
|
+
},
|
|
42
57
|
{
|
|
43
58
|
name: 'callpresence_clear',
|
|
44
59
|
description: 'Remove the call-presence policy at one level so it inherits from the level above again.',
|
|
@@ -63,7 +78,14 @@ export const handlers = {
|
|
|
63
78
|
callpresence_set: async (a, ctx) => {
|
|
64
79
|
const body = { whileOnCall: a.whileOnCall ?? null, afterCall: a.afterCall ?? null, callsWhileBusy: a.callsWhileBusy ?? null };
|
|
65
80
|
if (a.scope === 'site' && a.allowAgentOverrides !== undefined) body.allowAgentOverrides = a.allowAgentOverrides;
|
|
81
|
+
if (a.scope === 'site' && a.applyTo) body.applyTo = a.applyTo;
|
|
66
82
|
return ctx.messagingRequest('PUT', '/CallPresencePolicy/' + target(a), body);
|
|
67
83
|
},
|
|
84
|
+
callpresence_set_groups: async (a, ctx) => {
|
|
85
|
+
need(a, 'teamIds');
|
|
86
|
+
if (!Array.isArray(a.teamIds) || a.teamIds.length === 0) throw new Error('teamIds must be a non-empty array');
|
|
87
|
+
const body = { teamIds: a.teamIds.map((t) => pid(t, 'teamId')), whileOnCall: a.whileOnCall ?? null, afterCall: a.afterCall ?? null, callsWhileBusy: a.callsWhileBusy ?? null };
|
|
88
|
+
return ctx.messagingRequest('PUT', '/CallPresencePolicy/groups/bulk', body);
|
|
89
|
+
},
|
|
68
90
|
callpresence_clear: async (a, ctx) => ctx.messagingRequest('DELETE', '/CallPresencePolicy/' + target(a)),
|
|
69
91
|
};
|
package/server.js
CHANGED
|
@@ -3466,6 +3466,7 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
|
|
|
3466
3466
|
applicationInstanceObjectId: { type: 'string', description: 'Teams resource account (application instance) object ID. Pass "" to clear.' },
|
|
3467
3467
|
assignedPhoneNumber: { type: 'string', description: 'Phone number assigned to the resource account. Pass "" to clear.' },
|
|
3468
3468
|
webhookSecret: { type: 'string', description: 'Webhook secret. Omit to auto-generate on create or leave unchanged on update.' },
|
|
3469
|
+
queueMaxWaitSeconds: { type: 'number', description: 'Site default for how long a caller waits for a free agent, 30 to 600 seconds. Omit to leave unchanged; pass 0 to reset to the platform default (120). Valid values are 0 or 30 to 600.' },
|
|
3469
3470
|
},
|
|
3470
3471
|
required: [],
|
|
3471
3472
|
},
|
|
@@ -3477,7 +3478,7 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
|
|
|
3477
3478
|
},
|
|
3478
3479
|
{
|
|
3479
3480
|
name: 'teams_phone_test_config',
|
|
3480
|
-
description: 'Run the Teams Phone readiness checks and return each check (name, ok, message) plus callingReady
|
|
3481
|
+
description: 'Run the Teams Phone calling readiness checks on the ACS path and return each check (name, ok, message) plus callingReady: tenant ID saved, resource account saved, admin consent and inbound call routing. A response with no checks is never a pass. Surfaces what is missing rather than only being discovered when a call is missed. Lives in velaro-messaging — requires VELARO_MESSAGING_API.',
|
|
3481
3482
|
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
3482
3483
|
},
|
|
3483
3484
|
|
|
@@ -7832,7 +7833,11 @@ reply: ${r?.reply}`;
|
|
|
7832
7833
|
applicationInstanceObjectId: args.applicationInstanceObjectId,
|
|
7833
7834
|
assignedPhoneNumber: args.assignedPhoneNumber,
|
|
7834
7835
|
webhookSecret: args.webhookSecret,
|
|
7836
|
+
queueMaxWaitSeconds: args.queueMaxWaitSeconds,
|
|
7835
7837
|
};
|
|
7838
|
+
if (args.queueMaxWaitSeconds != null && (!Number.isInteger(args.queueMaxWaitSeconds) || (args.queueMaxWaitSeconds !== 0 && (args.queueMaxWaitSeconds < 30 || args.queueMaxWaitSeconds > 600)))) {
|
|
7839
|
+
throw new Error('queueMaxWaitSeconds must be 0 (reset to default) or a whole number from 30 to 600.');
|
|
7840
|
+
}
|
|
7836
7841
|
const result = existing?.configured
|
|
7837
7842
|
? await messagingPut('/TeamsPhone/Config', body)
|
|
7838
7843
|
: await messagingPost('/TeamsPhone/Config', body);
|
|
@@ -7844,7 +7849,9 @@ reply: ${r?.reply}`;
|
|
|
7844
7849
|
}
|
|
7845
7850
|
case 'teams_phone_test_config': {
|
|
7846
7851
|
const result = await messagingPost('/TeamsPhone/Config/Test', {});
|
|
7847
|
-
const
|
|
7852
|
+
const noChecks = !Array.isArray(result.checks) || result.checks.length === 0;
|
|
7853
|
+
const passed = result.success === true && !noChecks;
|
|
7854
|
+
const lines = [`${passed ? 'Success' : 'Failed'}: ${result.message ?? (noChecks ? 'The test returned no checks, so nothing was verified.' : '(no message)')}`];
|
|
7848
7855
|
if (typeof result.callingReady === 'boolean') lines.push(`Inbound calling ready: ${result.callingReady}`);
|
|
7849
7856
|
if (Array.isArray(result.checks)) {
|
|
7850
7857
|
for (const ck of result.checks) lines.push(`${ck?.ok ? 'PASS' : 'FAIL'} ${ck?.name ?? ''}${ck?.message ? ': ' + ck.message : ''}`);
|
package/tool-annotations.js
CHANGED
|
@@ -24,7 +24,7 @@ const MUTATING = new Set([
|
|
|
24
24
|
'monday_set_field_mapping', 'teams_push_settings_update', 'teams_channel_config_update',
|
|
25
25
|
'routing_team_update_config', 'pickup_update_config', 'payment_recovery_update_config',
|
|
26
26
|
'recruiting_sync_jobs', 'ai_config_set_reply_format', 'magento_set_sidebar_fields',
|
|
27
|
-
'zoom_phone_set_config', 'callpresence_set', 'callpresence_clear',
|
|
27
|
+
'zoom_phone_set_config', 'callpresence_set', 'callpresence_set_groups', 'callpresence_clear',
|
|
28
28
|
'billing_insights_set_preferences', 'billing_insights_dismiss_recommendation',
|
|
29
29
|
'site_sale_create', 'site_sale_update', 'site_sale_end',
|
|
30
30
|
]);
|