@velaro/mcp-server 0.6.58 → 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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server.js +42 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velaro/mcp-server",
3
- "version": "0.6.58",
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
@@ -581,6 +581,12 @@ const TOOLS = [
581
581
  },
582
582
  },
583
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
+
584
590
  // ── Startup migration diagnostics (AdminStartupDiagnostics canary table) ──
585
591
  {
586
592
  name: 'admin_startup_diagnostics',
@@ -2962,6 +2968,21 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
2962
2968
  required: [],
2963
2969
  },
2964
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
+ },
2965
2986
  {
2966
2987
  name: 'signalr_diagnostics',
2967
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.',
@@ -4756,6 +4777,11 @@ async function handleTool(name, args) {
4756
4777
  return JSON.stringify(result, null, 2);
4757
4778
  }
4758
4779
 
4780
+ case 'scraper_verify_token': {
4781
+ const result = await api('GET', 'ScraperJobs/VerifyToken');
4782
+ return JSON.stringify(result, null, 2);
4783
+ }
4784
+
4759
4785
  case 'site_scraper_usage': {
4760
4786
  const result = await api('GET', `ScraperJobs/StaffUsage/${encodeURIComponent(args.siteId)}`);
4761
4787
  return JSON.stringify(result, null, 2);
@@ -7352,6 +7378,22 @@ async function handleTool(name, args) {
7352
7378
  case 'velaro_diagnostic_start':
7353
7379
  return DIAGNOSTIC_RUNBOOK;
7354
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
+
7355
7397
  case 'signalr_diagnostics': {
7356
7398
  // Parse a SignalR connection string into { endpoint, accessKey }
7357
7399
  function parseSignalRConn(conn) {