@velaro/mcp-server 2.0.102 → 2.0.104
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 +1 -1
- package/server.js +44 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velaro/mcp-server",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.104",
|
|
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": {
|
package/server.js
CHANGED
|
@@ -604,6 +604,16 @@ const TOOLS = [
|
|
|
604
604
|
description: 'Restore a deleted KB topic.',
|
|
605
605
|
inputSchema: { type: 'object', properties: { id: { type: 'number', description: 'Topic ID' } }, required: ['id'] },
|
|
606
606
|
},
|
|
607
|
+
{
|
|
608
|
+
name: 'contact_notes_list',
|
|
609
|
+
description: 'List notes on a contact (newest first, paged).',
|
|
610
|
+
inputSchema: { type: 'object', properties: { id: { type: 'number' }, page: { type: 'number' }, pageSize: { type: 'number' } }, required: ['id'] },
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
name: 'contact_tag_remove',
|
|
614
|
+
description: 'Remove a tag from a contact.',
|
|
615
|
+
inputSchema: { type: 'object', properties: { id: { type: 'number' }, tagId: { type: 'number' } }, required: ['id', 'tagId'] },
|
|
616
|
+
},
|
|
607
617
|
{
|
|
608
618
|
name: 'contactsegment_list_deleted',
|
|
609
619
|
description: 'List recently deleted contact segments (restorable for 30 days).',
|
|
@@ -1434,6 +1444,16 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
|
|
|
1434
1444
|
description: 'Turn chat translation on or off. Without confirmed=true it only previews the before and after. Saving needs "Moshky can make changes" on; audit-logged.',
|
|
1435
1445
|
inputSchema: { type: 'object', properties: { enabled: { type: 'boolean' }, confirmed: { type: 'boolean', description: 'true to save after the preview was approved' } }, required: ['enabled'] },
|
|
1436
1446
|
},
|
|
1447
|
+
{
|
|
1448
|
+
name: 'translation_allowance_get',
|
|
1449
|
+
description: 'Staff: show the monthly translated-character allowance for this site (effective cap, per-site override, characters used this month, percent used).',
|
|
1450
|
+
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
1451
|
+
},
|
|
1452
|
+
{
|
|
1453
|
+
name: 'translation_allowance_set',
|
|
1454
|
+
description: 'Staff: set or remove the per-site monthly translation allowance override. Without confirmed=true it only previews the before and after. Saving needs "Moshky can make changes" on; audit-logged.',
|
|
1455
|
+
inputSchema: { type: 'object', properties: { charactersPerMonth: { type: 'number' }, removeOverride: { type: 'boolean' }, reason: { type: 'string' }, confirmed: { type: 'boolean', description: 'true to save after the preview was approved' } }, required: [] },
|
|
1456
|
+
},
|
|
1437
1457
|
// ── Copilot Studio / Azure AI Agent connections ──────────────────────────
|
|
1438
1458
|
{
|
|
1439
1459
|
name: 'copilot_studio_list',
|
|
@@ -1631,6 +1651,9 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
|
|
|
1631
1651
|
contactId: { type: 'number' }, email: { type: 'string' }, firstName: { type: 'string' }, lastName: { type: 'string' },
|
|
1632
1652
|
phone: { type: 'string' }, mobile: { type: 'string' }, company: { type: 'string' }, jobTitle: { type: 'string' },
|
|
1633
1653
|
tags: { type: 'array', items: { type: 'string' } },
|
|
1654
|
+
customFields: { type: 'object', description: 'Custom field values {name: value}. Unknown or invalid keys return an error naming the key; nothing is silently dropped.' },
|
|
1655
|
+
id: { type: 'number', description: 'Alias for contactId' },
|
|
1656
|
+
fields: { type: 'object', description: 'Optional object of core fields merged into the update' },
|
|
1634
1657
|
},
|
|
1635
1658
|
required: ['contactId'],
|
|
1636
1659
|
},
|
|
@@ -5661,6 +5684,14 @@ async function handleTool(name, args) {
|
|
|
5661
5684
|
return rows.map(r => `#${r.id} ${r.name} (deleted ${r.deletedAt}, purges in ${r.daysUntilPurge} day(s))`).join('\n');
|
|
5662
5685
|
}
|
|
5663
5686
|
|
|
5687
|
+
case 'contact_notes_list': {
|
|
5688
|
+
const r = await api('GET', `/api/v1/contacts/${args.id}/notes?page=${args.page || 1}&pageSize=${args.pageSize || 50}`);
|
|
5689
|
+
return JSON.stringify(r, null, 2);
|
|
5690
|
+
}
|
|
5691
|
+
case 'contact_tag_remove': {
|
|
5692
|
+
await api('DELETE', `/api/v1/contacts/${args.id}/tags/${args.tagId}`);
|
|
5693
|
+
return `Removed tag #${args.tagId} from contact #${args.id}.`;
|
|
5694
|
+
}
|
|
5664
5695
|
case 'contactsegment_restore': {
|
|
5665
5696
|
await api('POST', `/ContactSegments/${args.id}/restore`);
|
|
5666
5697
|
return `Restored #${args.id}.`;
|
|
@@ -6175,6 +6206,16 @@ async function handleTool(name, args) {
|
|
|
6175
6206
|
if (rpc?.error) throw new Error(rpc.error.message || 'Moshky tool call failed');
|
|
6176
6207
|
return rpc?.result?.content?.[0]?.text ?? JSON.stringify(rpc, null, 2);
|
|
6177
6208
|
}
|
|
6209
|
+
case 'translation_allowance_get':
|
|
6210
|
+
case 'translation_allowance_set': {
|
|
6211
|
+
const base = args.removeOverride ? { remove_override: true } : { characters_per_month: args.charactersPerMonth };
|
|
6212
|
+
const [tool, targs] = name === 'translation_allowance_get' ? ['get_translation_allowance', {}]
|
|
6213
|
+
: args.confirmed ? ['update_translation_allowance_override', { ...base, reason: args.reason, confirmed: true }]
|
|
6214
|
+
: ['propose_translation_allowance_override', base];
|
|
6215
|
+
const rpc = await api('POST', '/mcp/copilot', { jsonrpc: '2.0', id: 1, method: 'tools/call', params: { name: tool, arguments: targs } });
|
|
6216
|
+
if (rpc?.error) throw new Error(rpc.error.message || 'Moshky tool call failed');
|
|
6217
|
+
return rpc?.result?.content?.[0]?.text ?? JSON.stringify(rpc, null, 2);
|
|
6218
|
+
}
|
|
6178
6219
|
case 'copilot_studio_list': {
|
|
6179
6220
|
const configs = await api('GET', '/CopilotStudio/configs');
|
|
6180
6221
|
if (!Array.isArray(configs) || !configs.length) {
|
|
@@ -6358,7 +6399,9 @@ reply: ${r?.reply}`;
|
|
|
6358
6399
|
|
|
6359
6400
|
// PATCH api/v1/contacts/{id} -> PublicApiController.PatchContact
|
|
6360
6401
|
case 'contact_update': {
|
|
6361
|
-
const { contactId, ...
|
|
6402
|
+
const { contactId: cid, id: legacyId, fields, ...rest } = args || {};
|
|
6403
|
+
const contactId = cid ?? legacyId;
|
|
6404
|
+
const body = { ...(fields || {}), ...rest };
|
|
6362
6405
|
if (!contactId) return 'Error: contactId is required.';
|
|
6363
6406
|
const r = await api('PATCH', `/api/v1/contacts/${encodeURIComponent(contactId)}`, body);
|
|
6364
6407
|
return `Updated contact #${r.id} (${r.email})${r.tags?.length ? ' tags: ' + r.tags.join(', ') : ''}`;
|