pub struct DynamicToolManager { /* private fields */ }
Expand description
Dynamic tool enablement manager
Implementations§
Source§impl DynamicToolManager
impl DynamicToolManager
Sourcepub fn new(config: ToolConfiguration) -> Self
pub fn new(config: ToolConfiguration) -> Self
Create a new dynamic tool manager
Sourcepub fn from_profile(profile: &McpConfigProfile) -> Self
pub fn from_profile(profile: &McpConfigProfile) -> Self
Create from configuration profile
Sourcepub fn set_client_type(&mut self, client_type: ClientType)
pub fn set_client_type(&mut self, client_type: ClientType)
Set client type for client-specific optimizations
Sourcepub async fn analyze_and_configure<P: AsRef<Path>>(
&mut self,
server: &CodePrismMcpServer,
repo_path: P,
) -> Result<()>
pub async fn analyze_and_configure<P: AsRef<Path>>( &mut self, server: &CodePrismMcpServer, repo_path: P, ) -> Result<()>
Analyze repository and apply enablement rules
Sourcepub fn enable_tool(&mut self, tool_name: &str)
pub fn enable_tool(&mut self, tool_name: &str)
Enable a specific tool
Sourcepub fn disable_tool(&mut self, tool_name: &str)
pub fn disable_tool(&mut self, tool_name: &str)
Disable a specific tool
Sourcepub fn set_tool_config(
&mut self,
tool_name: &str,
key: &str,
value: impl Into<Value>,
)
pub fn set_tool_config( &mut self, tool_name: &str, key: &str, value: impl Into<Value>, )
Set tool-specific configuration
Sourcepub fn is_tool_enabled(&self, tool_name: &str) -> bool
pub fn is_tool_enabled(&self, tool_name: &str) -> bool
Check if a tool is enabled
Sourcepub fn get_enabled_tools(&self) -> Vec<String>
pub fn get_enabled_tools(&self) -> Vec<String>
Get enabled tools
Sourcepub fn get_disabled_tools(&self) -> Vec<String>
pub fn get_disabled_tools(&self) -> Vec<String>
Get disabled tools
Sourcepub fn get_tool_config(&self, tool_name: &str) -> Option<&ToolConfig>
pub fn get_tool_config(&self, tool_name: &str) -> Option<&ToolConfig>
Get tool configuration
Sourcepub fn filter_tools(&self, all_tools: Vec<Tool>) -> Vec<Tool>
pub fn filter_tools(&self, all_tools: Vec<Tool>) -> Vec<Tool>
Filter available tools based on enabled state
Sourcepub fn get_summary(&self) -> ToolEnablementSummary
pub fn get_summary(&self) -> ToolEnablementSummary
Get configuration summary
Trait Implementations§
Source§impl Clone for DynamicToolManager
impl Clone for DynamicToolManager
Source§fn clone(&self) -> DynamicToolManager
fn clone(&self) -> DynamicToolManager
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for DynamicToolManager
impl RefUnwindSafe for DynamicToolManager
impl Send for DynamicToolManager
impl Sync for DynamicToolManager
impl Unpin for DynamicToolManager
impl UnwindSafe for DynamicToolManager
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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