# `ADK.Tool`
[🔗](https://github.com/zeroasterisk/adk-elixir/blob/main/lib/adk/tool.ex#L1)

The tool behaviour. Tools are functions that agents can call.

# `result`

```elixir
@type result() :: {:ok, term()} | {:error, term()}
```

# `description`

```elixir
@callback description() :: String.t()
```

Human-readable description.

# `name`

```elixir
@callback name() :: String.t()
```

Tool name for LLM function calling.

# `parameters`
*optional* 

```elixir
@callback parameters() :: map()
```

JSON Schema for parameters.

# `run`

```elixir
@callback run(ctx :: ADK.ToolContext.t(), args :: map()) :: result()
```

Execute the tool.

# `builtin?`

```elixir
@spec builtin?(map()) :: boolean()
```

Check if a tool is a Gemini built-in (google_search, code_execution, etc).

Built-in tools are sent to the Gemini API as native capability flags rather
than function declarations.

# `declaration`

```elixir
@spec declaration(map()) :: map()
```

Build a function declaration from a tool struct.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
