@velaro/mcp-server 0.6.57 → 0.6.59
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 +44 -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.59",
|
|
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
|
@@ -170,6 +170,8 @@ const messagingPatch = (path, body) => messagingRequest('PATCH', path, body);
|
|
|
170
170
|
const messagingDel = (path) => messagingRequest('DELETE', path);
|
|
171
171
|
|
|
172
172
|
async function api(method, path, body, base = API_BASE) {
|
|
173
|
+
// Normalize: a path without a leading slash would glue onto the host ("...comScraperJobs/...") and fail as "fetch failed".
|
|
174
|
+
if (!path.startsWith('/')) path = '/' + path;
|
|
173
175
|
const res = await fetch(`${base}${path}`, {
|
|
174
176
|
method,
|
|
175
177
|
headers: { Authorization: authHeader(), 'Content-Type': 'application/json' },
|
|
@@ -579,6 +581,12 @@ const TOOLS = [
|
|
|
579
581
|
},
|
|
580
582
|
},
|
|
581
583
|
|
|
584
|
+
{
|
|
585
|
+
name: 'scraper_verify_token',
|
|
586
|
+
description: "Show the calling site's web-scraper verification header (name + value), the scraper IP, and ready-to-send instructions for allowlisting Velaro's crawler with the customer's web host/WAF. Wraps GET ScraperJobs/VerifyToken. Site comes from auth context, never a parameter.",
|
|
587
|
+
inputSchema: { type: 'object', properties: {} },
|
|
588
|
+
},
|
|
589
|
+
|
|
582
590
|
// ── Startup migration diagnostics (AdminStartupDiagnostics canary table) ──
|
|
583
591
|
{
|
|
584
592
|
name: 'admin_startup_diagnostics',
|
|
@@ -2960,6 +2968,21 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
|
|
|
2960
2968
|
required: [],
|
|
2961
2969
|
},
|
|
2962
2970
|
},
|
|
2971
|
+
{
|
|
2972
|
+
name: 'ai_spend_report',
|
|
2973
|
+
description: 'SuperAdmin AI spend report: logged AI cost for prod and/or staging over a window, by site, model, key source (platform/copilot/byok) and site x feature, with cache-read ratio, QA share, top movers vs the previous period and anomalies. Also records/lists provider reconciliation (console total vs logged). Breaker trips are not in AiCostLogs so are reported as not available.',
|
|
2974
|
+
inputSchema: {
|
|
2975
|
+
type: 'object',
|
|
2976
|
+
properties: {
|
|
2977
|
+
env: { type: 'string', enum: ['both', 'prod', 'staging'], description: 'Environment. Default both.' },
|
|
2978
|
+
days: { type: 'number', description: 'Trailing window in days. Default 7, max 92.' },
|
|
2979
|
+
reconcile_entered_usd: { type: 'number', description: 'If set, records a reconciliation for the window with this provider console total in USD instead of only reading the report.' },
|
|
2980
|
+
provider: { type: 'string', description: 'Provider for reconciliation. Default Anthropic.' },
|
|
2981
|
+
key_bucket: { type: 'string', description: 'Per-key bucket for reconciliation: platform, copilot or byok. Omit for provider total.' },
|
|
2982
|
+
},
|
|
2983
|
+
required: [],
|
|
2984
|
+
},
|
|
2985
|
+
},
|
|
2963
2986
|
{
|
|
2964
2987
|
name: 'signalr_diagnostics',
|
|
2965
2988
|
description: 'Check health, connection counts, hub stats, and recent errors for Velaro\'s Azure SignalR Service instances. Covers both the infra-prod instance (velaro-eastus-prd-signalr, Premium P1) and the legacy prod instance (velaro-prod-us). Use this to diagnose "hub down", connection storms, capacity issues, or capacity saturation alerts.',
|
|
@@ -4754,6 +4777,11 @@ async function handleTool(name, args) {
|
|
|
4754
4777
|
return JSON.stringify(result, null, 2);
|
|
4755
4778
|
}
|
|
4756
4779
|
|
|
4780
|
+
case 'scraper_verify_token': {
|
|
4781
|
+
const result = await api('GET', 'ScraperJobs/VerifyToken');
|
|
4782
|
+
return JSON.stringify(result, null, 2);
|
|
4783
|
+
}
|
|
4784
|
+
|
|
4757
4785
|
case 'site_scraper_usage': {
|
|
4758
4786
|
const result = await api('GET', `ScraperJobs/StaffUsage/${encodeURIComponent(args.siteId)}`);
|
|
4759
4787
|
return JSON.stringify(result, null, 2);
|
|
@@ -7350,6 +7378,22 @@ async function handleTool(name, args) {
|
|
|
7350
7378
|
case 'velaro_diagnostic_start':
|
|
7351
7379
|
return DIAGNOSTIC_RUNBOOK;
|
|
7352
7380
|
|
|
7381
|
+
case 'ai_spend_report': {
|
|
7382
|
+
const days = Math.min(Math.max(Number(args.days) || 7, 1), 92);
|
|
7383
|
+
const to = new Date();
|
|
7384
|
+
const from = new Date(to.getTime() - days * 86400000);
|
|
7385
|
+
const env = args.env || 'both';
|
|
7386
|
+
if (args.reconcile_entered_usd !== undefined && args.reconcile_entered_usd !== null) {
|
|
7387
|
+
const row = await api('POST', '/SuperAdmin/AiSpend/Reconciliations', {
|
|
7388
|
+
periodStartUtc: from.toISOString(), periodEndUtc: to.toISOString(), environment: env,
|
|
7389
|
+
provider: args.provider || 'Anthropic', keyLabel: args.key_bucket || null, enteredUsd: Number(args.reconcile_entered_usd),
|
|
7390
|
+
});
|
|
7391
|
+
return JSON.stringify(row, null, 2);
|
|
7392
|
+
}
|
|
7393
|
+
const data = await api('GET', `/SuperAdmin/AiSpend/Report?env=${env}&from=${encodeURIComponent(from.toISOString())}&to=${encodeURIComponent(to.toISOString())}`);
|
|
7394
|
+
return JSON.stringify(data, null, 2);
|
|
7395
|
+
}
|
|
7396
|
+
|
|
7353
7397
|
case 'signalr_diagnostics': {
|
|
7354
7398
|
// Parse a SignalR connection string into { endpoint, accessKey }
|
|
7355
7399
|
function parseSignalRConn(conn) {
|