> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-himanshu-v3-tools-models-docs.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                                                                                                                                                                                                                                              |
| `title`                     | `str`            | Human-readable display title for the tool. Not sent to the model; read when the tool is published over AgentOS MCP                                                                                                                                                          |
| `description`               | `str`            | Override for the function description                                                                                                                                                                                                                                       |
| `annotations`               | `Dict[str, Any]` | MCP tool annotations. Allowed keys: `title`, `readOnlyHint`, `destructiveHint`, `idempotentHint`, `openWorldHint`. An unknown key raises `ValueError`; hints must be booleans and `title` a string. Not sent to the model; read when the tool is published over AgentOS MCP |
| `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.
