@velaro/mcp-server 0.6.82 → 0.6.84

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 +137 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velaro/mcp-server",
3
- "version": "0.6.82",
3
+ "version": "0.6.84",
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
@@ -492,6 +492,38 @@ const TOOLS = [
492
492
  description: 'List all KB topics. Call this first to find the topicId needed for creating articles.',
493
493
  inputSchema: { type: 'object', properties: {}, required: [] },
494
494
  },
495
+ {
496
+ name: 'kb_list_categories',
497
+ description: 'List KB categories. Topics hang under a category; use with kb_create_topic.',
498
+ inputSchema: { type: 'object', properties: {}, required: [] },
499
+ },
500
+ {
501
+ name: 'kb_create_category',
502
+ description: 'Create a KB category. Seed the topic tree (category -> topic) BEFORE creating articles when the right topic does not exist.',
503
+ inputSchema: {
504
+ type: 'object',
505
+ properties: {
506
+ name: { type: 'string', description: 'Category name' },
507
+ priority: { type: 'number', description: 'Display priority (lower sorts first)' },
508
+ icon: { type: 'string', description: 'Optional icon name' },
509
+ },
510
+ required: ['name'],
511
+ },
512
+ },
513
+ {
514
+ name: 'kb_create_topic',
515
+ description: 'Create a KB topic under a category and return its id for kb_create_article.',
516
+ inputSchema: {
517
+ type: 'object',
518
+ properties: {
519
+ name: { type: 'string', description: 'Topic name' },
520
+ slug: { type: 'string', description: 'URL slug' },
521
+ categoryId: { type: 'string', description: 'Category id from kb_list_categories' },
522
+ priority: { type: 'number', description: 'Display priority (lower sorts first)' },
523
+ },
524
+ required: ['name', 'slug'],
525
+ },
526
+ },
495
527
  {
496
528
  name: 'kb_search_articles',
497
529
  description: 'Search KB articles. Returns id, title, slug, topicName, hitCount, isPublished, and public URL.',
@@ -3560,6 +3592,51 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
3560
3592
  required: [],
3561
3593
  },
3562
3594
  },
