@velaro/mcp-server 2.0.104 → 2.0.106
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 +80 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velaro/mcp-server",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.106",
|
|
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
|
@@ -334,7 +334,7 @@ const MESSAGING_ADMIN_TOOLS = new Set([
|
|
|
334
334
|
'ai_config_attach_index', 'ai_config_set_reply_format', 'call_pop_settings_get', 'call_pop_settings_set',
|
|
335
335
|
'crm_mobile_fields_get', 'crm_mobile_fields_set',
|
|
336
336
|
'agent_list', 'team_list', 'conversation_list', 'conversation_get', 'conversation_search',
|
|
337
|
-
'contact_search', 'contact_get', 'routing_list', 'routing_get', 'site_info',
|
|
337
|
+
'contact_search', 'contact_get', 'contacts_api_custom_fields', 'routing_list', 'routing_get', 'site_info',
|
|
338
338
|
'linked_identity_list', 'linked_identity_unlink',
|
|
339
339
|
'ms_bookings_cancel_appointment', 'ms_bookings_check_availability_range', 'ms_bookings_reschedule_appointment',
|
|
340
340
|
'outlook_calendar_cancel', 'outlook_calendar_get_available_range',
|
|
@@ -865,6 +865,26 @@ const TOOLS = [
|
|
|
865
865
|
},
|
|
866
866
|
|
|
867
867
|
// ── Conversations ─────────────────────────────────────────────────────────
|
|
868
|
+
{
|
|
869
|
+
name: 'conversation_action_send_message',
|
|
870
|
+
description: 'Send an agent message into a conversation (REST: POST /api/v1/conversations/{id}/messages). Requires write:conversations.',
|
|
871
|
+
inputSchema: { type: 'object', properties: { conversationId: { type: 'number' }, text: { type: 'string' }, agentId: { type: 'number', description: 'Optional agent to send as' } }, required: ['conversationId', 'text'] },
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
name: 'conversation_action_resolve',
|
|
875
|
+
description: 'Resolve (close) a conversation (REST: POST /api/v1/conversations/{id}/resolve). Requires write:conversations.',
|
|
876
|
+
inputSchema: { type: 'object', properties: { conversationId: { type: 'number' }, topic: { type: 'string' } }, required: ['conversationId'] },
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
name: 'conversation_action_assign',
|
|
880
|
+
description: 'Assign a conversation to an agent (REST: POST /api/v1/conversations/{id}/assign). Requires write:conversations.',
|
|
881
|
+
inputSchema: { type: 'object', properties: { conversationId: { type: 'number' }, agentId: { type: 'number' } }, required: ['conversationId', 'agentId'] },
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
name: 'conversation_action_notes',
|
|
885
|
+
description: 'List notes on a conversation (REST: GET /api/v1/conversations/{id}/notes). Requires read:conversations.',
|
|
886
|
+
inputSchema: { type: 'object', properties: { conversationId: { type: 'number' } }, required: ['conversationId'] },
|
|
887
|
+
},
|
|
868
888
|
{
|
|
869
889
|
name: 'conversation_list',
|
|
870
890
|
description: 'List recent conversations. Returns id, status, phoneNumber, assignedUserId, teamId, createdAt.',
|
|
@@ -1682,6 +1702,11 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
|
|
|
1682
1702
|
description: "List the site's agents or teams through the public REST API (GET /api/v1/agents or /api/v1/teams, scope read:agents). Set kind to 'teams' for teams; default is agents.",
|
|
1683
1703
|
inputSchema: { type: 'object', properties: { kind: { type: 'string', enum: ['agents', 'teams'] }, page: { type: 'number' }, pageSize: { type: 'number' } } },
|
|
1684
1704
|
},
|
|
1705
|
+
{
|
|
1706
|
+
name: 'public_api_ops_lookup',
|
|
1707
|
+
description: "Operational lookups through the public REST API (api/v1). what=agent_availability (GET /agents/availability, optional teamId; scope read:agents), team (GET /teams/{id} with members; needs id; read:agents), webhook_events (GET /webhooks/events; read:webhooks) or webhook_test (POST /webhooks/{id}/test queues a signed test delivery; needs id; write:webhooks).",
|
|
1708
|
+
inputSchema: { type: 'object', properties: { what: { type: 'string', enum: ['agent_availability', 'team', 'webhook_events', 'webhook_test'] }, id: { type: 'number' }, teamId: { type: 'number' } }, required: ['what'] },
|
|
1709
|
+
},
|
|
1685
1710
|
{
|
|
1686
1711
|
name: 'public_api_webhooks',
|
|
1687
1712
|
description: "Manage outbound webhook subscriptions through the public REST API (/api/v1/webhooks). action=list (scope read:webhooks), create (needs url, optional events; returns the signing secret ONCE) or delete (needs id) (scope write:webhooks). Events: contact_tag_added, conversation_started, conversation_closed. Deliveries are signed with X-Velaro-Signature (HMAC-SHA256).",
|
|
@@ -5276,6 +5301,31 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
|
|
|
5276
5301
|
{"name":"ai_field_extraction_update_config","description":"Update AI field extraction config (partial). enabled, monthlyCap (null = 500 default, hard ceiling 50000), createThemeTags.","inputSchema":{"type":"object","properties":{"enabled":{"type":"boolean"},"monthlyCap":{"type":"number"},"createThemeTags":{"type":"boolean"}}}},
|
|
5277
5302
|
{"name":"ai_field_extraction_correct_field","description":"Agent correction of an extracted field on a conversation.","inputSchema":{"type":"object","properties":{"conversationId":{"type":"number"},"fieldName":{"type":"string"},"value":{"type":"string"}},"required":["conversationId","fieldName","value"]}},
|
|
5278
5303
|
{"name":"qa_calibration","description":"QA calibration report (AI score vs human review) for the last N days.","inputSchema":{"type":"object","properties":{"days":{"type":"number"}}}},
|
|
5304
|
+
{
|
|
5305
|
+
name: 'contacts_api_delete',
|
|
5306
|
+
description: "Soft-delete a contact via the public REST API (restorable for 30 days).",
|
|
5307
|
+
inputSchema: {"type": "object", "properties": {"id": {"type": "number"}}, "required": ["id"]},
|
|
5308
|
+
},
|
|
5309
|
+
{
|
|
5310
|
+
name: 'contacts_api_upsert',
|
|
5311
|
+
description: "Create or update a contact matched by uniqueId, then email, then phone. At least one is required.",
|
|
5312
|
+
inputSchema: {"type": "object", "properties": {"uniqueId": {"type": "string"}, "email": {"type": "string"}, "phone": {"type": "string"}, "firstName": {"type": "string"}, "lastName": {"type": "string"}, "company": {"type": "string"}, "jobTitle": {"type": "string"}}},
|
|
5313
|
+
},
|
|
5314
|
+
{
|
|
5315
|
+
name: 'contacts_api_custom_fields',
|
|
5316
|
+
description: "List the site's custom contact field definitions (vault and internal fields are never returned).",
|
|
5317
|
+
inputSchema: {"type": "object", "properties": {}},
|
|
5318
|
+
},
|
|
5319
|
+
{
|
|
5320
|
+
name: 'contacts_api_sms',
|
|
5321
|
+
description: "Send an SMS to an existing contact. Requires the SMS channel; opted-out recipients are refused.",
|
|
5322
|
+
inputSchema: {"type": "object", "properties": {"contactId": {"type": "number"}, "body": {"type": "string"}}, "required": ["contactId", "body"]},
|
|
5323
|
+
},
|
|
5324
|
+
{
|
|
5325
|
+
name: 'contacts_api_whatsapp',
|
|
5326
|
+
description: "Send an approved WhatsApp template to an existing contact. idempotencyKey is required; opted-out recipients are refused.",
|
|
5327
|
+
inputSchema: {"type": "object", "properties": {"contactId": {"type": "number"}, "templateName": {"type": "string"}, "language": {"type": "string"}, "variables": {"type": "array", "items": {"type": "string"}}, "idempotencyKey": {"type": "string"}}, "required": ["contactId", "templateName", "idempotencyKey"]},
|
|
5328
|
+
},
|
|
5279
5329
|
{"name":"qa_alert_settings","description":"Get or set quality alert settings. Omit \"settings\" to read; pass it to update.","inputSchema":{"type":"object","properties":{"settings":{"type":"object"}}}},
|
|
5280
5330
|
];
|
|
5281
5331
|
|
|
@@ -5678,6 +5728,12 @@ async function handleTool(name, args) {
|
|
|
5678
5728
|
return `Restored #${args.id}.`;
|
|
5679
5729
|
}
|
|
5680
5730
|
|
|
5731
|
+
case 'contacts_api_delete': return JSON.stringify(await api('DELETE', `/api/v1/contacts/${args.id}`), null, 2);
|
|
5732
|
+
case 'contacts_api_upsert': return JSON.stringify(await api('POST', '/api/v1/contacts/upsert', args), null, 2);
|
|
5733
|
+
case 'contacts_api_custom_fields': return JSON.stringify(await api('GET', '/api/v1/custom-fields'), null, 2);
|
|
5734
|
+
case 'contacts_api_sms': return JSON.stringify(await api('POST', '/api/v1/sms', { contactId: args.contactId, body: args.body }), null, 2);
|
|
5735
|
+
case 'contacts_api_whatsapp': return JSON.stringify(await api('POST', '/api/v1/whatsapp', args), null, 2);
|
|
5736
|
+
|
|
5681
5737
|
case 'contactsegment_list_deleted': {
|
|
5682
5738
|
const rows = await api('GET', `/ContactSegments/deleted`);
|
|
5683
5739
|
if (!Array.isArray(rows) || !rows.length) return 'Nothing in Recently deleted.';
|
|
@@ -5819,6 +5875,14 @@ async function handleTool(name, args) {
|
|
|
5819
5875
|
case 'conversation_list':
|
|
5820
5876
|
return await rpc('conversation_list', args);
|
|
5821
5877
|
|
|
5878
|
+
case 'conversation_action_send_message':
|
|
5879
|
+
return JSON.stringify(await api('POST', `/api/v1/conversations/${Number(args.conversationId)}/messages`, { text: args.text, agentId: args.agentId }));
|
|
5880
|
+
case 'conversation_action_resolve':
|
|
5881
|
+
return JSON.stringify(await api('POST', `/api/v1/conversations/${Number(args.conversationId)}/resolve`, { topic: args.topic }));
|
|
5882
|
+
case 'conversation_action_assign':
|
|
5883
|
+
return JSON.stringify(await api('POST', `/api/v1/conversations/${Number(args.conversationId)}/assign`, { agentId: args.agentId }));
|
|
5884
|
+
case 'conversation_action_notes':
|
|
5885
|
+
return JSON.stringify(await api('GET', `/api/v1/conversations/${Number(args.conversationId)}/notes`));
|
|
5822
5886
|
case 'conversation_get':
|
|
5823
5887
|
return await rpc('conversation_get', args);
|
|
5824
5888
|
|
|
@@ -6392,7 +6456,7 @@ reply: ${r?.reply}`;
|
|
|
6392
6456
|
}
|
|
6393
6457
|
|
|
6394
6458
|
// POST api/v1/contacts -> PublicApiController.UpsertContact
|
|
6395
|
-
case '
|
|
6459
|
+
case 'contacts_api_upsert': {
|
|
6396
6460
|
const r = await api('POST', '/api/v1/contacts', args);
|
|
6397
6461
|
return `${r.created ? 'Created' : 'Updated'} contact #${r.id} (${r.email})${r.tags?.length ? ' tags: ' + r.tags.join(', ') : ''}`;
|
|
6398
6462
|
}
|
|
@@ -6437,6 +6501,20 @@ reply: ${r?.reply}`;
|
|
|
6437
6501
|
return JSON.stringify(r, null, 2);
|
|
6438
6502
|
}
|
|
6439
6503
|
|
|
6504
|
+
// PublicApiOpsController: availability, team detail, webhook catalog and test
|
|
6505
|
+
case 'public_api_ops_lookup': {
|
|
6506
|
+
const { what, id, teamId } = args || {};
|
|
6507
|
+
if (what === 'agent_availability') return JSON.stringify(await api('GET', `/api/v1/agents/availability${teamId ? '?teamId=' + encodeURIComponent(teamId) : ''}`), null, 2);
|
|
6508
|
+
if (what === 'webhook_events') return JSON.stringify(await api('GET', '/api/v1/webhooks/events'), null, 2);
|
|
6509
|
+
if (what === 'team' || what === 'webhook_test') {
|
|
6510
|
+
if (!id) throw new Error('id is required for ' + what);
|
|
6511
|
+
return what === 'team'
|
|
6512
|
+
? JSON.stringify(await api('GET', `/api/v1/teams/${encodeURIComponent(id)}`), null, 2)
|
|
6513
|
+
: JSON.stringify(await api('POST', `/api/v1/webhooks/${encodeURIComponent(id)}/test`, {}), null, 2);
|
|
6514
|
+
}
|
|
6515
|
+
throw new Error('what must be agent_availability, team, webhook_events or webhook_test');
|
|
6516
|
+
}
|
|
6517
|
+
|
|
6440
6518
|
// /api/v1/webhooks -> PublicApiWriteController
|
|
6441
6519
|
case 'public_api_webhooks': {
|
|
6442
6520
|
const { action, url, events, id } = args || {};
|