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

# autogen.oai.client_utils.should_hide_tools

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

#### should\_hide\_tools

```python theme={null}
should_hide_tools(
    messages: list[dict[str, Any]],
    tools: list[dict[str, Any]],
    hide_tools_param: str
) -> bool
```

Determines if tools should be hidden. This function is used to hide tools when they have been run, minimising the chance of the LLM choosing them when they shouldn't.<br />Parameters: <br />    messages (List\[Dict\[str, Any]]): List of messages
tools (List\[Dict\[str, Any]]): List of tools
hide\_tools\_param (str): "hide\_tools" parameter value. Can be "if\_all\_run" (hide tools if all tools have been run), "if\_any\_run" (hide tools if any of the tools have been run), "never" (never hide tools). Default is "never".<br />Returns: <br />    bool: Indicates whether the tools should be excluded from the response create request

Example Usage:

````python theme={null}
    # Validating a numerical parameter within specific bounds
    messages = params.get("messages", [])
    tools = params.get("tools", None)
    hide_tools = should_hide_tools(messages, tools, params["hide_tools"])

<b>Parameters:</b>
| Name | Description |
|--|--|
| `messages` | **Type:** list[dict[str, typing.Any]] |
| `tools` | **Type:** list[dict[str, typing.Any]] |
| `hide_tools_param` | **Type:** str |

<b>Returns:</b>
| Type | Description |
|--|--|
| bool | bool: Indicates whether the tools should be excluded from the response create request Example Usage: ```python # Validating a numerical parameter within specific bounds messages = params.get("messages", []) tools = params.get("tools", None) hide_tools = should_hide_tools(messages, tools, params["hide_tools"]) |

<br />
````
