Struct ComposioTool
pub struct ComposioTool { /* private fields */ }Expand description
A tool that proxies actions to the Composio managed tool platform.
Implementations§
Source§impl ComposioTool
impl ComposioTool
pub fn new( api_key: &str, default_entity_id: Option<&str>, security: Arc<SecurityPolicy>, ) -> Self
Sourcepub async fn list_actions(
&self,
app_name: Option<&str>,
) -> Result<Vec<ComposioAction>>
pub async fn list_actions( &self, app_name: Option<&str>, ) -> Result<Vec<ComposioAction>>
List available Composio apps/actions for the authenticated user. Uses the v3 endpoint.
Sourcepub async fn execute_action(
&self,
action_name: &str,
app_name_hint: Option<&str>,
params: Value,
text: Option<&str>,
entity_id: Option<&str>,
connected_account_ref: Option<&str>,
) -> Result<Value>
pub async fn execute_action( &self, action_name: &str, app_name_hint: Option<&str>, params: Value, text: Option<&str>, entity_id: Option<&str>, connected_account_ref: Option<&str>, ) -> Result<Value>
Execute a Composio action/tool with given parameters. Uses the v3 endpoint.
Sourcepub async fn get_connection_url(
&self,
app_name: Option<&str>,
auth_config_id: Option<&str>,
entity_id: &str,
) -> Result<ComposioConnectionLink>
pub async fn get_connection_url( &self, app_name: Option<&str>, auth_config_id: Option<&str>, entity_id: &str, ) -> Result<ComposioConnectionLink>
Get the OAuth connection URL for a specific app/toolkit or auth config. Uses the v3 endpoint.
Trait Implementations§
Source§impl Attributable for ComposioTool
impl Attributable for ComposioTool
Source§impl Tool for ComposioTool
impl Tool for ComposioTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
Human-readable description
Source§fn parameters_schema(&self) -> Value
fn parameters_schema(&self) -> Value
JSON schema for parameters
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<ToolResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<ToolResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the tool with given arguments
Source§fn output_schema(&self) -> Option<Value>
fn output_schema(&self) -> Option<Value>
JSON schema describing the structured output this tool attaches to
ToolOutput::data, when it declares one. None means the tool
emits display text only; authoring surfaces fall back to
sample-derived shapes from captured runs.Source§fn param_domains(&self) -> Vec<(&'static str, OptionDomain)>
fn param_domains(&self) -> Vec<(&'static str, OptionDomain)>
Option domains for parameters whose value sets live in runtime
config rather than the static schema (channel refs, peer targets,
…). Surfaces resolve these through the runtime to render real
selectable choices. Default: no domain-typed parameters.
fn spec(&self) -> ToolSpec
Auto Trait Implementations§
impl !Freeze for ComposioTool
impl !RefUnwindSafe for ComposioTool
impl Send for ComposioTool
impl Sync for ComposioTool
impl Unpin for ComposioTool
impl UnsafeUnpin for ComposioTool
impl !UnwindSafe for ComposioTool
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more