> ## Documentation Index
> Fetch the complete documentation index at: https://phaseo.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Tools

> Define validated, approval-gated, manual, and progress-producing Ruby tools.

Create `PhaseoAgentSdk::Tool` values and pass them through `define_tool`. Tools can include:

* JSON `parameters` shown to the model
* `input_schema`, `output_schema`, and `event_schema` validation callbacks
* `timeout_ms` and an `execute` callback
* boolean or callable `require_approval`
* `on_tool_called` and `on_response_received` for interactive work
* `next_turn_params` and `on_error: "return-to-model"`

Use `runtime.emit_progress` for preliminary results and `set_context` for application context. Bounded threads can execute independent tools concurrently while saved results remain in model call order.

## Related

* [State and approval](./agent-sdk-state-and-approval)
* [Run controls](./agent-sdk-run-controls)
