@velaro/mcp-server 0.6.14 → 0.6.16
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 +148 -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.16",
|
|
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
|
@@ -1144,6 +1144,25 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
|
|
|
1144
1144
|
required: ['id'],
|
|
1145
1145
|
},
|
|
1146
1146
|
},
|
|
1147
|
+
{
|
|
1148
|
+
name: 'contacts_timeline',
|
|
1149
|
+
description: "Merged chronological activity feed for a contact in Velaro's native Contacts CRM (notes, campaign emails sent, broadcast emails received) -- server/Velaro.Admin/Controllers/ContactsController.cs.",
|
|
1150
|
+
inputSchema: {
|
|
1151
|
+
type: 'object',
|
|
1152
|
+
properties: { id: { type: 'number', description: 'Contact ID' } },
|
|
1153
|
+
required: ['id'],
|
|
1154
|
+
},
|
|
1155
|
+
},
|
|
1156
|
+
{
|
|
1157
|
+
name: 'contacts_tags_list',
|
|
1158
|
+
description: "List all contact tags defined for this site, in Velaro's native Contacts CRM.",
|
|
1159
|
+
inputSchema: { type: 'object', properties: {} },
|
|
1160
|
+
},
|
|
1161
|
+
{
|
|
1162
|
+
name: 'contactlist_get',
|
|
1163
|
+
description: 'List all marketing contact lists for this site, with member counts and sync status (server/Velaro.Admin/Controllers/ContactListController.cs).',
|
|
1164
|
+
inputSchema: { type: 'object', properties: {} },
|
|
1165
|
+
},
|
|
1147
1166
|
|
|
1148
1167
|
// ── Agents ────────────────────────────────────────────────────────────────
|
|
1149
1168
|
{
|
|
@@ -1593,6 +1612,56 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
|
|
|
1593
1612
|
},
|
|
1594
1613
|
},
|
|
1595
1614
|
},
|
|
1615
|
+
{
|
|
1616
|
+
name: 'report_schedules_get',
|
|
1617
|
+
description: 'List the recurring report email schedules configured for this site (Reports/Schedules) — report type, frequency, recipients, enabled state.',
|
|
1618
|
+
inputSchema: { type: 'object', properties: {} },
|
|
1619
|
+
},
|
|
1620
|
+
{
|
|
1621
|
+
name: 'report_schedule_upsert',
|
|
1622
|
+
description: 'Create or update the recurring email schedule for one report type. Creates if it does not exist yet, otherwise updates in place.',
|
|
1623
|
+
inputSchema: {
|
|
1624
|
+
type: 'object',
|
|
1625
|
+
properties: {
|
|
1626
|
+
reportType: { type: 'string', description: 'Report type key, e.g. account-overview | agent-utilization | compliance' },
|
|
1627
|
+
frequency: { type: 'string', enum: ['daily', 'weekly', 'bi-monthly', 'monthly'], description: 'How often to send. Default on create: monthly' },
|
|
1628
|
+
recipientEmails: { type: 'string', description: 'Comma-separated recipient email addresses' },
|
|
1629
|
+
isEnabled: { type: 'boolean', description: 'Enable or disable this schedule' },
|
|
1630
|
+
},
|
|
1631
|
+
required: ['reportType', 'isEnabled'],
|
|
1632
|
+
},
|
|
1633
|
+
},
|
|
1634
|
+
{
|
|
1635
|
+
name: 'report_export_status',
|
|
1636
|
+
description: 'Check the status of a queued async report export (Reports/ExportStatus/{id}) — pending/processing/completed/failed and the download URL once ready.',
|
|
1637
|
+
inputSchema: {
|
|
1638
|
+
type: 'object',
|
|
1639
|
+
properties: {
|
|
1640
|
+
exportId: { type: 'number', description: 'Export job ID returned by report_export_start' },
|
|
1641
|
+
},
|
|
1642
|
+
required: ['exportId'],
|
|
1643
|
+
},
|
|
1644
|
+
},
|
|
1645
|
+
{
|
|
1646
|
+
name: 'report_my_exports',
|
|
1647
|
+
description: 'List recent async report export jobs for this site (last 30 days, most recent first).',
|
|
1648
|
+
inputSchema: { type: 'object', properties: {} },
|
|
1649
|
+
},
|
|
1650
|
+
{
|
|
1651
|
+
name: 'report_export_start',
|
|
1652
|
+
description: 'Queue a large/long-range report export as a background job. A time-limited download link is emailed to the requester once ready; poll report_export_status to check progress.',
|
|
1653
|
+
inputSchema: {
|
|
1654
|
+
type: 'object',
|
|
1655
|
+
properties: {
|
|
1656
|
+
startDate: { type: 'string', description: 'ISO 8601 start date' },
|
|
1657
|
+
endDate: { type: 'string', description: 'ISO 8601 end date' },
|
|
1658
|
+
reportType: { type: 'string', description: 'account-overview | agent-utilization | compliance (default account-overview)' },
|
|
1659
|
+
format: { type: 'string', enum: ['xlsx', 'csv'], description: 'Output format. Default: xlsx' },
|
|
1660
|
+
recipientEmail: { type: 'string', description: 'Override recipient email (default: the authenticated user)' },
|
|
1661
|
+
},
|
|
1662
|
+
required: ['startDate', 'endDate'],
|
|
1663
|
+
},
|
|
1664
|
+
},
|
|
1596
1665
|
{
|
|
1597
1666
|
name: 'report_campaign_performance',
|
|
1598
1667
|
description: 'Email campaign performance: open rate, click rate, delivery rate, complaint rate per campaign + aggregate KPIs.',
|
|
@@ -4600,6 +4669,29 @@ async function handleTool(name, args) {
|
|
|
4600
4669
|
case 'contact_get':
|
|
4601
4670
|
return await rpc('contact_get', args);
|
|
4602
4671
|
|
|
4672
|
+
// GET Contacts/{id}/Timeline -> ContactsController.GetTimeline
|
|
4673
|
+
case 'contacts_timeline': {
|
|
4674
|
+
if (!args.id) return 'Error: id is required.';
|
|
4675
|
+
const events = await api('GET', `/Contacts/${args.id}/Timeline`);
|
|
4676
|
+
const list = Array.isArray(events) ? events : (events?.items ?? []);
|
|
4677
|
+
if (!list.length) return 'No timeline activity for this contact.';
|
|
4678
|
+
return list.map(e => `[${e.timestamp ?? e.date ?? '—'}] ${e.type ?? e.eventType ?? 'event'}: ${e.summary ?? e.description ?? ''}`).join('\n');
|
|
4679
|
+
}
|
|
4680
|
+
|
|
4681
|
+
// GET Contacts/Tags -> ContactsController.GetTags
|
|
4682
|
+
case 'contacts_tags_list': {
|
|
4683
|
+
const tags = await api('GET', '/Contacts/Tags');
|
|
4684
|
+
if (!tags.length) return 'No contact tags defined for this site.';
|
|
4685
|
+
return tags.map(t => `#${t.id} ${t.name} (${t.color})`).join('\n');
|
|
4686
|
+
}
|
|
4687
|
+
|
|
4688
|
+
// GET ContactLists -> ContactListController.GetLists
|
|
4689
|
+
case 'contactlist_get': {
|
|
4690
|
+
const lists = await api('GET', '/ContactLists');
|
|
4691
|
+
if (!lists.length) return 'No contact lists yet.';
|
|
4692
|
+
return lists.map(l => `#${l.id} ${l.name} — ${l.memberCount} member(s)${l.syncSource ? ` [${l.syncSource}]` : ''}`).join('\n');
|
|
4693
|
+
}
|
|
4694
|
+
|
|
4603
4695
|
// ── Agents ─────────────────────────────────────────────────────────────
|
|
4604
4696
|
case 'agent_list':
|
|
4605
4697
|
return await rpc('agent_list', args);
|
|
@@ -5320,6 +5412,62 @@ async function handleTool(name, args) {
|
|
|
5320
5412
|
return lines.join('\n');
|
|
5321
5413
|
}
|
|
5322
5414
|
|
|
5415
|
+
case 'report_schedules_get': {
|
|
5416
|
+
const rows = await api('GET', '/Reports/Schedules');
|
|
5417
|
+
if (!Array.isArray(rows) || !rows.length) return 'No scheduled reports configured for this site.';
|
|
5418
|
+
return rows.map(s =>
|
|
5419
|
+
`${s.reportType}: ${s.isEnabled ? 'enabled' : 'disabled'}, ${s.frequency} -> ${s.recipientEmails || '(no recipients)'}`
|
|
5420
|
+
).join('\n');
|
|
5421
|
+
}
|
|
5422
|
+
|
|
5423
|
+
case 'report_schedule_upsert': {
|
|
5424
|
+
if (!args.reportType) return 'Error: reportType is required.';
|
|
5425
|
+
if (typeof args.isEnabled !== 'boolean') return 'Error: isEnabled is required.';
|
|
5426
|
+
const result = await api('PUT', '/Reports/Schedules', {
|
|
5427
|
+
reportType: args.reportType,
|
|
5428
|
+
frequency: args.frequency,
|
|
5429
|
+
recipientEmails: args.recipientEmails,
|
|
5430
|
+
isEnabled: args.isEnabled,
|
|
5431
|
+
});
|
|
5432
|
+
return result?.saved
|
|
5433
|
+
? `✅ Schedule saved for report type "${args.reportType}".`
|
|
5434
|
+
: `Failed to save schedule for "${args.reportType}".`;
|
|
5435
|
+
}
|
|
5436
|
+
|
|
5437
|
+
case 'report_export_status': {
|
|
5438
|
+
if (!args.exportId) return 'Error: exportId is required.';
|
|
5439
|
+
const s = await api('GET', `/Reports/ExportStatus/${args.exportId}`);
|
|
5440
|
+
if (s?.error) return `Export #${args.exportId}: ${s.error}`;
|
|
5441
|
+
return [
|
|
5442
|
+
`Export #${s.id}: ${s.status}`,
|
|
5443
|
+
`Type: ${s.reportType} (${s.format})`,
|
|
5444
|
+
`Range: ${s.startDate} -> ${s.endDate}`,
|
|
5445
|
+
s.downloadUrl ? `Download: ${s.downloadUrl}` : 'Download link not ready yet.',
|
|
5446
|
+
s.errorMessage ? `Error: ${s.errorMessage}` : null,
|
|
5447
|
+
].filter(Boolean).join('\n');
|
|
5448
|
+
}
|
|
5449
|
+
|
|
5450
|
+
case 'report_my_exports': {
|
|
5451
|
+
const rows = await api('GET', '/Reports/MyExports');
|
|
5452
|
+
if (!Array.isArray(rows) || !rows.length) return 'No report exports in the last 30 days.';
|
|
5453
|
+
return rows.map(e =>
|
|
5454
|
+
`#${e.id} ${e.status} ${e.reportType} (${e.startDate} -> ${e.endDate})${e.isExpired ? ' [expired]' : ''}`
|
|
5455
|
+
).join('\n');
|
|
5456
|
+
}
|
|
5457
|
+
|
|
5458
|
+
case 'report_export_start': {
|
|
5459
|
+
if (!args.startDate || !args.endDate) return 'Error: startDate and endDate are required.';
|
|
5460
|
+
const result = await api('POST', '/Reports/ExportAsync', {
|
|
5461
|
+
startDate: args.startDate,
|
|
5462
|
+
endDate: args.endDate,
|
|
5463
|
+
reportType: args.reportType,
|
|
5464
|
+
format: args.format,
|
|
5465
|
+
recipientEmail: args.recipientEmail,
|
|
5466
|
+
});
|
|
5467
|
+
if (result?.error) return `Failed to queue export: ${result.error}`;
|
|
5468
|
+
return `Export queued (id ${result.exportId}). ${result.message}`;
|
|
5469
|
+
}
|
|
5470
|
+
|
|
5323
5471
|
case 'call_center_report': {
|
|
5324
5472
|
const qs = [
|
|
5325
5473
|
args.startDate ? `start=${args.startDate}` : '',
|