# Type Alias: AgentToolsFn()

```ts
type AgentToolsFn = (plugins: Plugins) => AgentTools;

```

Function form of `AgentDefinition.tools`. Receives the typed [Plugins](./docs/api/appkit/TypeAlias.Plugins.md) map and returns a tool record. Invoked exactly once at setup (or once per `runAgent` call in standalone mode); the result is cached as the agent's resolved tool record.

Use the function form when an agent needs tools from registered plugins. The bare object form is fine when an agent only uses inline tools.

## Parameters[​](#parameters "Direct link to Parameters")

| Parameter | Type                                                      |
| --------- | --------------------------------------------------------- |
| `plugins` | [`Plugins`](./docs/api/appkit/TypeAlias.Plugins.md) |

## Returns[​](#returns "Direct link to Returns")

[`AgentTools`](./docs/api/appkit/TypeAlias.AgentTools.md)
