Skip to main content

Integration

Trait Integration 

Source
pub trait Integration:
    Send
    + Sync
    + Debug {
    // Required methods
    fn get_name(&self) -> String;
    fn get_description(&self) -> String;
    fn get_tools(&self) -> Vec<Arc<dyn Tool>>;

    // Provided methods
    fn get_version(&self) -> String { ... }
    fn get_auth_metadata(&self) -> Option<Box<dyn AuthMetadata>> { ... }
    fn get_callbacks(&self) -> HashMap<String, Value> { ... }
    fn get_notifications(&self) -> Vec<String> { ... }
    fn get_metadata(&self) -> HashMap<String, Value> { ... }
    fn initialize<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn shutdown<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Integration represents a group of tools with shared authentication, notifications, and other common functionality (similar to MCP servers)

Required Methods§

Source

fn get_name(&self) -> String

Get the integration name/identifier

Source

fn get_description(&self) -> String

Get description of what this integration provides

Source

fn get_tools(&self) -> Vec<Arc<dyn Tool>>

Get all tools provided by this integration

Provided Methods§

Source

fn get_version(&self) -> String

Get the version of this integration

Source

fn get_auth_metadata(&self) -> Option<Box<dyn AuthMetadata>>

Get authentication metadata for this integration

Source

fn get_callbacks(&self) -> HashMap<String, Value>

Get callback schema (JSON schema for callbacks)

Source

fn get_notifications(&self) -> Vec<String>

Get notifications/events this integration can send (future feature)

Source

fn get_metadata(&self) -> HashMap<String, Value>

Get additional metadata about this integration

Source

fn initialize<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Initialize the integration (connect, validate auth, etc.)

Source

fn shutdown<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Shutdown/cleanup the integration

Implementors§