@velaro/mcp-server 0.6.72 → 0.6.73

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 +54 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velaro/mcp-server",
3
- "version": "0.6.72",
3
+ "version": "0.6.73",
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
@@ -2103,6 +2103,33 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
2103
2103
  required: ['reportType', 'isEnabled'],
2104
2104
  },
2105
2105
  },
2106
+ {
2107
+ name: 'report_subscriptions_list',
2108
+ description: "List the caller's own scheduled report email subscriptions (velaro-messaging /report-subscriptions): id, report type, frequency, active, delivery hour, format (pdf/html), extra recipients.",
2109
+ inputSchema: { type: 'object', properties: {} },
2110
+ },
2111
+ {
2112
+ name: 'report_subscription_update',
2113
+ description: "Update one of the caller's report subscriptions by id. Only passed fields change. Extra recipients must be other users on the same account (max 10); pass an empty string to clear.",
2114
+ inputSchema: {
2115
+ type: 'object',
2116
+ properties: {
2117
+ id: { type: 'number', description: 'Subscription id from report_subscriptions_list' },
2118
+ frequency: { type: 'string', enum: ['daily', 'weekly', 'bi-monthly', 'monthly'] },
2119
+ deliveryHour: { type: 'number', description: 'Site-local hour 0-23 to deliver at or after' },
2120
+ clearDeliveryHour: { type: 'boolean', description: 'Remove the delivery hour (send at the first run)' },
2121
+ format: { type: 'string', enum: ['pdf', 'html'] },
2122
+ extraRecipients: { type: 'string', description: 'Comma-separated emails; empty string clears' },
2123
+ isActive: { type: 'boolean', description: 'false pauses, true resumes' },
2124
+ },
2125
+ required: ['id'],
2126
+ },
2127
+ },
2128
+ {
2129
+ name: 'report_subscription_delete',
2130
+ description: "Delete one of the caller's report subscriptions by id (not by report type).",
2131
+ inputSchema: { type: 'object', properties: { id: { type: 'number', description: 'Subscription id' } }, required: ['id'] },
2132
+ },
2106
2133
  {
2107
2134
  name: 'report_export_status',
2108
2135
  description: 'Check the status of a queued async report export (Reports/ExportStatus/{id}) — pending/processing/completed/failed and the download URL once ready.',
@@ -6901,6 +6928,33 @@ async function handleTool(name, args) {
6901
6928
  : `Failed to save schedule for "${args.reportType}".`;
6902
6929
  }
6903
6930
 
6931
+ case 'report_subscriptions_list': {
6932
+ const rows = await messagingGet('/report-subscriptions');
6933
+ if (!Array.isArray(rows) || !rows.length) return 'No report subscriptions.';
6934
+ return rows.map(x =>
6935
+ `#${x.id} ${x.reportType}: ${x.isActive ? 'active' : 'paused'}, ${x.frequency}, ${x.deliveryHour == null ? 'any hour' : String(x.deliveryHour).padStart(2, '0') + ':00'}, ${x.format ?? 'pdf'}${x.extraRecipients ? ' | also to ' + x.extraRecipients : ''}`
6936
+ ).join('\n');
6937
+ }
6938
+
6939
+ case 'report_subscription_update': {
6940
+ if (!Number.isInteger(args.id)) return 'Error: id is required.';
6941
+ const body = {};
6942
+ for (const k of ['frequency', 'format', 'extraRecipients', 'isActive', 'clearDeliveryHour']) if (args[k] !== undefined) body[k] = args[k];
6943
+ if (args.deliveryHour !== undefined) {
6944
+ if (!Number.isInteger(args.deliveryHour) || args.deliveryHour < 0 || args.deliveryHour > 23) return 'Error: deliveryHour must be an integer 0-23.';
6945
+ body.deliveryHour = args.deliveryHour;
6946
+ }
6947
+ if (!Object.keys(body).length) return 'Error: pass at least one field to update.';
6948
+ await messagingRequest('PUT', `/report-subscriptions/${args.id}`, body);
6949
+ return `Subscription #${args.id} updated.`;
6950
+ }
6951
+
6952
+ case 'report_subscription_delete': {
6953
+ if (!Number.isInteger(args.id)) return 'Error: id is required.';
6954
+ await messagingRequest('DELETE', `/report-subscriptions/${args.id}`);
6955
+ return `Subscription #${args.id} deleted.`;
6956
+ }
6957
+
6904
6958
  case 'report_export_status': {
6905
6959
  if (!args.exportId) return 'Error: exportId is required.';
6906
6960
  const s = await api('GET', `/Reports/ExportStatus/${args.exportId}`);