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

# Filter Tools • AI Agent SDK

> filter_tools: Return a copy of ``tools`` with denied/disallowed tools removed.

# filter\_tools

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**ToolPolicy**](../classes/ToolPolicy) class in the [**protocols**](../modules/protocols) module.

Return a copy of `tools` with denied/disallowed tools removed.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#8B0000', 'primaryTextColor': '#fff', 'primaryBorderColor': '#710101', 'lineColor': '#189AB4', 'secondaryColor': '#189AB4', 'tertiaryColor': '#fff' }}}%%

graph LR
    agent["Agent"] -- "uses" --> tool["Tool: filter_tools"]
    tool -- "returns" --> result["Result"]
    style tool fill:#189AB4,color:#fff
    style agent fill:#8B0000,color:#fff
    style result fill:#8B0000,color:#fff
```

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def filter_tools(tools: Optional[List[Any]]) -> List[Any]
```

## Parameters

<ParamField query="tools" type="Optional" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="List[Any]">
  The result of the operation.
</ResponseField>

## Uses

* `is_tool_allowed`

## Used By

* [`filter_tools_with_allowed_tools`](../functions/filter_tools_with_allowed_tools)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L1660">
  `praisonaiagents/gateway/protocols.py` at line 1660
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Tools Concept" icon="wrench" href="/docs/docs/concepts/tools" />

  <Card title="Create Custom Tools" icon="plus" href="/docs/docs/guides/tools/create-custom-tools" />

  <Card title="Tool Development" icon="code" href="/docs/docs/tutorials/advanced-tool-development" />
</CardGroup>
