@velaro/mcp-server 2.0.121 → 2.0.123

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.121",
3
+ "version": "2.0.123",
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,37 @@
1
+ // velaro ticket-numbering (customer): ticket numbering per department (prefix, next number, increment).
2
+ // Site comes from the credential only; no siteId is ever passed. Parity module (CLI group -> MCP tools).
3
+
4
+ const pid = (v, n = 'teamId') => { const x = Number(v); if (!Number.isInteger(x) || x <= 0) throw new Error(n + ' must be a positive integer'); return x; };
5
+
6
+ export const tools = [
7
+ {
8
+ name: 'ticket_numbering_get',
9
+ description: 'Show how a department (team) numbers its tickets: prefix, next number, increment and an example of the next ticket number. A team with nothing set uses the site numbering.',
10
+ inputSchema: { type: 'object', properties: { teamId: { type: 'integer', description: 'Team (department) id' } }, required: ['teamId'] },
11
+ },
12
+ {
13
+ name: 'ticket_numbering_set',
14
+ description: 'Set ticket numbering for a department (team). Only the fields you pass change. New tickets get the prefix plus the next number; existing tickets keep their numbers. Pass reset true to go back to the site numbering.',
15
+ inputSchema: {
16
+ type: 'object',
17
+ properties: {
18
+ teamId: { type: 'integer', description: 'Team (department) id' },
19
+ prefix: { type: 'string', description: 'Prefix such as TK- (letters, numbers and - _ / . # only, up to 16). Blank means the default TK-.' },
20
+ nextNumber: { type: 'integer', description: 'The number the next ticket gets (1 or more)' },
21
+ increment: { type: 'integer', description: 'How much the number grows after each ticket (1 or more)' },
22
+ reset: { type: 'boolean', description: 'Clear all three settings and use the site numbering' },
23
+ },
24
+ required: ['teamId'],
25
+ },
26
+ },
27
+ ];
28
+
29
+ export const handlers = {
30
+ ticket_numbering_get: async (a, ctx) => ctx.messagingGet('/Teams/' + pid(a.teamId) + '/ticket-numbering'),
31
+ ticket_numbering_set: async (a, ctx) => {
32
+ const body = {};
33
+ for (const k of ['prefix', 'nextNumber', 'increment', 'reset']) if (a[k] !== undefined) body[k] = a[k];
34
+ if (!Object.keys(body).length) throw new Error('Pass at least one of prefix, nextNumber, increment or reset.');
35
+ return ctx.messagingPut('/Teams/' + pid(a.teamId) + '/ticket-numbering', body);
36
+ },
37
+ };
package/server.js CHANGED
@@ -4048,7 +4048,9 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
4048
4048
  id: { type: 'number', description: 'Voice configuration ID to update' },
4049
4049
  idleCheckInSeconds: { type: 'number', description: 'Seconds of caller silence before check-in message (null = use system default of 20s, range 10–120)' },
4050
4050
  idleCheckInMessage: { type: 'string', description: 'Custom "are you still there?" message. Null = system default.' },
4051
- idleHangupSeconds: { type: 'number', description: 'Seconds after check-in with no response before hanging up (null = system default of 20s, range 5–120)' },
4051
+ idleHangupSeconds: { type: 'number', description: 'Seconds to wait after each check-in before asking again or saying goodbye (null = system default of 20s, range 5–120)' },
4052
+ idleMaxCheckIns: { type: 'number', description: 'Check-ins before the goodbye and hang-up (default 2, allowed 1 to 5; the call always ends)' },
4053
+ idleGoodbyeMessage: { type: 'string', description: 'Goodbye played when the last check-in is unanswered. Empty string = system default.' },
4052
4054
  escalationBridgeEnabled: { type: 'boolean', description: 'Allow live bridge transfer on this voice config (default true). Subscription flag also required.' },
4053
4055
  escalationCallbackEnabled: { type: 'boolean', description: 'Allow callback offer on this voice config (default true).' },
4054
4056
  transferNoAnswerMessage: { type: 'string', description: 'Message played when bridge transfer is not answered. Null = system default.' },
@@ -8995,7 +8997,9 @@ ${JSON.stringify(result, null, 2)}`;
8995
8997
  `--- Idle Behavior ---`,
8996
8998
  `Check-in after: ${c.idleCheckInSeconds != null ? c.idleCheckInSeconds + 's' : '20s (default)'}`,
8997
8999
  `Check-in message: ${c.idleCheckInMessage ?? '(system default)'}`,
8998
- `Hangup after (no response): ${c.idleHangupSeconds != null ? c.idleHangupSeconds + 's' : '20s (default)'}`,
9000
+ `Gap between check-ins: ${c.idleHangupSeconds != null ? c.idleHangupSeconds + 's' : '20s (default)'}`,
9001
+ `Check-ins before goodbye: ${c.idleMaxCheckIns != null ? c.idleMaxCheckIns : '2 (default)'}`,
9002
+ `Goodbye message: ${c.idleGoodbyeMessage ?? '(system default)'}`,
8999
9003
  ``,
9000
9004
  `--- Escalation ---`,
9001
9005
  `Bridge transfer enabled: ${c.escalationBridgeEnabled}`,
@@ -9067,6 +9071,8 @@ ${JSON.stringify(result, null, 2)}`;
9067
9071
  ...(args.idleCheckInSeconds !== undefined && { idleCheckInSeconds: args.idleCheckInSeconds }),
9068
9072
  ...(args.idleCheckInMessage !== undefined && { idleCheckInMessage: args.idleCheckInMessage }),
9069
9073
  ...(args.idleHangupSeconds !== undefined && { idleHangupSeconds: args.idleHangupSeconds }),
9074
+ ...(args.idleMaxCheckIns !== undefined && { idleMaxCheckIns: args.idleMaxCheckIns }),
9075
+ ...(args.idleGoodbyeMessage !== undefined && { idleGoodbyeMessage: args.idleGoodbyeMessage }),
9070
9076
  ...(args.escalationBridgeEnabled !== undefined && { escalationBridgeEnabled: args.escalationBridgeEnabled }),
9071
9077
  ...(args.escalationCallbackEnabled !== undefined && { escalationCallbackEnabled: args.escalationCallbackEnabled }),
9072
9078
  ...(args.transferNoAnswerMessage !== undefined && { transferNoAnswerMessage: args.transferNoAnswerMessage }),