# `Jido.AI.Directive.EmitToolError`
[🔗](https://github.com/agentjido/jido_ai/blob/v2.4.0/lib/jido_ai/directive/emit_tool_error.ex#L1)

Directive to immediately emit a tool error result signal.

Used when a tool cannot be executed (e.g., unknown tool name, configuration error).
This directive ensures the Machine receives a tool_result signal and doesn't deadlock
waiting for a response that will never arrive.

Unlike `ToolExec`, this directive does not spawn a task - it synchronously emits
an error signal back to the agent.

# `t`

```elixir
@type t() :: %Jido.AI.Directive.EmitToolError{
  error: any(),
  id: binary(),
  metadata: map(),
  tool_name: binary()
}
```

# `new!`

Create a new EmitToolError directive.

---

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