> ## Documentation Index
> Fetch the complete documentation index at: https://docs.camel-ai.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Camel.toolkits.base

<a id="camel.toolkits.base" />

<a id="camel.toolkits.base.manual_timeout" />

## manual\_timeout

```python theme={"system"}
def manual_timeout(func: F):
```

Decorator to mark a function as having manual timeout handling.

Use this decorator on toolkit methods that manage their own timeout logic
internally but don't have a `timeout` parameter in their signature.
This prevents the automatic `with_timeout` wrapper from being applied
by `BaseToolkit`.

**Parameters:**

* **func** (F): The function to mark as having manual timeout handling.

**Returns:**

F: The same function with `_manual_timeout` attribute set to True.

<a id="camel.toolkits.base.BaseToolkit" />

## BaseToolkit

```python theme={"system"}
class BaseToolkit:
```

Base class for toolkits.

**Parameters:**

* **timeout** (Optional\[float]): The timeout for the toolkit.

<a id="camel.toolkits.base.BaseToolkit.__init__" />

### **init**

```python theme={"system"}
def __init__(self, timeout: Optional[float] = Constants.TIMEOUT_THRESHOLD):
```

<a id="camel.toolkits.base.BaseToolkit.__init_subclass__" />

### **init\_subclass**

```python theme={"system"}
def __init_subclass__(cls, **kwargs):
```

<a id="camel.toolkits.base.BaseToolkit.get_tools" />

### get\_tools

```python theme={"system"}
def get_tools(self):
```

**Returns:**

List\[FunctionTool]: A list of FunctionTool objects
representing the functions in the toolkit.

<a id="camel.toolkits.base.BaseToolkit.run_mcp_server" />

### run\_mcp\_server

```python theme={"system"}
def run_mcp_server(self, mode: Literal['stdio', 'sse', 'streamable-http']):
```

Run the MCP server in the specified mode.

**Parameters:**

* **mode** (`Literal["stdio", "sse", "streamable-http"]`): The mode to run the MCP server in.

<a id="camel.toolkits.base.RegisteredAgentToolkit" />

## RegisteredAgentToolkit

```python theme={"system"}
class RegisteredAgentToolkit:
```

Mixin class for toolkits that need to register a ChatAgent.

This mixin provides a standard interface for toolkits that require
a reference to a ChatAgent instance. The ChatAgent will check if a
toolkit has this mixin and automatically register itself.

<a id="camel.toolkits.base.RegisteredAgentToolkit.__init__" />

### **init**

```python theme={"system"}
def __init__(self):
```

<a id="camel.toolkits.base.RegisteredAgentToolkit.agent" />

### agent

```python theme={"system"}
def agent(self):
```

**Returns:**

Optional\[ChatAgent]: The registered agent, or None if not
registered.

**Note:**

If None is returned, it means the toolkit has not been registered
with a ChatAgent yet. Make sure to pass this toolkit to a ChatAgent
via the toolkits parameter during initialization.

<a id="camel.toolkits.base.RegisteredAgentToolkit.register_agent" />

### register\_agent

```python theme={"system"}
def register_agent(self, agent: 'ChatAgent'):
```

Register a ChatAgent with this toolkit.

This method allows registering an agent after initialization. The
ChatAgent will automatically call this method if the toolkit to
register inherits from RegisteredAgentToolkit.

**Parameters:**

* **agent** (ChatAgent): The ChatAgent instance to register.
