AshAi.Tool.Execution (ash_ai v1.0.0)

Copy Markdown View Source

Executes Ash actions from tool call arguments.

Summary

Functions

Executes a tool with the given arguments and context.

Functions

run(tool, client_arguments, context, run_opts \\ [])

Executes a tool with the given arguments and context.

Returns:

  • {:ok, result, raw_result} for successful tool calls
  • {:error, error_text} for execution failures

Set :encode? to false to return the serialized result before JSON encoding.