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

# Tool Decorator

> Reference for the @tool decorator.

The `@tool` decorator converts a function into a `Function` that agents can call. Use it bare (`@tool`) or with the parameters below (`@tool(...)`).

```python theme={null}
from agno.tools import tool
```

## Parameters

| Parameter | Type | Description |
| - | - | - |
| `name` | `str` | Override for the function name |
| `description` | `str` | Override for the function description |
| `strict` | `bool` | If True, enforces strict parameter checking on the function schema |
| `instructions` | `str` | Instructions for using the tool |
| `add_instructions` | `bool` | If True, adds the tool instructions to the system message (default: True) |
| `show_result` | `bool` | If True, shows the result after the function call |
| `stop_after_tool_call` | `bool` | If True, the agent will stop after the function call |
| `tool_hooks` | `list[Callable]` | List of hooks that wrap the function execution |
| `pre_hook` | `Callable` | Hook to run before the function is executed |
| `post_hook` | `Callable` | Hook to run after the function is executed |
| `requires_confirmation` | `bool` | If True, requires user confirmation before execution |
| `requires_user_input` | `bool` | If True, requires user input before execution |
| `user_input_fields` | `list[str]` | List of fields that require user input |
| `external_execution` | `bool` | If True, the tool will be executed outside of the agent's control |
| `external_execution_silent` | `bool` | If True (with `external_execution=True`), suppresses verbose paused messages |
| `cache_results` | `bool` | If True, enables caching of function results |
| `cache_dir` | `str` | Directory to store cache files |
| `cache_ttl` | `int` | Time-to-live for cached results in seconds (default: 3600) |

`requires_confirmation`, `requires_user_input`, and `external_execution` are mutually exclusive. Enable at most one for a tool.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.