@velaro/mcp-server 2.0.53 → 2.0.55
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.55",
|
|
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,82 @@
|
|
|
1
|
+
// MCP parity for `velaro email-route-override` (cli/lib/commands/email-route-override.js). Backend: velaro-messaging
|
|
2
|
+
// TicketController Ticket/email-route-overrides (GET list, POST create, PUT /{id} update, DELETE /{id}, POST /explain).
|
|
3
|
+
// Site from the credential, never an argument. Scope (mailbox/team) is set on create and immutable on update.
|
|
4
|
+
// Every outcome field is nullable (null = inherit); create needs at least one of mode, priority, category, targetTeamId.
|
|
5
|
+
|
|
6
|
+
const outcome = {
|
|
7
|
+
mode: { type: 'string', enum: ['ticket', 'conversation'], description: 'ticket or conversation. "ignore" is not allowed on an override.' },
|
|
8
|
+
priority: { type: 'string', description: 'Priority override (16 characters max).' },
|
|
9
|
+
category: { type: 'string', description: 'Category override (64 characters max).' },
|
|
10
|
+
targetTeamId: { type: 'number', description: 'Re-route matching email to this team id (see team_list).' },
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const scope = {
|
|
14
|
+
mailboxProvider: { type: 'string', enum: ['Outlook', 'Gmail'], description: 'Required when mailboxId is set (separate id spaces).' },
|
|
15
|
+
mailboxId: { type: 'number', description: 'Mailbox integration id to scope to (shown on the Email Inbox settings page).' },
|
|
16
|
+
teamId: { type: 'number', description: 'Department scope: the team the email resolves to. Omit all scope fields for a site-wide default.' },
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const createBody = (a) => ({
|
|
20
|
+
mailboxProvider: a.mailboxProvider ?? null,
|
|
21
|
+
mailboxId: a.mailboxId ?? null,
|
|
22
|
+
teamId: a.teamId ?? null,
|
|
23
|
+
mode: a.mode ?? null,
|
|
24
|
+
priority: a.priority ?? null,
|
|
25
|
+
category: a.category ?? null,
|
|
26
|
+
targetTeamId: a.targetTeamId ?? null,
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const updateBody = (a) => {
|
|
30
|
+
const b = {};
|
|
31
|
+
for (const k of ['mode', 'priority', 'category', 'targetTeamId']) if (a[k] !== undefined) b[k] = a[k];
|
|
32
|
+
return b;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const tools = [
|
|
36
|
+
{
|
|
37
|
+
name: 'email_route_override_list',
|
|
38
|
+
description: 'List scoped email route overrides. Each override (site-wide, per mailbox, per team) can override mode, priority, category and target team of the matched email route; most specific scope wins per field.',
|
|
39
|
+
inputSchema: { type: 'object', properties: {} },
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'email_route_override_create',
|
|
43
|
+
description: 'Create an email route override. Set at least one of mode, priority, category or targetTeamId (400 otherwise). Omit scope fields for a site-wide default. One override per scope.',
|
|
44
|
+
inputSchema: { type: 'object', properties: { ...scope, ...outcome } },
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'email_route_override_update',
|
|
48
|
+
description: 'Update the outcome of an override by id. Scope is immutable (delete and re-create to move it). Only fields you pass change.',
|
|
49
|
+
inputSchema: { type: 'object', properties: { id: { type: 'number', description: 'Override id (see email_route_override_list).' }, ...outcome }, required: ['id'] },
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'email_route_override_delete',
|
|
53
|
+
description: 'Delete an email route override by id.',
|
|
54
|
+
inputSchema: { type: 'object', properties: { id: { type: 'number', description: 'Override id (see email_route_override_list).' } }, required: ['id'] },
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'email_route_override_explain',
|
|
58
|
+
description: 'Debug: given an email (recipient, sender, subject, optional mailbox), show which email route matches and the effective mode, priority, category and team after overrides. Read-only.',
|
|
59
|
+
inputSchema: {
|
|
60
|
+
type: 'object',
|
|
61
|
+
properties: {
|
|
62
|
+
recipient: { type: 'string' },
|
|
63
|
+
sender: { type: 'string', description: 'Sender address.' },
|
|
64
|
+
subject: { type: 'string' },
|
|
65
|
+
mailboxProvider: { type: 'string', enum: ['Outlook', 'Gmail'] },
|
|
66
|
+
mailboxId: { type: 'number' },
|
|
67
|
+
mailboxTeamId: { type: 'number', description: 'Team the mailbox is assigned to.' },
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
];
|
|
72
|
+
|
|
73
|
+
export const handlers = {
|
|
74
|
+
email_route_override_list: async (_a, ctx) => ({ overrides: await ctx.messagingGet('/Ticket/email-route-overrides') }),
|
|
75
|
+
email_route_override_create: async (a, ctx) => await ctx.messagingPost('/Ticket/email-route-overrides', createBody(a)),
|
|
76
|
+
email_route_override_update: async (a, ctx) => await ctx.messagingPut(`/Ticket/email-route-overrides/${encodeURIComponent(a.id)}`, updateBody(a)),
|
|
77
|
+
email_route_override_delete: async (a, ctx) => await ctx.messagingDel(`/Ticket/email-route-overrides/${encodeURIComponent(a.id)}`),
|
|
78
|
+
email_route_override_explain: async (a, ctx) => await ctx.messagingPost('/Ticket/email-route-overrides/explain', {
|
|
79
|
+
recipient: a.recipient ?? null, sender: a.sender ?? null, subject: a.subject ?? null,
|
|
80
|
+
mailboxProvider: a.mailboxProvider ?? null, mailboxId: a.mailboxId ?? null, mailboxTeamId: a.mailboxTeamId ?? null,
|
|
81
|
+
}),
|
|
82
|
+
};
|