@velaro/mcp-server 0.6.76 → 0.6.77
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 +18 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velaro/mcp-server",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.77",
|
|
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
|
@@ -4151,6 +4151,7 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
|
|
|
4151
4151
|
description: { type: 'string', description: 'New description' },
|
|
4152
4152
|
contactSales: { type: 'boolean', description: 'Set true to hide price and show "Contact sales"' },
|
|
4153
4153
|
isActive: { type: 'boolean', description: 'Set false to deactivate (hide from catalog)' },
|
|
4154
|
+
limits: { type: 'object', description: 'Plan limit keys merged into MetadataJson (numbers): aiTokensPerMonth, includedMcpCalls, apiCallsPerMonth, webhookInvocationsPerMonth, httpActionsPerMonth, emailSendsPerMonth, blobUploadMbPerMonth. Other keys are preserved.' },
|
|
4154
4155
|
},
|
|
4155
4156
|
required: ['packageKey'],
|
|
4156
4157
|
},
|
|
@@ -9281,6 +9282,13 @@ async function handleTool(name, args) {
|
|
|
9281
9282
|
for (const p of items) {
|
|
9282
9283
|
const price = p.contactSales ? 'Contact sales' : (p.monthlyPriceCents ? `$${(p.monthlyPriceCents/100).toFixed(0)}${p.unitLabel||'/mo'}` : 'Free');
|
|
9283
9284
|
lines.push(` ${p.packageKey.padEnd(40)} ${price.padEnd(18)} v${p.version} ${p.displayName}`);
|
|
9285
|
+
if (p.packageType === 'plan' && p.metadataJson) {
|
|
9286
|
+
try {
|
|
9287
|
+
const m = JSON.parse(p.metadataJson);
|
|
9288
|
+
const lim = ['aiTokensPerMonth','includedMcpCalls','apiCallsPerMonth','webhookInvocationsPerMonth','httpActionsPerMonth','emailSendsPerMonth','blobUploadMbPerMonth'].filter(k => m[k] != null).map(k => `${k}=${m[k]}`);
|
|
9289
|
+
if (lim.length) lines.push(` limits: ${lim.join(' ')}`);
|
|
9290
|
+
} catch { /* ignore bad metadata */ }
|
|
9291
|
+
}
|
|
9284
9292
|
}
|
|
9285
9293
|
}
|
|
9286
9294
|
return lines.join('\n');
|
|
@@ -9295,6 +9303,16 @@ async function handleTool(name, args) {
|
|
|
9295
9303
|
if (args.description) payload.description = args.description;
|
|
9296
9304
|
if (args.contactSales != null) payload.contactSales = args.contactSales;
|
|
9297
9305
|
if (args.isActive != null) payload.isActive = args.isActive;
|
|
9306
|
+
if (args.limits && typeof args.limits === 'object') {
|
|
9307
|
+
const LIMIT_KEYS = ['aiTokensPerMonth','includedMcpCalls','apiCallsPerMonth','webhookInvocationsPerMonth','httpActionsPerMonth','emailSendsPerMonth','blobUploadMbPerMonth'];
|
|
9308
|
+
const bad = Object.keys(args.limits).filter(k => !LIMIT_KEYS.includes(k));
|
|
9309
|
+
if (bad.length) throw new Error(`Unknown limit keys: ${bad.join(', ')}`);
|
|
9310
|
+
const all = await api('GET', '/Pricing/catalog');
|
|
9311
|
+
const cur = (Array.isArray(all) ? all : []).find(p => p.packageKey === args.packageKey);
|
|
9312
|
+
let meta = {};
|
|
9313
|
+
try { meta = cur?.metadataJson ? JSON.parse(cur.metadataJson) : {}; } catch { meta = {}; }
|
|
9314
|
+
payload.metadataJson = JSON.stringify({ ...meta, ...args.limits });
|
|
9315
|
+
}
|
|
9298
9316
|
const result = await api('PUT', `/Pricing/catalog/${args.packageKey}`, payload);
|
|
9299
9317
|
return `✅ Package '${result.packageKey}' updated to v${result.version}.`;
|
|
9300
9318
|
}
|