@velaro/mcp-server 2.0.146 → 2.0.148
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 +2 -1
- package/parity/campaign-audience.customer.js +42 -0
- package/parity/moshky-guide.customer.js +69 -0
- package/server.js +10760 -10756
- package/tool-annotations.js +1 -0
- package/tool-schema.js +30 -0
package/tool-annotations.js
CHANGED
|
@@ -34,6 +34,7 @@ const MUTATING = new Set([
|
|
|
34
34
|
|
|
35
35
|
// Names that look like writes but only read (checked before the write rules).
|
|
36
36
|
const READ_ONLY_EXPLICIT = new Set([
|
|
37
|
+
'velaro_guide',
|
|
37
38
|
'activity_logs', 'ai_field_extraction_fields', 'keyword_intelligence_top',
|
|
38
39
|
'keyword_intelligence_conversations', 'knowledge_advisor_advise', 'quality_sentiment',
|
|
39
40
|
'quality_agent_performance', 'quality_low_scores', 'quality_calibration', 'appointments_find_open_slots',
|
package/tool-schema.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Every MCP tool must publish inputSchema {type:'object', properties:{...}}.
|
|
2
|
+
// Claude Code rejects the WHOLE tool list when one tool has a malformed schema
|
|
3
|
+
// (usage_alerts shipped without one and took ~875 tools down for a customer on site 2121).
|
|
4
|
+
// Build-time guard: scripts/validate-mcp-tool-schemas.js and mcp/tool-schema.test.js.
|
|
5
|
+
// Runtime safety net: normalizeTool() is applied to every tool at list time.
|
|
6
|
+
|
|
7
|
+
const isObj = (v) => v && typeof v === 'object' && !Array.isArray(v);
|
|
8
|
+
|
|
9
|
+
export function schemaProblem(tool) {
|
|
10
|
+
const s = tool && tool.inputSchema;
|
|
11
|
+
if (!isObj(s)) return 'inputSchema is missing';
|
|
12
|
+
if (s.type !== 'object') return "inputSchema.type must be 'object'";
|
|
13
|
+
if (!isObj(s.properties)) return 'inputSchema.properties must be an object';
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function normalizeTool(tool) {
|
|
18
|
+
if (schemaProblem(tool) === null) return tool;
|
|
19
|
+
const s = isObj(tool && tool.inputSchema) ? tool.inputSchema : {};
|
|
20
|
+
return { ...tool, inputSchema: { ...s, type: 'object', properties: isObj(s.properties) ? s.properties : {} } };
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function assertToolSchemas(tools) {
|
|
24
|
+
const bad = [];
|
|
25
|
+
for (const t of tools) {
|
|
26
|
+
const p = schemaProblem(t);
|
|
27
|
+
if (p) bad.push(`${t && t.name}: ${p}`);
|
|
28
|
+
}
|
|
29
|
+
return bad;
|
|
30
|
+
}
|