Skip to content

armgit / camel

Public Imported from GitHub
0

🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

Auto-update documentation after merge

camel-docs-boted558507df7b
diff --git a/docs/mintlify/reference/camel.agents.mcp_agent.mdx b/docs/mintlify/reference/camel.agents.mcp_agent.mdx
index b27c542f9..388e79993 100644
--- a/docs/mintlify/reference/camel.agents.mcp_agent.mdx
+++ b/docs/mintlify/reference/camel.agents.mcp_agent.mdx
@@ -35,7 +35,6 @@ def __init__(
local_config_path: Optional[str] = None,
tools: Optional[List[Union[FunctionTool, Callable]]] = None,
function_calling_available: bool = True,
- strict: bool = False,
**kwargs
):
```
diff --git a/docs/mintlify/reference/camel.toolkits.function_tool.mdx b/docs/mintlify/reference/camel.toolkits.function_tool.mdx
index a6120a127..e457b40be 100644
--- a/docs/mintlify/reference/camel.toolkits.function_tool.mdx
+++ b/docs/mintlify/reference/camel.toolkits.function_tool.mdx
@@ -83,7 +83,9 @@ def sanitize_and_enforce_required(parameters_dict):
Cleans and updates the function schema to conform with OpenAI's
requirements:
- Removes invalid 'default' fields from the parameters schema.
-- Ensures all fields or function parameters are marked as required.
+- Ensures all fields are marked as required or have null type for optional
+fields.
+- Recursively adds additionalProperties: false to all nested objects.
**Parameters:**
@@ -92,7 +94,7 @@ requirements:
**Returns:**
dict: The updated dictionary with invalid defaults removed and all
-fields set as required.
+fields properly configured for strict mode.
<a id="camel.toolkits.function_tool.generate_docstring"></a>
diff --git a/docs/mintlify/reference/camel.toolkits.mcp_toolkit.mdx b/docs/mintlify/reference/camel.toolkits.mcp_toolkit.mdx
index d0b5081c2..870f4005d 100644
--- a/docs/mintlify/reference/camel.toolkits.mcp_toolkit.mdx
+++ b/docs/mintlify/reference/camel.toolkits.mcp_toolkit.mdx
@@ -76,7 +76,6 @@ await toolkit.disconnect()
- **config_path** (Optional[str], optional): Path to a JSON configuration file defining MCP servers. The file should contain server configurations in the standard MCP format. (default: :obj:`None`)
- **config_dict** (Optional[Dict[str, Any]], optional): Dictionary containing MCP server configurations in the same format as the config file. This allows for programmatic configuration without file I/O. (default: :obj:`None`)
- **timeout** (Optional[float], optional): Timeout for connection attempts in seconds. This timeout applies to individual client connections. (default: :obj:`None`)
-- **strict** (Optional[bool], optional): Flag to indicate strict mode. (default: :obj:`False`)
- **clients** (List[MCPClient]): List of :obj:`MCPClient` instances being managed by this toolkit.
<a id="camel.toolkits.mcp_toolkit.MCPToolkit.__init__"></a>
@@ -89,8 +88,7 @@ def __init__(
clients: Optional[List[MCPClient]] = None,
config_path: Optional[str] = None,
config_dict: Optional[Dict[str, Any]] = None,
- timeout: Optional[float] = None,
- strict: Optional[bool] = False
+ timeout: Optional[float] = None
):
```
@@ -162,8 +160,7 @@ def create_sync(
clients: Optional[List[MCPClient]] = None,
config_path: Optional[str] = None,
config_dict: Optional[Dict[str, Any]] = None,
- timeout: Optional[float] = None,
- strict: Optional[bool] = False
+ timeout: Optional[float] = None
):
```
@@ -199,6 +196,25 @@ def _create_client_from_config(self, name: str, cfg: Dict[str, Any]):
Create a single MCP client from configuration.
+<a id="camel.toolkits.mcp_toolkit.MCPToolkit._ensure_strict_tool_schema"></a>
+
+### _ensure_strict_tool_schema
+
+```python
+def _ensure_strict_tool_schema(self, tool: FunctionTool):
+```
+
+Ensure a tool has a strict schema compatible with OpenAI's
+requirements.
+
+**Parameters:**
+
+- **tool** (FunctionTool): The tool to check and update if necessary.
+
+**Returns:**
+
+ FunctionTool: The tool with a strict schema.
+
<a id="camel.toolkits.mcp_toolkit.MCPToolkit.get_tools"></a>
### get_tools
@@ -210,8 +226,9 @@ def get_tools(self):
**Returns:**
List[FunctionTool]: Combined list of all available function tools
-from all connected MCP servers. Returns an empty list if no
-clients are connected or if no tools are available.
+from all connected MCP servers with strict schemas. Returns an
+empty list if no clients are connected or if no tools are
+available.
<a id="camel.toolkits.mcp_toolkit.MCPToolkit.get_text_tools"></a>
diff --git a/docs/mintlify/reference/camel.utils.mcp_client.mdx b/docs/mintlify/reference/camel.utils.mcp_client.mdx
index dfec0fcf3..9ae71eeab 100644
--- a/docs/mintlify/reference/camel.utils.mcp_client.mdx
+++ b/docs/mintlify/reference/camel.utils.mcp_client.mdx
@@ -69,7 +69,6 @@ connectionmanagement.
- **config** (Union[ServerConfig, Dict[str, Any]]): Server configuration as either a :obj:`ServerConfig` object or a dictionary that will be converted to a :obj:`ServerConfig`. The configuration determines the transport type and connection parameters.
- **client_info** (Optional[types.Implementation], optional): Client implementation information to send to the server during initialization. (default: :obj:`None`)
- **timeout** (Optional[float], optional): Timeout for waiting for messages from the server in seconds. (default: :obj:`10.0`)
-- **strict** (Optional[bool], optional): Strict mode for generating FunctionTool objects. (default: :obj:`False`)
- **config** (ServerConfig): The server configuration object.
- **client_info** (Optional[types.Implementation]): Client implementation information.
- **read_timeout_seconds** (timedelta): Timeout for reading from the server.
@@ -83,8 +82,7 @@ def __init__(
self,
config: Union[ServerConfig, Dict[str, Any]],
client_info: Optional[types.Implementation] = None,
- timeout: Optional[float] = 10.0,
- strict: Optional[bool] = False
+ timeout: Optional[float] = 10.0
):
```
@@ -238,7 +236,7 @@ as it handles configuration validation and type conversion automatically.
**Parameters:**
- **config** (Union[Dict[str, Any], ServerConfig]): Server configuration as either a dictionary or a :obj:`ServerConfig` object. If a dictionary is provided, it will be automatically converted to
-- **a**: obj:`ServerConfig`. **kwargs: Additional keyword arguments passed to the :obj:`MCPClient` constructor, such as :obj:`client_info`, :obj:`timeout`, and :obj:`strict`.
+- **a**: obj:`ServerConfig`. **kwargs: Additional keyword arguments passed to the :obj:`MCPClient` constructor, such as :obj:`client_info`, :obj:`timeout`.
**Returns:**