> ## Documentation Index
> Fetch the complete documentation index at: https://private-04b27de1.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# autogen.agentchat.group.group_utils.make_remove_function

<code class="doc-symbol doc-symbol-heading doc-symbol-function" />

#### make\_remove\_function

```python theme={null}
make_remove_function(tool_msgs_to_remove: list[str]) -> Callable[[list[dict[str, Any]]], list[dict[str, Any]]]
```

Create a function to remove messages with tool calls from the messages list.<br />The returned function can be registered as a hook to "process\_all\_messages\_before\_reply"" to remove messages with tool calls.

<b>Parameters:</b>

| Name                  | Description          |
| --------------------- | -------------------- |
| `tool_msgs_to_remove` | **Type:** list\[str] |

<br />
