@velaro/mcp-server 2.0.101 → 2.0.103
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 +47 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velaro/mcp-server",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.103",
|
|
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
|
@@ -1418,6 +1418,32 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
|
|
|
1418
1418
|
required: ['enabled'],
|
|
1419
1419
|
},
|
|
1420
1420
|
},
|
|
1421
|
+
// ── Chat translation (Moshky tools, called through POST /mcp/copilot) ────
|
|
1422
|
+
{
|
|
1423
|
+
name: 'translation_settings_get',
|
|
1424
|
+
description: 'Show whether chat translation is on for this site, the agent languages, and what agents will see.',
|
|
1425
|
+
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
1426
|
+
},
|
|
1427
|
+
{
|
|
1428
|
+
name: 'translation_diagnose',
|
|
1429
|
+
description: 'For one conversation, show each visitor message language, which messages have a stored translation, and whether translation would apply. Answers why a message is or is not translated.',
|
|
1430
|
+
inputSchema: { type: 'object', properties: { conversationId: { type: 'number' } }, required: ['conversationId'] },
|
|
1431
|
+
},
|
|
1432
|
+
{
|
|
1433
|
+
name: 'translation_settings_set',
|
|
1434
|
+
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
|
+
inputSchema: { type: 'object', properties: { enabled: { type: 'boolean' }, confirmed: { type: 'boolean', description: 'true to save after the preview was approved' } }, required: ['enabled'] },
|
|
1436
|
+
},
|
|
1437
|
+
{
|
|
1438
|
+
name: 'translation_allowance_get',
|
|
1439
|
+
description: 'Staff: show the monthly translated-character allowance for this site (effective cap, per-site override, characters used this month, percent used).',
|
|
1440
|
+
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
1441
|
+
},
|
|
1442
|
+
{
|
|
1443
|
+
name: 'translation_allowance_set',
|
|
1444
|
+
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.',
|
|
1445
|
+
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: [] },
|
|
1446
|
+
},
|
|
1421
1447
|
// ── Copilot Studio / Azure AI Agent connections ──────────────────────────
|
|
1422
1448
|
{
|
|
1423
1449
|
name: 'copilot_studio_list',
|
|
@@ -6148,6 +6174,27 @@ async function handleTool(name, args) {
|
|
|
6148
6174
|
consentVersion: args.consentVersion || '',
|
|
6149
6175
|
}), null, 2);
|
|
6150
6176
|
}
|
|
6177
|
+
case 'translation_settings_get':
|
|
6178
|
+
case 'translation_diagnose':
|
|
6179
|
+
case 'translation_settings_set': {
|
|
6180
|
+
const [tool, targs] = name === 'translation_settings_get' ? ['get_translation_settings', {}]
|
|
6181
|
+
: name === 'translation_diagnose' ? ['diagnose_conversation_translation', { conversation_id: args.conversationId }]
|
|
6182
|
+
: [args.confirmed ? 'update_translation_settings' : 'propose_translation_settings',
|
|
6183
|
+
args.confirmed ? { chat_translations_enabled: !!args.enabled, confirmed: true } : { chat_translations_enabled: !!args.enabled }];
|
|
6184
|
+
const rpc = await api('POST', '/mcp/copilot', { jsonrpc: '2.0', id: 1, method: 'tools/call', params: { name: tool, arguments: targs } });
|
|
6185
|
+
if (rpc?.error) throw new Error(rpc.error.message || 'Moshky tool call failed');
|
|
6186
|
+
return rpc?.result?.content?.[0]?.text ?? JSON.stringify(rpc, null, 2);
|
|
6187
|
+
}
|
|
6188
|
+
case 'translation_allowance_get':
|
|
6189
|
+
case 'translation_allowance_set': {
|
|
6190
|
+
const base = args.removeOverride ? { remove_override: true } : { characters_per_month: args.charactersPerMonth };
|
|
6191
|
+
const [tool, targs] = name === 'translation_allowance_get' ? ['get_translation_allowance', {}]
|
|
6192
|
+
: args.confirmed ? ['update_translation_allowance_override', { ...base, reason: args.reason, confirmed: true }]
|
|
6193
|
+
: ['propose_translation_allowance_override', base];
|
|
6194
|
+
const rpc = await api('POST', '/mcp/copilot', { jsonrpc: '2.0', id: 1, method: 'tools/call', params: { name: tool, arguments: targs } });
|
|
6195
|
+
if (rpc?.error) throw new Error(rpc.error.message || 'Moshky tool call failed');
|
|
6196
|
+
return rpc?.result?.content?.[0]?.text ?? JSON.stringify(rpc, null, 2);
|
|
6197
|
+
}
|
|
6151
6198
|
case 'copilot_studio_list': {
|
|
6152
6199
|
const configs = await api('GET', '/CopilotStudio/configs');
|
|
6153
6200
|
if (!Array.isArray(configs) || !configs.length) {
|