@velaro/mcp-server 2.0.72 → 2.0.74

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 +34 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velaro/mcp-server",
3
- "version": "2.0.72",
3
+ "version": "2.0.74",
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
@@ -625,6 +625,11 @@ const TOOLS = [
625
625
  required: ['id'],
626
626
  },
627
627
  },
628
+ {
629
+ name: 'get_api_usage',
630
+ description: 'Show the current site API usage against its plan limits: API calls today and this month, API keys and active webhook endpoints (used, limit, percent; limit 0 = no cap). Read-only. Limits come from the plan; to raise them use Billing.',
631
+ inputSchema: { type: 'object', properties: {} },
632
+ },
628
633
  {
629
634
  name: 'kb_get_settings',
630
635
  description: 'Get the current site\'s Knowledge Base settings: branding (theme color/preset, logo, header text), domain, layout preferences, and SEO/analytics config (meta description, GA4 measurement ID).',
@@ -1590,6 +1595,19 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
1590
1595
  required: ['email'],
1591
1596
  },
1592
1597
  },
1598
+ {
1599
+ name: 'contact_update',
1600
+ description: "Partially update one contact by id (PATCH /api/v1/contacts/{id}, scope write:contacts). Only the fields sent change; 404 if the contact is not on this site, 409 if the new email belongs to another contact.",
1601
+ inputSchema: {
1602
+ type: 'object',
1603
+ properties: {
1604
+ contactId: { type: 'number' }, email: { type: 'string' }, firstName: { type: 'string' }, lastName: { type: 'string' },
1605
+ phone: { type: 'string' }, mobile: { type: 'string' }, company: { type: 'string' }, jobTitle: { type: 'string' },
1606
+ tags: { type: 'array', items: { type: 'string' } },
1607
+ },
1608
+ required: ['contactId'],
1609
+ },
1610
+ },
1593
1611
  {
1594
1612
  name: 'contact_tag',
1595
1613
  description: "Tag a contact by email (or contactId); the tag is created if new (POST /api/v1/contacts/tag).",
@@ -5433,6 +5451,14 @@ async function handleTool(name, args) {
5433
5451
  return `${updateResult?.message || 'Updated article'} [${args.id}] "${args.title}".`;
5434
5452
  }
5435
5453
 
5454
+ case 'get_api_usage': {
5455
+ const d = await api('GET', '/ApiKeys');
5456
+ return JSON.stringify({
5457
+ apiAccessEnabled: d.enableApiAccess, callsPerMinuteLimit: d.rateLimitPerMinute, usage: d.usage,
5458
+ note: 'A limit of 0 means no cap applies to that metric.',
5459
+ }, null, 2);
5460
+ }
5461
+
5436
5462
  case 'kb_get_settings': {
5437
5463
  const s = await api('GET', '/api/kb/settings');
5438
5464
  return JSON.stringify(s, null, 2);
@@ -6178,6 +6204,14 @@ reply: ${r?.reply}`;
6178
6204
  return `${r.created ? 'Created' : 'Updated'} contact #${r.id} (${r.email})${r.tags?.length ? ' tags: ' + r.tags.join(', ') : ''}`;
6179
6205
  }
6180
6206
 
6207
+ // PATCH api/v1/contacts/{id} -> PublicApiController.PatchContact
6208
+ case 'contact_update': {
6209
+ const { contactId, ...body } = args || {};
6210
+ if (!contactId) return 'Error: contactId is required.';
6211
+ const r = await api('PATCH', `/api/v1/contacts/${encodeURIComponent(contactId)}`, body);
6212
+ return `Updated contact #${r.id} (${r.email})${r.tags?.length ? ' tags: ' + r.tags.join(', ') : ''}`;
6213
+ }
6214
+
6181
6215
  // POST api/v1/contacts/tag -> PublicApiController.TagContact
6182
6216
  case 'contact_tag': {
6183
6217
  const r = await api('POST', '/api/v1/contacts/tag', args);