@amitdeshmukh/ax-crew 8.0.1 → 8.0.2
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.
|
@@ -54,7 +54,13 @@ const initializeMCPServers = async (agentConfigData) => {
|
|
|
54
54
|
const mcpClient = new AxMCPClient(transport, { debug: agentConfigData.debug || false });
|
|
55
55
|
await mcpClient.init();
|
|
56
56
|
initializedClients.push(mcpClient);
|
|
57
|
-
|
|
57
|
+
// Normalize MCP tool schemas: some MCP servers omit `parameters` for
|
|
58
|
+
// zero-arg tools, but providers like Gemini require a valid schema.
|
|
59
|
+
const mcpFns = mcpClient.toFunction().map(fn => ({
|
|
60
|
+
...fn,
|
|
61
|
+
parameters: fn.parameters ?? { type: 'object', properties: {} },
|
|
62
|
+
}));
|
|
63
|
+
functions.push(...mcpFns);
|
|
58
64
|
}
|
|
59
65
|
return functions;
|
|
60
66
|
}
|
package/package.json
CHANGED
|
@@ -73,7 +73,13 @@ const initializeMCPServers = async (agentConfigData: AgentConfig): Promise<AxFun
|
|
|
73
73
|
const mcpClient = new AxMCPClient(transport, {debug: agentConfigData.debug || false});
|
|
74
74
|
await mcpClient.init();
|
|
75
75
|
initializedClients.push(mcpClient);
|
|
76
|
-
|
|
76
|
+
// Normalize MCP tool schemas: some MCP servers omit `parameters` for
|
|
77
|
+
// zero-arg tools, but providers like Gemini require a valid schema.
|
|
78
|
+
const mcpFns = mcpClient.toFunction().map(fn => ({
|
|
79
|
+
...fn,
|
|
80
|
+
parameters: fn.parameters ?? { type: 'object' as const, properties: {} },
|
|
81
|
+
}));
|
|
82
|
+
functions.push(...mcpFns);
|
|
77
83
|
}
|
|
78
84
|
|
|
79
85
|
return functions;
|