@velaro/mcp-server 0.6.60 → 0.6.61
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 +84 -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.61",
|
|
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,26 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
|
|
|
2502
2535
|
required: ['siteId'],
|
|
2503
2536
|
},
|
|
2504
2537
|
},
|
|
2538
|
+
// -- Staff: schedule adherence by site + role (SupportTools-style: explicit siteId, never auth-derived) --
|
|
2539
|
+
// Backend: velaro-messaging ReportsController.ScheduleAdherenceDiagnosticsAsync, gated by
|
|
2540
|
+
// IsSuperAdminAsync(allowSupport: true) -> 403 for non-staff. role=agent REQUIRES agentId (fails closed).
|
|
2541
|
+
{
|
|
2542
|
+
name: 'support_schedule_adherence',
|
|
2543
|
+
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.',
|
|
2544
|
+
inputSchema: {
|
|
2545
|
+
type: 'object',
|
|
2546
|
+
properties: {
|
|
2547
|
+
siteId: { type: 'number', description: 'Target customer site ID' },
|
|
2548
|
+
role: { type: 'string', enum: ['manager', 'agent'], description: 'Scope to apply. Default manager.' },
|
|
2549
|
+
agentId: { type: 'number', description: 'WorkspaceUser id; required when role=agent.' },
|
|
2550
|
+
start: { type: 'string', description: 'yyyy-MM-dd (default: 6 days ago, site tz).' },
|
|
2551
|
+
end: { type: 'string', description: 'yyyy-MM-dd (default: today, site tz).' },
|
|
2552
|
+
tz: { type: 'string', description: 'IANA time zone override.' },
|
|
2553
|
+
},
|
|
2554
|
+
required: ['siteId'],
|
|
2555
|
+
},
|
|
2556
|
+
},
|
|
2557
|
+
|
|
2505
2558
|
{
|
|
2506
2559
|
name: 'support_site_agents',
|
|
2507
2560
|
description: 'List all agents/admins on a customer site with their roles, active status, and last login date. Velaro staff only.',
|
|
@@ -6692,6 +6745,30 @@ async function handleTool(name, args) {
|
|
|
6692
6745
|
return lines.join('\n');
|
|
6693
6746
|
}
|
|
6694
6747
|
|
|
6748
|
+
// -- Email delivery visibility (Velaro staff only) --
|
|
6749
|
+
case 'email_queue_status': {
|
|
6750
|
+
const q = args.siteId != null ? `?siteId=${encodeURIComponent(args.siteId)}` : '';
|
|
6751
|
+
const r = await messagingGet(`/SuperAdmin/email-delivery/status${q}`);
|
|
6752
|
+
return JSON.stringify(r, null, 2);
|
|
6753
|
+
}
|
|
6754
|
+
|
|
6755
|
+
case 'email_delivery_stats': {
|
|
6756
|
+
const params = new URLSearchParams();
|
|
6757
|
+
if (args.siteId != null) params.set('siteId', String(args.siteId));
|
|
6758
|
+
if (args.days != null) params.set('days', String(args.days));
|
|
6759
|
+
if (args.hours != null) params.set('hours', String(args.hours));
|
|
6760
|
+
const qs = params.toString();
|
|
6761
|
+
const r = await messagingGet(`/SuperAdmin/email-delivery/stats${qs ? '?' + qs : ''}`);
|
|
6762
|
+
return JSON.stringify(r, null, 2);
|
|
6763
|
+
}
|
|
6764
|
+
|
|
6765
|
+
case 'email_queue_replay': {
|
|
6766
|
+
// Safe by default: anything other than an explicit boolean false stays a dry run.
|
|
6767
|
+
const dryRun = args.dryRun !== false;
|
|
6768
|
+
const r = await messagingPost(`/SuperAdmin/email-delivery/replay?dryRun=${dryRun}`);
|
|
6769
|
+
return JSON.stringify(r, null, 2);
|
|
6770
|
+
}
|
|
6771
|
+
|
|
6695
6772
|
// ── Unified Outbound Activity ──────────────────────────────────────────
|
|
6696
6773
|
case 'outbound_activity_list':
|
|
6697
6774
|
case 'outbound_activity_for_contact': {
|
|
@@ -7128,6 +7205,13 @@ async function handleTool(name, args) {
|
|
|
7128
7205
|
).join('\n');
|
|
7129
7206
|
}
|
|
7130
7207
|
|
|
7208
|
+
case 'support_schedule_adherence': {
|
|
7209
|
+
if (args.role === 'agent' && !args.agentId) throw new Error('agentId is required when role=agent');
|
|
7210
|
+
const qs = new URLSearchParams({ detail: 'true' });
|
|
7211
|
+
for (const k of ['role', 'agentId', 'start', 'end', 'tz']) if (args[k] != null && args[k] !== '') qs.set(k, String(args[k]));
|
|
7212
|
+
return JSON.stringify(await messagingGet(`/Reports/sites/${encodeURIComponent(args.siteId)}/schedule-adherence-diagnostics?${qs}`), null, 2);
|
|
7213
|
+
}
|
|
7214
|
+
|
|
7131
7215
|
case 'support_site_agents': {
|
|
7132
7216
|
const agents = await api('GET', `/SupportTools/sites/${args.siteId}/agents`);
|
|
7133
7217
|
if (!Array.isArray(agents) || !agents.length) return `No agents found for site ${args.siteId}.`;
|