pub struct RunCommandTool { /* private fields */ }Expand description
Tool for executing shell commands safely
Implementations§
Source§impl RunCommandTool
impl RunCommandTool
Sourcepub fn new_with_timeout(timeout_seconds: u64) -> Self
pub fn new_with_timeout(timeout_seconds: u64) -> Self
Create a new run_command tool with custom timeout
Sourcepub fn new_with_workdir<P: AsRef<Path>>(working_dir: P) -> Self
pub fn new_with_workdir<P: AsRef<Path>>(working_dir: P) -> Self
Create a new run_command tool with custom working directory
Trait Implementations§
Source§impl Tool for RunCommandTool
impl Tool for RunCommandTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
Get the tool description
Source§fn validate_args(&self, args: &ToolArgs) -> Result<(), ToolError>
fn validate_args(&self, args: &ToolArgs) -> Result<(), ToolError>
Validate arguments before execution
Source§fn execute(
&mut self,
args: &ToolArgs,
state: &Arc<Mutex<ToolState>>,
) -> Result<ToolResult>
fn execute( &mut self, args: &ToolArgs, state: &Arc<Mutex<ToolState>>, ) -> Result<ToolResult>
Execute the tool with given arguments
Source§fn get_parameters_schema(&self) -> Value
fn get_parameters_schema(&self) -> Value
Get parameters schema - should be overridden by implementing tools
Source§fn get_openai_schema(&self) -> Value
fn get_openai_schema(&self) -> Value
Get OpenAI function schema for this tool
Auto Trait Implementations§
impl Freeze for RunCommandTool
impl RefUnwindSafe for RunCommandTool
impl Send for RunCommandTool
impl Sync for RunCommandTool
impl Unpin for RunCommandTool
impl UnwindSafe for RunCommandTool
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more