@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
- functions.push(...mcpClient.toFunction());
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@amitdeshmukh/ax-crew",
4
- "version": "8.0.1",
4
+ "version": "8.0.2",
5
5
  "description": "Build and launch a crew of AI agents with shared state. Built with axllm.dev",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -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
- functions.push(...mcpClient.toFunction());
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;