Skip to main content

ExecuteToolFn

Type Alias ExecuteToolFn 

Source
pub type ExecuteToolFn = unsafe extern "C" fn(*const c_char, *const u8, usize, *mut *mut u8, *mut usize) -> i32;
Expand description

Function signature for executing a tool by name

§Parameters

  • tool_name: Null-terminated C string with tool name
  • args_json: JSON arguments as byte array
  • args_len: Length of args_json
  • result_buf: Output pointer for result (allocated by plugin)
  • result_len: Output capacity of result buffer

§Returns

  • 0 on success
  • Non-zero error code on failure