@velaro/mcp-server 0.6.60 → 0.6.62
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 +112 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velaro/mcp-server",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.62",
|
|
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
|
@@ -2071,6 +2071,39 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
|
|
|
2071
2071
|
},
|
|
2072
2072
|
},
|
|
2073
2073
|
|
|
2074
|
+
// -- Email delivery visibility (Velaro staff only; velaro-messaging SuperAdmin) --
|
|
2075
|
+
{
|
|
2076
|
+
name: 'email_queue_status',
|
|
2077
|
+
description: 'Velaro staff only. Live ACS email send-queue health: queued/parked counts, oldest open item age, cooldown state, retries, 429s, sends in the last hour and a drain-time estimate. Aggregates only, no message bodies. Wraps GET SuperAdmin/email-delivery/status on velaro-messaging.',
|
|
2078
|
+
inputSchema: {
|
|
2079
|
+
type: 'object',
|
|
2080
|
+
properties: { siteId: { type: 'number', description: 'Optional: limit to one site ID' } },
|
|
2081
|
+
required: [],
|
|
2082
|
+
},
|
|
2083
|
+
},
|
|
2084
|
+
{
|
|
2085
|
+
name: 'email_delivery_stats',
|
|
2086
|
+
description: 'Velaro staff only. Email throughput per day and per hour, retry counts, priority/tag breakdown, attempts histogram, and ACS-side delivery outcomes (succeeded/failed/pending). Wraps GET SuperAdmin/email-delivery/stats on velaro-messaging.',
|
|
2087
|
+
inputSchema: {
|
|
2088
|
+
type: 'object',
|
|
2089
|
+
properties: {
|
|
2090
|
+
siteId: { type: 'number', description: 'Optional: limit to one site ID' },
|
|
2091
|
+
days: { type: 'number', description: 'Daily window, 1-30 (default 30; ACS-side capped at 14)' },
|
|
2092
|
+
hours: { type: 'number', description: 'Hourly window, 1-168 (default 48)' },
|
|
2093
|
+
},
|
|
2094
|
+
required: [],
|
|
2095
|
+
},
|
|
2096
|
+
},
|
|
2097
|
+
{
|
|
2098
|
+
name: 'email_queue_replay',
|
|
2099
|
+
description: 'Velaro staff ADMIN ONLY. Replays the queued ACS email backlog now. dryRun defaults to TRUE and only reports what a replay would send; pass dryRun=false to clear the cooldown and drain the queue immediately. Wraps POST SuperAdmin/email-delivery/replay on velaro-messaging.',
|
|
2100
|
+
inputSchema: {
|
|
2101
|
+
type: 'object',
|
|
2102
|
+
properties: { dryRun: { type: 'boolean', description: 'Default true. Set false to actually replay.' } },
|
|
2103
|
+
required: [],
|
|
2104
|
+
},
|
|
2105
|
+
},
|
|
2106
|
+
|
|
2074
2107
|
// ── Unified Outbound Activity (Klaviyo-parity Gap 6) ──────────────────────
|
|
2075
2108
|
{
|
|
2076
2109
|
name: 'outbound_activity_list',
|
|
@@ -2502,6 +2535,38 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
|
|
|
2502
2535
|
required: ['siteId'],
|
|
2503
2536
|
},
|
|
2504
2537
|
},
|
|
2538
|
+
{
|
|
2539
|
+
name: 'experience_impact_report',
|
|
2540
|
+
description: 'Experience Impact report: shows how staffing and schedule adherence affect customer experience. Returns a 0-100 experience index (adherence 25, service level 30, missed-chat rate 20, CSAT 25), per-interval staffing vs chat demand (scheduled vs actual agents, missed chats, wait time, CSAT), per-agent rows, and plain-language insights. Scoped to the caller site.',
|
|
2541
|
+
inputSchema: {
|
|
2542
|
+
type: 'object',
|
|
2543
|
+
properties: {
|
|
2544
|
+
from: { type: 'string', description: 'yyyy-MM-dd start (default: 7 days ago).' },
|
|
2545
|
+
to: { type: 'string', description: 'yyyy-MM-dd end (default: today).' },
|
|
2546
|
+
teamId: { type: 'number', description: 'Optional team ID to narrow the report.' },
|
|
2547
|
+
},
|
|
2548
|
+
},
|
|
2549
|
+
},
|
|
2550
|
+
// -- Staff: schedule adherence by site + role (SupportTools-style: explicit siteId, never auth-derived) --
|
|
2551
|
+
// Backend: velaro-messaging ReportsController.ScheduleAdherenceDiagnosticsAsync, gated by
|
|
2552
|
+
// IsSuperAdminAsync(allowSupport: true) -> 403 for non-staff. role=agent REQUIRES agentId (fails closed).
|
|
2553
|
+
{
|
|
2554
|
+
name: 'support_schedule_adherence',
|
|
2555
|
+
description: 'Velaro staff only. Schedule-adherence overview (totals + per-agent metrics), per-day breakdown (incl. nonAvailableMinutes), current status (intraday) and range-end-day timeline for a site, scoped as a manager (all agents) or as one agent (own row only) -- the exact scope the customer UI applies. Use for schedule-adherence QA instead of a browser pass.',
|
|
2556
|
+
inputSchema: {
|
|
2557
|
+
type: 'object',
|
|
2558
|
+
properties: {
|
|
2559
|
+
siteId: { type: 'number', description: 'Target customer site ID' },
|
|
2560
|
+
role: { type: 'string', enum: ['manager', 'agent'], description: 'Scope to apply. Default manager.' },
|
|
2561
|
+
agentId: { type: 'number', description: 'WorkspaceUser id; required when role=agent.' },
|
|
2562
|
+
start: { type: 'string', description: 'yyyy-MM-dd (default: 6 days ago, site tz).' },
|
|
2563
|
+
end: { type: 'string', description: 'yyyy-MM-dd (default: today, site tz).' },
|
|
2564
|
+
tz: { type: 'string', description: 'IANA time zone override.' },
|
|
2565
|
+
},
|
|
2566
|
+
required: ['siteId'],
|
|
2567
|
+
},
|
|
2568
|
+
},
|
|
2569
|
+
|
|
2505
2570
|
{
|
|
2506
2571
|
name: 'support_site_agents',
|
|
2507
2572
|
description: 'List all agents/admins on a customer site with their roles, active status, and last login date. Velaro staff only.',
|
|
@@ -6692,6 +6757,30 @@ async function handleTool(name, args) {
|
|
|
6692
6757
|
return lines.join('\n');
|
|
6693
6758
|
}
|
|
6694
6759
|
|
|
6760
|
+
// -- Email delivery visibility (Velaro staff only) --
|
|
6761
|
+
case 'email_queue_status': {
|
|
6762
|
+
const q = args.siteId != null ? `?siteId=${encodeURIComponent(args.siteId)}` : '';
|
|
6763
|
+
const r = await messagingGet(`/SuperAdmin/email-delivery/status${q}`);
|
|
6764
|
+
return JSON.stringify(r, null, 2);
|
|
6765
|
+
}
|
|
6766
|
+
|
|
6767
|
+
case 'email_delivery_stats': {
|
|
6768
|
+
const params = new URLSearchParams();
|
|
6769
|
+
if (args.siteId != null) params.set('siteId', String(args.siteId));
|
|
6770
|
+
if (args.days != null) params.set('days', String(args.days));
|
|
6771
|
+
if (args.hours != null) params.set('hours', String(args.hours));
|
|
6772
|
+
const qs = params.toString();
|
|
6773
|
+
const r = await messagingGet(`/SuperAdmin/email-delivery/stats${qs ? '?' + qs : ''}`);
|
|
6774
|
+
return JSON.stringify(r, null, 2);
|
|
6775
|
+
}
|
|
6776
|
+
|
|
6777
|
+
case 'email_queue_replay': {
|
|
6778
|
+
// Safe by default: anything other than an explicit boolean false stays a dry run.
|
|
6779
|
+
const dryRun = args.dryRun !== false;
|
|
6780
|
+
const r = await messagingPost(`/SuperAdmin/email-delivery/replay?dryRun=${dryRun}`);
|
|
6781
|
+
return JSON.stringify(r, null, 2);
|
|
6782
|
+
}
|
|
6783
|
+
|
|
6695
6784
|
// ── Unified Outbound Activity ──────────────────────────────────────────
|
|
6696
6785
|
case 'outbound_activity_list':
|
|
6697
6786
|
case 'outbound_activity_for_contact': {
|
|
@@ -7128,6 +7217,29 @@ async function handleTool(name, args) {
|
|
|
7128
7217
|
).join('\n');
|
|
7129
7218
|
}
|
|
7130
7219
|
|
|
7220
|
+
case 'experience_impact_report': {
|
|
7221
|
+
const qs = new URLSearchParams();
|
|
7222
|
+
for (const k of ['from', 'to', 'teamId']) if (args[k] != null && args[k] !== '') qs.set(k, String(args[k]));
|
|
7223
|
+
const r = await messagingGet(`/Reports/experience-impact${qs.toString() ? '?' + qs : ''}`);
|
|
7224
|
+
const sm = r.summary ?? {};
|
|
7225
|
+
const lines = [
|
|
7226
|
+
`=== Experience Impact ${r.range?.from ?? ''}..${r.range?.to ?? ''} ===`,
|
|
7227
|
+
`Experience index: ${sm.experienceIndex ?? '-'} / 100`,
|
|
7228
|
+
`Adherence ${sm.adherencePct ?? '-'}% | Service level ${sm.serviceLevelPct ?? '-'}% | Missed chats ${sm.missedChats ?? '-'} | Avg wait ${sm.avgWaitSec ?? '-'}s | CSAT ${sm.csatAvg ?? '-'} (${sm.csatResponses ?? 0} responses)`,
|
|
7229
|
+
...(r.insights ?? []).map(i => ` [${i.severity}] ${i.text}`),
|
|
7230
|
+
`Intervals: ${(r.intervals ?? []).length} | Agents: ${(r.agents ?? []).length}`,
|
|
7231
|
+
];
|
|
7232
|
+
for (const a of r.agents ?? []) lines.push(` ${a.name}: index ${a.experienceIndex} | adherence ${a.adherencePct}% | CSAT ${a.csatAvg ?? '-'} | handled ${a.handled}`);
|
|
7233
|
+
return lines.join('\n');
|
|
7234
|
+
}
|
|
7235
|
+
|
|
7236
|
+
case 'support_schedule_adherence': {
|
|
7237
|
+
if (args.role === 'agent' && !args.agentId) throw new Error('agentId is required when role=agent');
|
|
7238
|
+
const qs = new URLSearchParams({ detail: 'true' });
|
|
7239
|
+
for (const k of ['role', 'agentId', 'start', 'end', 'tz']) if (args[k] != null && args[k] !== '') qs.set(k, String(args[k]));
|
|
7240
|
+
return JSON.stringify(await messagingGet(`/Reports/sites/${encodeURIComponent(args.siteId)}/schedule-adherence-diagnostics?${qs}`), null, 2);
|
|
7241
|
+
}
|
|
7242
|
+
|
|
7131
7243
|
case 'support_site_agents': {
|
|
7132
7244
|
const agents = await api('GET', `/SupportTools/sites/${args.siteId}/agents`);
|
|
7133
7245
|
if (!Array.isArray(agents) || !agents.length) return `No agents found for site ${args.siteId}.`;
|