@velaro/mcp-server 2.0.47 → 2.0.49

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.47",
3
+ "version": "2.0.49",
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,49 @@
1
+ // MCP parity for `velaro sender-domain-health warmup | warmup-settings | resume` (cli/lib/commands/sender-domain-health.js).
2
+ // Sender health: authentication status, warmup ramp progress, 7 and 30 day complaint / bounce / unsubscribe rates and a plain-language fix list.
3
+ // The site comes from the credential only (the server reads it from the token); no tool takes a siteId.
4
+ // Backend: SenderHealthController (GET SenderHealth, PUT SenderHealth/Settings, POST SenderHealth/{id}/Resume). Warmup and automatic
5
+ // pausing are part of Email Growth (entitlement EnableEmailWarmup); reading works on every plan.
6
+
7
+ const pid = (v, n = 'id') => { const x = Number(v); if (!Number.isInteger(x) || x <= 0) throw new Error(n + ' must be a positive integer'); return x; };
8
+
9
+ export const tools = [
10
+ {
11
+ name: 'sender_domain_health_warmup',
12
+ description: 'Sender health for your sending domains: SPF/DKIM/DMARC status, the one-click unsubscribe header, warmup ramp progress (day, today\'s amount, paused or not), spam complaint / bounce / unsubscribe rates for the last 7 and 30 days, and a plain-language list of what to fix. Use it when email goes to spam, a campaign is held back, or sending is paused.',
13
+ inputSchema: { type: 'object', properties: {} },
14
+ },
15
+ {
16
+ name: 'sender_domain_health_warmup_set',
17
+ description: 'Change the warmup settings for your account. warmupEnabled turns the ramp and automatic pausing on or off. schedule is one number per day, comma separated, never decreasing (for example "50,100,200,400"). complaintPausePct (above 0, at most 0.3) and bouncePausePct (1 to 10) set when sending pauses. reset returns everything to the standard settings. Needs Email Growth.',
18
+ inputSchema: {
19
+ type: 'object',
20
+ properties: {
21
+ warmupEnabled: { type: 'boolean', description: 'Turn the warmup ramp and automatic pausing on or off' },
22
+ schedule: { type: 'string', description: 'Daily amounts, comma separated, one per ramp day, never decreasing' },
23
+ complaintPausePct: { type: 'number', description: 'Pause sending at this spam complaint rate, percent (above 0, at most 0.3)' },
24
+ bouncePausePct: { type: 'number', description: 'Pause sending at this bounce rate, percent (1 to 10)' },
25
+ reset: { type: 'boolean', description: 'Go back to the standard warmup settings' },
26
+ },
27
+ },
28
+ },
29
+ {
30
+ name: 'sender_domain_health_resume',
31
+ description: 'Resume sending from a sender domain that was paused for spam complaints or bounces. It only resumes once the last 7 days are back under the limit; otherwise it says why not. Sending restarts on a gentle ramp. Needs Email Growth.',
32
+ inputSchema: { type: 'object', properties: { domainId: { type: 'integer', description: 'Sender domain id (from sender_domain_health_warmup)' } }, required: ['domainId'] },
33
+ },
34
+ ];
35
+
36
+ export const handlers = {
37
+ sender_domain_health_warmup: async (_a, ctx) => ctx.api('GET', '/SenderHealth'),
38
+ sender_domain_health_warmup_set: async (a, ctx) => {
39
+ const body = {};
40
+ if (a.reset === true) return ctx.api('PUT', '/SenderHealth/Settings', { reset: true });
41
+ if (a.warmupEnabled !== undefined) body.warmupEnabled = a.warmupEnabled === true;
42
+ if (a.schedule !== undefined) body.schedule = String(a.schedule);
43
+ if (a.complaintPausePct !== undefined) body.complaintPausePct = Number(a.complaintPausePct);
44
+ if (a.bouncePausePct !== undefined) body.bouncePausePct = Number(a.bouncePausePct);
45
+ if (Object.keys(body).length === 0) throw new Error('Provide warmupEnabled, schedule, complaintPausePct, bouncePausePct or reset');
46
+ return ctx.api('PUT', '/SenderHealth/Settings', body);
47
+ },
48
+ sender_domain_health_resume: async (a, ctx) => ctx.api('POST', `/SenderHealth/${pid(a.domainId, 'domainId')}/Resume`, {}),
49
+ };