pub type CodeToolFn = dyn Fn(&Value) -> Result<Value, String> + Send + Sync;Expand description
The handler signature: JSON arguments in, JSON result (or a refusal string)
out. Err takes the tool-error path (the model sees it as a failed call;
a workflow tool node takes its error edge).