@velaro/mcp-server 2.0.84 → 2.0.86
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velaro/mcp-server",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.86",
|
|
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": {
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
// MCP parity for `velaro sales` (cli/lib/commands/sales.js). Backend: velaro-admin SalesAutomationController
|
|
2
|
+
// (routes SalesAutomation/...). Revenue Suite package: sales sequences and speed-to-lead on the native Velaro CRM.
|
|
3
|
+
// Site from the credential only; no tool takes a site id. Writes are upserts.
|
|
4
|
+
|
|
5
|
+
const pid = (v) => encodeURIComponent(String(v));
|
|
6
|
+
const int = (v) => Number(v);
|
|
7
|
+
|
|
8
|
+
export const tools = [
|
|
9
|
+
{
|
|
10
|
+
name: 'sales_status',
|
|
11
|
+
description: 'Which Revenue Suite features (sales sequences, speed to lead, deal automation) are on for the signed-in account.',
|
|
12
|
+
inputSchema: { type: 'object', properties: {} },
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: 'sales_step_types',
|
|
16
|
+
description: 'The step types a sales sequence can use (create task, assign owner, notify rep, call now, book meeting, create deal, advance deal) with their fields.',
|
|
17
|
+
inputSchema: { type: 'object', properties: {} },
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'sales_templates',
|
|
21
|
+
description: 'The starter sales sequences and whether each is already installed (campaign id, active state).',
|
|
22
|
+
inputSchema: { type: 'object', properties: {} },
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: 'sales_template_install',
|
|
26
|
+
description: 'Install (or re-open) a starter sales sequence. Upsert by name, so repeating it never creates a duplicate. reset replaces the steps after saving a snapshot to the audit trail.',
|
|
27
|
+
inputSchema: {
|
|
28
|
+
type: 'object',
|
|
29
|
+
properties: {
|
|
30
|
+
key: { type: 'string', description: 'Starter sequence key from sales_templates' },
|
|
31
|
+
bookingLinkUrl: { type: 'string', description: 'Full https scheduler link used in booking steps' },
|
|
32
|
+
activate: { type: 'boolean', description: 'Turn the sequence on after installing' },
|
|
33
|
+
reset: { type: 'boolean', description: 'Start over: replace the existing steps' },
|
|
34
|
+
},
|
|
35
|
+
required: ['key'],
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'sales_enroll',
|
|
40
|
+
description: 'Enroll one contact in a sales sequence. Idempotent: a repeat enrolls once.',
|
|
41
|
+
inputSchema: {
|
|
42
|
+
type: 'object',
|
|
43
|
+
properties: {
|
|
44
|
+
campaignId: { type: 'number', description: 'Sequence (campaign) id' },
|
|
45
|
+
email: { type: 'string' },
|
|
46
|
+
name: { type: 'string' },
|
|
47
|
+
context: { type: 'object', description: 'Optional string values merged into the sequence messages', additionalProperties: { type: 'string' } },
|
|
48
|
+
},
|
|
49
|
+
required: ['campaignId', 'email'],
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'speed_to_lead_rules',
|
|
54
|
+
description: 'List the speed to lead rules (triggers, sources, notify and escalate timing, channels, linked sequence).',
|
|
55
|
+
inputSchema: { type: 'object', properties: {} },
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: 'speed_to_lead_rule_upsert',
|
|
59
|
+
description: 'Create a speed to lead rule, or update one when id is given. Names are unique per account.',
|
|
60
|
+
inputSchema: {
|
|
61
|
+
type: 'object',
|
|
62
|
+
properties: {
|
|
63
|
+
id: { type: 'number', description: 'Rule id to update; omit to create' },
|
|
64
|
+
name: { type: 'string' },
|
|
65
|
+
isActive: { type: 'boolean' },
|
|
66
|
+
triggerTypes: { type: 'array', items: { type: 'string' } },
|
|
67
|
+
sources: { type: 'array', items: { type: 'string' } },
|
|
68
|
+
minScore: { type: 'number', description: 'Minimum lead score 0 to 100' },
|
|
69
|
+
notifySeconds: { type: 'number', description: 'Notify the owner within this many seconds' },
|
|
70
|
+
escalateAfterMinutes: { type: 'number' },
|
|
71
|
+
maxEscalations: { type: 'number' },
|
|
72
|
+
teamId: { type: 'number' },
|
|
73
|
+
skillId: { type: 'number' },
|
|
74
|
+
notifyChannels: { type: 'array', items: { type: 'string', enum: ['desktop', 'teams', 'slack'] } },
|
|
75
|
+
sequenceCampaignId: { type: 'number', description: 'Sequence to enroll the lead in' },
|
|
76
|
+
},
|
|
77
|
+
required: ['name'],
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'speed_to_lead_rule_delete',
|
|
82
|
+
description: 'Delete a speed to lead rule.',
|
|
83
|
+
inputSchema: { type: 'object', properties: { id: { type: 'number' } }, required: ['id'] },
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: 'speed_to_lead_report',
|
|
87
|
+
description: 'Time to first touch report: how fast new leads are contacted, breaches and escalations over a number of days.',
|
|
88
|
+
inputSchema: { type: 'object', properties: { days: { type: 'number', description: 'Days to cover (default 30)' } } },
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: 'speed_to_lead_leads',
|
|
92
|
+
description: 'Page through speed to lead leads, newest first, with owner, first touch and status.',
|
|
93
|
+
inputSchema: {
|
|
94
|
+
type: 'object',
|
|
95
|
+
properties: {
|
|
96
|
+
page: { type: 'number' },
|
|
97
|
+
pageSize: { type: 'number' },
|
|
98
|
+
status: { type: 'string', enum: ['pending', 'touched', 'breached'] },
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
];
|
|
103
|
+
|
|
104
|
+
const RULE_KEYS = ['id', 'name', 'isActive', 'triggerTypes', 'sources', 'minScore', 'notifySeconds', 'escalateAfterMinutes', 'maxEscalations', 'teamId', 'skillId', 'notifyChannels', 'sequenceCampaignId'];
|
|
105
|
+
|
|
106
|
+
export const handlers = {
|
|
107
|
+
sales_status: async (_a, ctx) => ctx.api('GET', '/SalesAutomation/Status'),
|
|
108
|
+
sales_step_types: async (_a, ctx) => ctx.api('GET', '/SalesAutomation/StepTypes'),
|
|
109
|
+
sales_templates: async (_a, ctx) => ctx.api('GET', '/SalesAutomation/Templates'),
|
|
110
|
+
sales_template_install: async (a, ctx) =>
|
|
111
|
+
ctx.api('POST', `/SalesAutomation/Templates/${pid(a.key)}/Install`, {
|
|
112
|
+
bookingLinkUrl: a.bookingLinkUrl,
|
|
113
|
+
activate: !!a.activate,
|
|
114
|
+
reset: !!a.reset,
|
|
115
|
+
}),
|
|
116
|
+
sales_enroll: async (a, ctx) =>
|
|
117
|
+
ctx.api('POST', '/SalesAutomation/Enroll', { campaignId: int(a.campaignId), email: a.email, name: a.name, context: a.context }),
|
|
118
|
+
speed_to_lead_rules: async (_a, ctx) => ctx.api('GET', '/SalesAutomation/SpeedToLead/Rules'),
|
|
119
|
+
speed_to_lead_rule_upsert: async (a, ctx) => {
|
|
120
|
+
const body = {};
|
|
121
|
+
for (const k of RULE_KEYS) if (a[k] !== undefined) body[k] = a[k];
|
|
122
|
+
return ctx.api('PUT', '/SalesAutomation/SpeedToLead/Rules', body);
|
|
123
|
+
},
|
|
124
|
+
speed_to_lead_rule_delete: async (a, ctx) => ctx.api('DELETE', `/SalesAutomation/SpeedToLead/Rules/${int(a.id)}`),
|
|
125
|
+
speed_to_lead_report: async (a, ctx) => {
|
|
126
|
+
const qs = a.days ? `?days=${int(a.days)}` : '';
|
|
127
|
+
return ctx.api('GET', `/SalesAutomation/SpeedToLead/Report${qs}`);
|
|
128
|
+
},
|
|
129
|
+
speed_to_lead_leads: async (a, ctx) => {
|
|
130
|
+
const qs = new URLSearchParams();
|
|
131
|
+
if (a.page) qs.set('page', String(int(a.page)));
|
|
132
|
+
if (a.pageSize) qs.set('pageSize', String(int(a.pageSize)));
|
|
133
|
+
if (a.status) qs.set('status', a.status);
|
|
134
|
+
const q = qs.toString();
|
|
135
|
+
return ctx.api('GET', `/SalesAutomation/SpeedToLead/Leads${q ? `?${q}` : ''}`);
|
|
136
|
+
},
|
|
137
|
+
};
|