pub struct ToolArgs {
pub params: Value,
pub stdin: Option<String>,
/* private fields */
}Expand description
Parsed arguments passed to a tool exec function.
params is a JSON object built from --key value flags, with values
type-coerced per the ToolDef’s input_schema.
stdin carries pipeline input from a prior command, if any.
Fields§
§params: ValueParsed parameters as a JSON object. Keys from --key value flags.
stdin: Option<String>Pipeline input from a prior command (e.g. echo data | tool).
Implementations§
Source§impl ToolArgs
impl ToolArgs
Sourcepub fn new(params: Value, stdin: Option<String>) -> Self
pub fn new(params: Value, stdin: Option<String>) -> Self
Construct arguments outside a registry request.
Sourcepub fn tenant_id(&self) -> Result<Option<String>, ExecutionCapabilityError>
pub fn tenant_id(&self) -> Result<Option<String>, ExecutionCapabilityError>
Request tenant while the originating execution remains active.
Sourcepub fn surface(
&self,
) -> Result<Option<ToolCallSurface>, ExecutionCapabilityError>
pub fn surface( &self, ) -> Result<Option<ToolCallSurface>, ExecutionCapabilityError>
Runtime surface while the originating execution remains active.
Sourcepub fn param_bool(&self, key: &str) -> Option<bool>
pub fn param_bool(&self, key: &str) -> Option<bool>
Get a boolean parameter by name.
Auto Trait Implementations§
impl Freeze for ToolArgs
impl RefUnwindSafe for ToolArgs
impl Send for ToolArgs
impl Sync for ToolArgs
impl Unpin for ToolArgs
impl UnsafeUnpin for ToolArgs
impl UnwindSafe for ToolArgs
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