> ## 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.

# Add Tool • AI Agent SDK

> add_tool: Add a tool to the allowlist.

# add\_tool

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

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

Add a tool to the allowlist.

```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: add_tool"]
    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 add_tool(tool_name: str, paths: Optional[List[str]], session_only: bool) -> None
```

## Parameters

<ParamField query="tool_name" type="str" required={true}>
  Name of the tool to allow
</ParamField>

<ParamField query="paths" type="Optional" required={false}>
  Optional list of allowed paths (empty = all paths)
</ParamField>

<ParamField query="session_only" type="bool" required={false} default="False">
  If True, permission expires with session
</ParamField>

## Uses

* `ToolPermission`
* `add`

## Used By

* [`PermissionAllowlist.load`](../functions/PermissionAllowlist-load)

## Source

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

***

## Related Documentation

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

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

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