@velaro/mcp-server 0.6.61 → 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 +28 -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
|
@@ -2535,6 +2535,18 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
|
|
|
2535
2535
|
required: ['siteId'],
|
|
2536
2536
|
},
|
|
2537
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
|
+
},
|
|
2538
2550
|
// -- Staff: schedule adherence by site + role (SupportTools-style: explicit siteId, never auth-derived) --
|
|
2539
2551
|
// Backend: velaro-messaging ReportsController.ScheduleAdherenceDiagnosticsAsync, gated by
|
|
2540
2552
|
// IsSuperAdminAsync(allowSupport: true) -> 403 for non-staff. role=agent REQUIRES agentId (fails closed).
|
|
@@ -7205,6 +7217,22 @@ async function handleTool(name, args) {
|
|
|
7205
7217
|
).join('\n');
|
|
7206
7218
|
}
|
|
7207
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
|
+
|
|
7208
7236
|
case 'support_schedule_adherence': {
|
|
7209
7237
|
if (args.role === 'agent' && !args.agentId) throw new Error('agentId is required when role=agent');
|
|
7210
7238
|
const qs = new URLSearchParams({ detail: 'true' });
|