@velaro/mcp-server 2.0.101 → 2.0.102

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server.js +27 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velaro/mcp-server",
3
- "version": "2.0.101",
3
+ "version": "2.0.102",
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,22 @@ 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
+ },
1421
1437
  // ── Copilot Studio / Azure AI Agent connections ──────────────────────────
1422
1438
  {
1423
1439
  name: 'copilot_studio_list',
@@ -6148,6 +6164,17 @@ async function handleTool(name, args) {
6148
6164
  consentVersion: args.consentVersion || '',
6149
6165
  }), null, 2);
6150
6166
  }
6167
+ case 'translation_settings_get':
6168
+ case 'translation_diagnose':
6169
+ case 'translation_settings_set': {
6170
+ const [tool, targs] = name === 'translation_settings_get' ? ['get_translation_settings', {}]
6171
+ : name === 'translation_diagnose' ? ['diagnose_conversation_translation', { conversation_id: args.conversationId }]
6172
+ : [args.confirmed ? 'update_translation_settings' : 'propose_translation_settings',
6173
+ args.confirmed ? { chat_translations_enabled: !!args.enabled, confirmed: true } : { chat_translations_enabled: !!args.enabled }];
6174
+ const rpc = await api('POST', '/mcp/copilot', { jsonrpc: '2.0', id: 1, method: 'tools/call', params: { name: tool, arguments: targs } });
6175
+ if (rpc?.error) throw new Error(rpc.error.message || 'Moshky tool call failed');
6176
+ return rpc?.result?.content?.[0]?.text ?? JSON.stringify(rpc, null, 2);
6177
+ }
6151
6178
  case 'copilot_studio_list': {
6152
6179
  const configs = await api('GET', '/CopilotStudio/configs');
6153
6180
  if (!Array.isArray(configs) || !configs.length) {