@velaro/mcp-server 2.0.35 → 2.0.37
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 +22 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velaro/mcp-server",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.37",
|
|
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
|
@@ -310,6 +310,9 @@ const MESSAGING_ADMIN_TOOLS = new Set([
|
|
|
310
310
|
'linked_identity_list', 'linked_identity_unlink',
|
|
311
311
|
'ms_bookings_cancel_appointment', 'ms_bookings_check_availability_range', 'ms_bookings_reschedule_appointment',
|
|
312
312
|
'outlook_calendar_cancel', 'outlook_calendar_get_available_range',
|
|
313
|
+
// NetSuite connection tools: the direct /NetSuite and /Integration/Health endpoints need a signed-in workspace user,
|
|
314
|
+
// which an MCP key is not (they returned 401 missing_site_id / 500). The gateway scopes these to the key's own site.
|
|
315
|
+
'netsuite_list_configs', 'netsuite_m2m_verify', 'integration_health_get',
|
|
313
316
|
]);
|
|
314
317
|
|
|
315
318
|
async function messagingAdminRpc(toolName, args) {
|
|
@@ -7299,15 +7302,19 @@ reply: ${r?.reply}`;
|
|
|
7299
7302
|
const result = await messagingPost(`/Integration/Health/${slug}/reset-circuit`);
|
|
7300
7303
|
return `Circuit reset.\n${formatHealthRow(result)}`;
|
|
7301
7304
|
}
|
|
7302
|
-
|
|
7303
|
-
const
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7305
|
+
// Read path goes through the key-scoped gateway (the direct endpoint needs a workspace user and 500s for a key).
|
|
7306
|
+
const parsed = JSON.parse(await rpc('integration_health_get', args.slug ? { slug: args.slug } : {}));
|
|
7307
|
+
const items = Array.isArray(parsed.results) ? parsed.results : [];
|
|
7308
|
+
const flagged = Array.isArray(parsed.flagged) ? parsed.flagged : [];
|
|
7309
|
+
const flagLines = flagged.map(f => ` FLAGGED ${f.slug} config ${f.configId}: needs reconnect since ${f.needsReconnectAt} - ${f.reason ?? 'no reason recorded'}`);
|
|
7310
|
+
if (items.length === 0 && flagLines.length === 0) {
|
|
7311
|
+
return slug
|
|
7312
|
+
? `No recorded probe for ${args.slug}. Pass run=true to trigger one.`
|
|
7313
|
+
: 'No integration health results recorded yet. The scheduler runs every 15 minutes.';
|
|
7307
7314
|
}
|
|
7308
|
-
const
|
|
7309
|
-
|
|
7310
|
-
return [`${items.length} integration health result(s)\n`, ...
|
|
7315
|
+
const statusName = (n) => ['Healthy', 'Degraded', 'Failed', 'Unknown'][n] ?? String(n);
|
|
7316
|
+
const rows = items.map(r => formatHealthRow({ slug: r.slug, status: statusName(r.status), latencyMs: r.latencyMs, checkedAt: r.checkedAt, detail: r.detail }));
|
|
7317
|
+
return [`${items.length} integration health result(s)\n`, ...rows, ...flagLines].join('\n');
|
|
7311
7318
|
}
|
|
7312
7319
|
|
|
7313
7320
|
case 'page_widget_list': {
|
|
@@ -7823,9 +7830,12 @@ reply: ${r?.reply}`;
|
|
|
7823
7830
|
].filter(Boolean).join('\n');
|
|
7824
7831
|
}
|
|
7825
7832
|
case 'netsuite_list_configs': {
|
|
7826
|
-
const configs = await
|
|
7833
|
+
const { configs } = JSON.parse(await rpc('netsuite_list_configs', {}));
|
|
7827
7834
|
if (!Array.isArray(configs) || !configs.length) return 'No NetSuite configurations found for this site.';
|
|
7828
|
-
return configs.map(c => `[${c.id}] ${c.displayName} (${c.company})`
|
|
7835
|
+
return configs.map(c => `[${c.id}] ${c.displayName} (${c.company}) ${c.authType}` +
|
|
7836
|
+
`${c.needsReconnectAt ? ` | NEEDS RECONNECT since ${c.needsReconnectAt}: ${c.needsReconnectReason ?? ''}` : ''}` +
|
|
7837
|
+
` | clientId ${c.clientIdSaved ? 'saved' : 'MISSING'}, certificate ${c.certificateIdSaved ? 'saved' : 'MISSING'}` +
|
|
7838
|
+
`${c.certificateExpiresAt ? `, expires ${c.certificateExpiresAt}` : ''}`).join('\n');
|
|
7829
7839
|
}
|
|
7830
7840
|
case 'netsuite_cti_get_urls': {
|
|
7831
7841
|
const urls = await messagingGet(`/NetSuite/Integrations/${args.configId}/CtiUrls`);
|
|
@@ -7881,9 +7891,9 @@ reply: ${r?.reply}`;
|
|
|
7881
7891
|
return `Saved for config ${args.configId}. Run netsuite_m2m_verify next.`;
|
|
7882
7892
|
}
|
|
7883
7893
|
case 'netsuite_m2m_verify': {
|
|
7884
|
-
const r = await
|
|
7894
|
+
const r = JSON.parse(await rpc('netsuite_m2m_verify', { configId: args.configId }));
|
|
7885
7895
|
const checks = Array.isArray(r.checks) ? r.checks : [];
|
|
7886
|
-
return checks.map(c => `${c.ok ? 'PASS' : 'FAIL'} ${c.name}${c.ok ? '' : ` - ${c.
|
|
7896
|
+
return checks.map(c => `${c.ok ? 'PASS' : 'FAIL'} ${c.name}${c.ok ? '' : ` - ${c.detail || c.reasonCode || ''}${c.reasonCode ? ` [${c.reasonCode}]` : ''}${c.howToFix ? ` | Fix: ${c.howToFix}` : ''}${c.providerDetail ? ` | NetSuite said: ${c.providerDetail}` : ''}`}`).join('\n') || 'No checks returned.';
|
|
7887
7897
|
}
|
|
7888
7898
|
|
|
7889
7899
|
// ── Microsoft Teams Phone (config CRUD) ───────────────────────────────────
|