@velaro/mcp-server 2.0.52 → 2.0.53
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.53",
|
|
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,61 @@
|
|
|
1
|
+
// MCP parity for `velaro email-route` (cli/lib/commands/email-route.js). Backend: velaro-messaging TicketController
|
|
2
|
+
// Ticket/email-routes (GET list, POST create, PUT /{id} update, DELETE /{id}). Site from the credential, never an argument.
|
|
3
|
+
// Rules are evaluated in sortOrder; first match wins. Update is a full replace of the route fields (the server copies every field).
|
|
4
|
+
|
|
5
|
+
const MODES = ['ticket', 'conversation', 'ignore'];
|
|
6
|
+
|
|
7
|
+
const fields = {
|
|
8
|
+
name: { type: 'string', description: 'Route name (200 characters max).' },
|
|
9
|
+
recipientPattern: { type: 'string', description: 'Case-insensitive substring of the recipient address, e.g. "billing@support.acme.com" or "@acme.com". Blank matches any recipient.' },
|
|
10
|
+
senderDomainPattern: { type: 'string', description: 'Optional sender domain filter, e.g. "enterprise-client.com".' },
|
|
11
|
+
subjectKeywords: { type: 'string', description: 'Optional comma-separated subject keywords (any match), e.g. "invoice,billing,payment".' },
|
|
12
|
+
teamId: { type: 'number', description: 'Target team id (see team_list). Omit to use the site default team.' },
|
|
13
|
+
priority: { type: 'string', description: 'Priority for tickets created from this route (16 characters max).' },
|
|
14
|
+
category: { type: 'string', description: 'Category for tickets created from this route (64 characters max).' },
|
|
15
|
+
sortOrder: { type: 'number', description: 'Lower number is evaluated first. Default 0.' },
|
|
16
|
+
isActive: { type: 'boolean', description: 'Default true.' },
|
|
17
|
+
mode: { type: 'string', enum: MODES, description: 'ticket = always create a ticket, conversation = always a live conversation, ignore = discard silently. Omit to inherit the site-wide ticketing setting.' },
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const body = (a) => ({
|
|
21
|
+
name: a.name,
|
|
22
|
+
recipientPattern: a.recipientPattern ?? null,
|
|
23
|
+
senderDomainPattern: a.senderDomainPattern ?? null,
|
|
24
|
+
subjectKeywords: a.subjectKeywords ?? null,
|
|
25
|
+
teamId: a.teamId ?? null,
|
|
26
|
+
priority: a.priority ?? null,
|
|
27
|
+
category: a.category ?? null,
|
|
28
|
+
sortOrder: a.sortOrder ?? 0,
|
|
29
|
+
isActive: a.isActive ?? true,
|
|
30
|
+
mode: a.mode ?? null,
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export const tools = [
|
|
34
|
+
{
|
|
35
|
+
name: 'email_route_list',
|
|
36
|
+
description: 'List ticket email routes: rules that send inbound email to a team, priority, category and mode (ticket, conversation, ignore) by recipient address, sender domain and subject keywords. Evaluated in sortOrder, first match wins.',
|
|
37
|
+
inputSchema: { type: 'object', properties: {} },
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'email_route_create',
|
|
41
|
+
description: 'Create a ticket email route. The site plan may cap the number of routes. Returns the created route.',
|
|
42
|
+
inputSchema: { type: 'object', properties: fields, required: ['name'] },
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'email_route_update',
|
|
46
|
+
description: 'Update a ticket email route by id. This replaces every route field, so pass the full route (read it with email_route_list first); omitted optional fields are cleared.',
|
|
47
|
+
inputSchema: { type: 'object', properties: { id: { type: 'number', description: 'Route id (see email_route_list).' }, ...fields }, required: ['id', 'name'] },
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: 'email_route_delete',
|
|
51
|
+
description: 'Delete a ticket email route by id. Emails that matched it fall through to the next route or the site default.',
|
|
52
|
+
inputSchema: { type: 'object', properties: { id: { type: 'number', description: 'Route id (see email_route_list).' } }, required: ['id'] },
|
|
53
|
+
},
|
|
54
|
+
];
|
|
55
|
+
|
|
56
|
+
export const handlers = {
|
|
57
|
+
email_route_list: async (_a, ctx) => ({ routes: await ctx.messagingGet('/Ticket/email-routes') }),
|
|
58
|
+
email_route_create: async (a, ctx) => await ctx.messagingPost('/Ticket/email-routes', body(a)),
|
|
59
|
+
email_route_update: async (a, ctx) => await ctx.messagingPut(`/Ticket/email-routes/${encodeURIComponent(a.id)}`, body(a)),
|
|
60
|
+
email_route_delete: async (a, ctx) => await ctx.messagingDel(`/Ticket/email-routes/${encodeURIComponent(a.id)}`),
|
|
61
|
+
};
|