pub struct CustomToolsRegistry { /* private fields */ }Expand description
Registry for managing custom tools
Implementations§
Source§impl CustomToolsRegistry
impl CustomToolsRegistry
Sourcepub fn new(client: Arc<ComposioClient>) -> Self
pub fn new(client: Arc<ComposioClient>) -> Self
Create a new custom tools registry
Sourcepub fn register_simple<F>(
&mut self,
name: &str,
description: &str,
input_schema: JsonValue,
executor: F,
) -> Arc<CustomTool>
pub fn register_simple<F>( &mut self, name: &str, description: &str, input_schema: JsonValue, executor: F, ) -> Arc<CustomTool>
Sourcepub fn register_with_auth<F>(
&mut self,
name: &str,
description: &str,
toolkit: &str,
input_schema: JsonValue,
executor: F,
) -> Arc<CustomTool>
pub fn register_with_auth<F>( &mut self, name: &str, description: &str, toolkit: &str, input_schema: JsonValue, executor: F, ) -> Arc<CustomTool>
Sourcepub async fn execute(
&self,
slug: &str,
arguments: HashMap<String, JsonValue>,
user_id: Option<&str>,
) -> Result<JsonValue, ComposioError>
pub async fn execute( &self, slug: &str, arguments: HashMap<String, JsonValue>, user_id: Option<&str>, ) -> Result<JsonValue, ComposioError>
Execute a custom tool
§Arguments
slug- Tool slugarguments- Input argumentsuser_id- User ID (required for authenticated tools)
Sourcepub fn list(&self) -> Vec<Arc<CustomTool>>
pub fn list(&self) -> Vec<Arc<CustomTool>>
List all registered custom tools
Sourcepub fn list_as_tools(&self) -> Vec<ToolInfo>
pub fn list_as_tools(&self) -> Vec<ToolInfo>
Get all custom tools as ToolInfo (for API compatibility)
Auto Trait Implementations§
impl Freeze for CustomToolsRegistry
impl !RefUnwindSafe for CustomToolsRegistry
impl Send for CustomToolsRegistry
impl Sync for CustomToolsRegistry
impl Unpin for CustomToolsRegistry
impl UnsafeUnpin for CustomToolsRegistry
impl !UnwindSafe for CustomToolsRegistry
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