pub struct BashTool;Trait Implementations§
Source§impl Tool for BashTool
impl Tool for BashTool
Source§fn description(&self) -> &'static str
fn description(&self) -> &'static str
Human-readable description sent to the LLM.
Source§fn input_schema(&self) -> Value
fn input_schema(&self) -> Value
JSON Schema for the tool’s input parameters.
Source§fn is_read_only(&self) -> bool
fn is_read_only(&self) -> bool
Whether this tool only reads state (no mutations).
Source§fn is_concurrency_safe(&self) -> bool
fn is_concurrency_safe(&self) -> bool
Whether this tool can safely run concurrently with other tools.
Read-only tools are typically concurrency-safe.
Source§fn get_path(&self, _input: &Value) -> Option<PathBuf>
fn get_path(&self, _input: &Value) -> Option<PathBuf>
Extract a file path from the input, if applicable (for permission matching).
Source§fn validate_input(&self, input: &Value) -> Result<(), String>
fn validate_input(&self, input: &Value) -> Result<(), String>
Validate tool input before execution.
Source§fn call<'life0, 'life1, 'async_trait>(
&'life0 self,
input: Value,
ctx: &'life1 ToolContext,
) -> Pin<Box<dyn Future<Output = Result<ToolResult, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn call<'life0, 'life1, 'async_trait>(
&'life0 self,
input: Value,
ctx: &'life1 ToolContext,
) -> Pin<Box<dyn Future<Output = Result<ToolResult, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute the tool with validated input.
Source§fn is_destructive(&self) -> bool
fn is_destructive(&self) -> bool
Whether this tool is destructive (deletes data, force-pushes, etc.).
Source§fn is_enabled(&self) -> bool
fn is_enabled(&self) -> bool
Whether this tool is currently enabled in the environment.
Source§fn max_result_size_chars(&self) -> usize
fn max_result_size_chars(&self) -> usize
Maximum result size in characters before truncation.
Source§fn check_permissions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
input: &'life1 Value,
checker: &'life2 PermissionChecker,
) -> Pin<Box<dyn Future<Output = PermissionDecision> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn check_permissions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
input: &'life1 Value,
checker: &'life2 PermissionChecker,
) -> Pin<Box<dyn Future<Output = PermissionDecision> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Check permissions for executing this tool with the given input.
Auto Trait Implementations§
impl Freeze for BashTool
impl RefUnwindSafe for BashTool
impl Send for BashTool
impl Sync for BashTool
impl Unpin for BashTool
impl UnsafeUnpin for BashTool
impl UnwindSafe for BashTool
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