Module: Mana::ToolHandler

Included in:
Engine
Defined in:
lib/mana/tool_handler.rb

Overview

Dispatches LLM tool calls to their respective handlers. Mixed into Engine as a private method.

Built-in tools are dispatched via instance methods (handle_), which can access @binding, @written_vars, etc. External tools (registered via Mana.register_tool) are dispatched via Procs that only receive input — they cannot access the engine's binding.

Constant Summary collapse

BUILTIN_TOOLS =
%w[read_var write_var read_attr write_attr call_func eval knowledge done error].freeze