3595
+ {
3596
+ name: 'status_incident_list',
3597
+ description: 'Velaro staff only (SuperAdmin). Lists public status page incidents, including component overrides (IncidentType "Override").',
3598
+ inputSchema: { type: 'object', properties: { filter: { type: 'string', enum: ['active', 'resolved', 'all'], description: 'Default active.' } }, required: [] },
3599
+ },
3600
+ {
3601
+ name: 'status_incident_upsert',
3602
+ description: 'Velaro staff only (SuperAdmin). Creates a public status incident, or updates one when id is given (update replaces all fields, so pass every field to keep). AffectedServices is a comma-separated list of component names (Messaging, Voice & Calls, AI Assistant, Database, API, Integrations, Email Campaigns, Velaro Sign, Velaro Forms, Agent Console, Core API, Chat Engagement) plus optional uptime tokens: "counts-uptime" forces the incident to count against uptime, "no-uptime-impact" forces it not to. Default: only a core chat outage counts.',
3603
+ inputSchema: {
3604
+ type: 'object',
3605
+ properties: {
3606
+ id: { type: 'number', description: 'Existing incident id to update; omit to create.' },
3607
+ title: { type: 'string' }, description: { type: 'string' },
3608
+ status: { type: 'string', description: 'Investigating, Identified, Monitoring, Resolved' },
3609
+ incidentType: { type: 'string', description: 'Incident or Maintenance' },
3610
+ severity: { type: 'string', description: 'Minor or Major' },
3611
+ affectedServices: { type: 'string', description: 'CSV of component names plus optional counts-uptime / no-uptime-impact.' },
3612
+ affectedRegions: { type: 'string' },
3613
+ endTime: { type: 'string', description: 'ISO timestamp' },
3614
+ excludeFromUptime: { type: 'boolean' },
3615
+ isVisibleToCustomers: { type: 'boolean' },
3616
+ },
3617
+ required: [],
3618
+ },
3619
+ },
3620
+ {
3621
+ name: 'status_incident_delete',
3622
+ description: 'Velaro staff only (SuperAdmin). Deletes a status incident, or clears a component override created by status_override_set.',
3623
+ inputSchema: { type: 'object', properties: { id: { type: 'number' } }, required: ['id'] },
3624
+ },
3625
+ {
3626
+ name: 'status_override_set',
3627
+ description: 'Velaro staff only (SuperAdmin). Forces a public status page component to a status until expiresAt. Components: Messaging, Voice & Calls, AI Assistant, Database, API, Integrations, Email Campaigns, Velaro Sign, Velaro Forms, Agent Console, Core API, Chat Engagement. countsAgainstUptime: true adds the counts-uptime token, false adds no-uptime-impact, omit for default (only a core chat outage counts). Clear with status_incident_delete.',
3628
+ inputSchema: {
3629
+ type: 'object',
3630
+ properties: {
3631
+ component: { type: 'string' },
3632
+ status: { type: 'string', enum: ['operational', 'degraded', 'outage', 'maintenance'] },
3633
+ note: { type: 'string' },
3634
+ expiresAt: { type: 'string', description: 'ISO timestamp the override auto-clears.' },
3635
+ countsAgainstUptime: { type: 'boolean' },
3636
+ },
3637
+ required: ['component', 'status'],
3638
+ },
3639
+ },
3563
3640
  {
3564
3641
  name: 'signalr_diagnostics',
3565
3642
  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.',
@@ -4354,6 +4431,16 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
4354
4431
  description: 'Backfill SiteSubscription rows from active Subscription rows in the messaging DB. Skips sites that already have a live SiteSubscription. Run once to seed historical state before reconciliation. Superadmin only.',
4355
4432
  inputSchema: { type: 'object', properties: {} },
4356
4433
  },
