Skip to main content

Module tool_executor

Module tool_executor 

Source
Expand description

Native tool executors — Calculator and DateTimeTool.

Tools are pure functions that execute locally (no LLM call). When a use_tool step references a known tool, the runner intercepts it and calls the executor directly.

Supported tools:

  • Calculator: safe arithmetic expression evaluator
  • DateTimeTool: current date/time/timestamp queries

Structs§

ToolResult
Result of a tool execution.

Functions§

calculator_execute
Safe arithmetic expression evaluator.
datetime_execute
Current date/time queries using system time (UTC).
dispatch
Dispatch a tool call by name. Returns None if the tool is not a native executor.