# `LlmCore.Agent.ToolDispatch.Event`
[🔗](https://github.com/fosferon/llm_core/blob/v0.3.0/lib/llm_core/agent/tool_dispatch/event.ex#L1)

Event struct flowing through the ToolDispatch pipeline.

Created by `DispatchTools` when it detects a tool call with a registered
dispatch recipe. Carries all context needed for dispatch orchestration.

## Fields

### Input — set by DispatchTools before pipeline entry

  * `call` — The original `%Call{}` that triggered dispatch
  * `resolve_fn` — Function to execute individual tool calls
  * `recipe` — Recipe function or `nil` for passthrough

### Pipeline state — populated by stages

  * `strategy` — `:passthrough` or `:recipe`
  * `plan` — Execution plan from recipe evaluation
  * `serial_results` — Results from serial step execution
  * `serial_context` — Accumulated context from serial results
  * `current_step` — Current parallel step being executed
  * `total_parallel` — Total number of parallel steps expected
  * `step_result` — Result of the current parallel step
  * `parallel_results` — Collected parallel step results
  * `errors` — Accumulated errors from any failed steps

### Output — read by DispatchTools after pipeline exit

  * `result` — Final composed string result
  * `status` — `:ok` or `:error`
  * `error` — Error detail when `status == :error`

# `t`

```elixir
@type t() :: %LlmCore.Agent.ToolDispatch.Event{
  call: LlmToolkit.Tool.Call.t() | nil,
  current_step: map() | nil,
  error: term() | nil,
  errors: [map()],
  parallel_results: [map()],
  plan: map() | nil,
  recipe: (map() -&gt; map()) | nil,
  resolve_fn:
    (LlmToolkit.Tool.Call.t() -&gt; {:ok, String.t()} | {:error, String.t()}) | nil,
  result: String.t() | nil,
  serial_context: map(),
  serial_results: [map()],
  status: :ok | :error,
  step_result: map() | nil,
  strategy: :passthrough | :recipe,
  total_parallel: non_neg_integer()
}
```

---

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