4434
+ {
4435
+ name: 'entitlement_backfill_sap_tiers',
4436
+ description: 'Grant the four SAP add-on packages (Sales, Service, Finance, Supply Chain) to existing SAP sites after the package split. Dry run by default; pass apply=true to write. Superadmin only.',
4437
+ inputSchema: { type: 'object', properties: { apply: { type: 'boolean', description: 'true writes the grants; default is a dry run' } } },
4438
+ },
4439
+ {
4440
+ name: 'entitlement_backfill_legacy_write_tiers',
4441
+ description: 'Grant EnableServiceNowWrite / EnableAccelaWrite / EnableQuickBooksWrite to existing sites after the dead OR-gate sweep so write skills are not lost. Dry run by default; pass apply=true to write. Superadmin only.',
4442
+ inputSchema: { type: 'object', properties: { apply: { type: 'boolean', description: 'true writes the grants; default is a dry run' } } },
4443
+ },
4357
4444
  {
4358
4445
  name: 'entitlement_reconcile',
4359
4446
  description: 'Diff Subscription.cs bool flags vs the entitlements API for a site. Returns deltaCount and the specific deltas. Zero deltas = site is ready for entitlements cutover. Superadmin only.',
@@ -5336,6 +5423,22 @@ async function handleTool(name, args) {
5336
5423
  || 'No topics found.';
5337
5424
  }
5338
5425
 
5426
+ case 'kb_list_categories': {
5427
+ const data = await api('GET', '/api/kb/categories');
5428
+ const cats = data?.categories ?? [];
5429
+ return cats.map(c => `[${c.id}] ${c.name} (priority ${c.displayPriority})`).join('\n') || 'No categories found.';
5430
+ }
5431
+
5432
+ case 'kb_create_category': {
5433
+ const c = await api('POST', '/api/kb/categories', { name: args.name, displayPriority: args.priority ?? 0, icon: args.icon });
5434
+ return `Category created: [${c.id}] ${c.name}`;
5435
+ }
5436
+
5437
+ case 'kb_create_topic': {
5438
+ const t = await api('POST', '/api/kb/topics', { name: args.name, slug: args.slug, categoryId: args.categoryId, displayPriority: args.priority ?? 0 });
5439
+ return `Topic created: [${t.id}] ${t.name} (slug ${t.slug})`;
5440
+ }
5441
+
5339
5442
  case 'kb_search_articles': {
5340
5443
  const data = await api('POST', '/api/kb/articles/search', {
5341
5444
  searchTerm: args.searchTerm,
@@ -8485,6 +8588,30 @@ async function handleTool(name, args) {
8485
8588
  return JSON.stringify(data, null, 2);
8486
8589
  }
8487
8590
 
8591
+ case 'status_incident_list': {
8592
+ const rows = await messagingRequest('GET', `/superadmin/status-incidents?filter=${encodeURIComponent(args.filter || 'active')}`);
8593
+ return JSON.stringify(rows, null, 2);
8594
+ }
8595
+
8596
+ case 'status_incident_upsert': {
8597
+ const body = {
8598
+ title: args.title, description: args.description, status: args.status, incidentType: args.incidentType, severity: args.severity,
8599
+ affectedServices: args.affectedServices, affectedRegions: args.affectedRegions, endTime: args.endTime,
8600
+ excludeFromUptime: args.excludeFromUptime ?? false, isVisibleToCustomers: args.isVisibleToCustomers ?? true,
8601
+ };
8602
+ if (args.id) return JSON.stringify(await messagingRequest('PUT', `/superadmin/status-incidents/${Number(args.id)}`, body), null, 2);
8603
+ if (!args.title) throw new Error('title is required when creating an incident.');
8604
+ return JSON.stringify(await messagingRequest('POST', '/superadmin/status-incidents', body), null, 2);
8605
+ }
8606
+
8607
+ case 'status_incident_delete':
8608
+ return JSON.stringify(await messagingRequest('DELETE', `/superadmin/status-incidents/${Number(args.id)}`), null, 2);
8609
+
8610
+ case 'status_override_set':
8611
+ return JSON.stringify(await messagingRequest('POST', '/superadmin/status-overrides', {
8612
+ component: args.component, status: args.status, note: args.note || '', expiresAt: args.expiresAt ?? null, countsAgainstUptime: args.countsAgainstUptime ?? null,
8613
+ }), null, 2);
8614
+
8488
8615
  case 'signalr_diagnostics': {
8489
8616
  // Parse a SignalR connection string into { endpoint, accessKey }
8490
8617
  function parseSignalRConn(conn) {
@@ -9558,6 +9685,16 @@ async function handleTool(name, args) {
9558
9685
  return `✅ Backfill complete: ${result.inserted} inserted, ${result.skipped} already existed, ${result.unknownPlan} skipped (unknown plan).`;
9559
9686
  }
9560
9687
 
9688
+ case 'entitlement_backfill_sap_tiers': {
9689
+ const result = await api('POST', `/Entitlements/admin/backfill-sap-tiers?dryRun=${args.apply ? 'false' : 'true'}`);
9690
+ return `${args.apply ? 'APPLIED' : 'DRY RUN'}: ${JSON.stringify(result, null, 2)}`;
9691
+ }
9692
+
9693
+ case 'entitlement_backfill_legacy_write_tiers': {
9694
+ const result = await api('POST', `/Entitlements/admin/backfill-legacy-write-tiers?dryRun=${args.apply ? 'false' : 'true'}`);
9695
+ return `${args.apply ? 'APPLIED' : 'DRY RUN'}: ${JSON.stringify(result, null, 2)}`;
9696
+ }
9697
+
9561
9698
  case 'entitlement_reconcile': {
9562
9699
  if (!args.siteId) throw new Error('siteId is required');
9563
9700
  const result = await api('GET', `/Entitlements/admin/reconcile/${args.siteId}`);