@velaro/mcp-server 2.0.44 → 2.0.46
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 +21 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velaro/mcp-server",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.46",
|
|
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
|
@@ -2349,7 +2349,7 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
|
|
|
2349
2349
|
},
|
|
2350
2350
|
{
|
|
2351
2351
|
name: 'report_performance_by_country_get',
|
|
2352
|
-
description: 'Performance by Country report (US vs Canada vs Europe vs Other): engagements (handled, missed, abandoned), performance (first response, handle time, bot containment, transfers, service level) and scores (CSAT, sentiment) per country bucket and per agent. attribution: visitor (visitor GeoIP country, default) | agent (country on the agent profile) | group (the site saved group-to-bucket map).',
|
|
2352
|
+
description: 'Performance by Country report (US vs Canada vs Europe vs Other): engagements (handled, missed, abandoned), performance (first response, handle time, bot containment, transfers, service level) and scores (CSAT, sentiment) per country bucket and per agent, plus a concordance block (how often the visitor country matches the country of the team or agent that handled the chat, with visitor-bucket by handled-bucket engagement counts, a 95% range, a small-sample flag, chats with no detected location, chats not assigned to anyone (excluded from the rate, with a by-visitor-region breakdown), a by-handling-group table, a daily match-rate trend, and a matched-vs-mismatched comparison of response, handle time, transfers and CSAT; use it to answer questions like how many Poland chats went to the US team). attribution: visitor (visitor GeoIP country, default) | agent (country on the agent profile) | group (the site saved group-to-bucket map).',
|
|
2353
2353
|
inputSchema: {
|
|
2354
2354
|
type: 'object',
|
|
2355
2355
|
properties: {
|
|
@@ -6810,7 +6810,26 @@ reply: ${r?.reply}`;
|
|
|
6810
6810
|
const f = (v, s = '') => (v == null ? '-' : `${v}${s}`);
|
|
6811
6811
|
const row = x => `${(x.agentName || x.bucket).padEnd(24)} eng ${x.engagements} | handled ${x.handled} | missed ${x.missed} | abandoned ${x.abandoned} | bot containment ${f(x.botContainmentPct, '%')} | transfers ${x.transfersToAgent} | 1st resp ${f(x.avgFirstResponseSeconds, 's')} | handle ${f(x.avgHandleTimeMinutes, 'm')} | SL ${f(x.serviceLevelPct, '%')} | CSAT ${f(x.csatAvg)} (${x.csatCount}) | positive ${f(x.sentimentPositivePct, '%')}`;
|
|
6812
6812
|
return [`=== Performance by Country (${r.attribution}) ===`, ...(r.buckets || []).map(row), '', 'By agent:',
|
|
6813
|
-
...((r.agents || []).map(a => row(a) + (a.agentCountryNotSet ? ' [agent country not set]' : '')))
|
|
6813
|
+
...((r.agents || []).map(a => row(a) + (a.agentCountryNotSet ? ' [agent country not set]' : ''))),
|
|
6814
|
+
...(r.concordance ? (() => {
|
|
6815
|
+
const c = r.concordance;
|
|
6816
|
+
const who = c.handledBasis === 'agentCountry' ? 'agent' : 'team';
|
|
6817
|
+
// Rates may be 0-1 fractions or 0-100 percents; the exact counts decide. Null rate is a dash, never an estimate.
|
|
6818
|
+
const frac = c.matchRate != null && c.totalEngagements ? Math.abs(c.matchRate - c.matchedEngagements / c.totalEngagements) < 0.005 : (c.matchRate != null && c.matchRate <= 1);
|
|
6819
|
+
const p = v => (v == null ? '-' : `${Math.round((frac ? v * 100 : v) * 10) / 10}%`);
|
|
6820
|
+
const rate = c.matchRate == null || !c.totalEngagements ? '-' : p(c.matchRate);
|
|
6821
|
+
const range = c.matchRateCi && rate !== '-' ? ` (95% range ${p(c.matchRateCi.low)} to ${p(c.matchRateCi.high)})` : '';
|
|
6822
|
+
const side = (n, s) => (s ? ` ${n}: chats ${f(s.engagements)} | 1st resp ${f(s.avgFirstResponseSeconds, 's')} | handle ${f(s.avgHandleTimeSeconds, 's')} | transfers ${f(s.transfers)} | CSAT ${f(s.csatAvg)} (${s.csatCount ?? 0})` : null);
|
|
6823
|
+
return ['', `Concordance (visitor country vs ${who} country): ${rate} matched${range} (${c.matchedEngagements} of ${c.totalEngagements})`,
|
|
6824
|
+
...(c.lowSample ? [' Small sample, treat as a rough guide.'] : []),
|
|
6825
|
+
...(c.unassigned > 0 ? [` Not assigned to anyone: ${c.unassigned} chats (not counted).${Array.isArray(c.unassignedByVisitorBucket) && c.unassignedByVisitorBucket.some(u => u.engagements > 0) ? ` By visitor region: ${c.unassignedByVisitorBucket.filter(u => u.engagements > 0).map(u => `${u.visitorBucket} ${u.engagements}`).join(', ')}.` : ''}`] : []),
|
|
6826
|
+
...(c.unknownLocation > 0 ? [` No location detected: ${c.unknownLocation} chats (not counted).`] : []),
|
|
6827
|
+
...(c.rows || []).map(x => ` ${x.visitorBucket} visitors -> ${x.handledBucket} ${who}: ${x.engagements}`),
|
|
6828
|
+
...(Array.isArray(c.byHandledGroup) && c.byHandledGroup.length ? ['', 'By handling group:', ...c.byHandledGroup.map(g => ` ${g.group} (${g.bucket || '-'}): chats ${g.total} | matched ${g.matched} | rate ${p(g.matchRate)}${g.ci ? ` | range ${p(g.ci.low)} to ${p(g.ci.high)}` : ''}`)] : []),
|
|
6829
|
+
...(Array.isArray(c.trend) && c.trend.length ? ['', 'Daily match rate:', ...c.trend.map(d => ` ${String(d.date).slice(0, 10)}: ${p(d.matchRate)} (${d.matched} of ${d.total})`)] : []),
|
|
6830
|
+
...(c.comparison ? ['', 'Matched vs mismatched chats:', side('matched', c.comparison.matched), side('mismatched', c.comparison.mismatched)].filter(x => x !== null) : []),
|
|
6831
|
+
'', 'Concordance JSON: ' + JSON.stringify(c)];
|
|
6832
|
+
})() : [])].join('\n');
|
|
6814
6833
|
}
|
|
6815
6834
|
|
|
6816
6835
|
case 'report_performance_by_country_set_groups': {
|