> ## 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 Python tools.

Create `AgentTool` values and pass them through `define_tool(...)`. Tools can define:

* JSON `parameters` shown to the model
* callable `input_schema`, `output_schema`, and `event_schema` validators
* `timeout_ms` and `execute(input, runtime)`
* boolean or callable `require_approval`
* `on_tool_called` and `on_response_received` for interactive work
* `next_turn_params` and `on_error="return-to-model"`

Call `runtime.emit_progress(value)` for preliminary results and `runtime.set_context(value)` when later turns need updated application context.

Use `AgentToolExecutionConfig(tool_concurrency=...)` for independent tools. Saved results retain model call order even when execution overlaps.

## Related

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