Jido.AI.Directive.EmitToolError (Jido AI v2.2.0)

Copy Markdown View Source

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.

Summary

Functions

Create a new EmitToolError directive.

Types

t()

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

Functions

new!(attrs)

Create a new EmitToolError directive.