pub struct McpServerConfigBuilder { /* private fields */ }Expand description
Builder for creating MCP server configurations.
Implementations§
Source§impl McpServerConfigBuilder
impl McpServerConfigBuilder
Sourcepub fn with_tool<T: McpTool + 'static>(self, tool: T) -> Self
pub fn with_tool<T: McpTool + 'static>(self, tool: T) -> Self
Adds a single tool to the server.
Sourcepub fn with_dyn_tool(self, tool: DynTool) -> Self
pub fn with_dyn_tool(self, tool: DynTool) -> Self
Adds a dynamic tool reference to the server.
Sourcepub fn with_tools(self, tools: Vec<DynTool>) -> Self
pub fn with_tools(self, tools: Vec<DynTool>) -> Self
Adds multiple tools from a vector.
Sourcepub fn with_tools_from<P: ToolProvider>(self, provider: P) -> Self
pub fn with_tools_from<P: ToolProvider>(self, provider: P) -> Self
Adds all tools from a provider.
Sourcepub fn register_tools(self) -> Self
pub fn register_tools(self) -> Self
Registers all auto-discovered tools.
Sourcepub fn register_tools_in_group(self, group: &str) -> Self
pub fn register_tools_in_group(self, group: &str) -> Self
Registers auto-discovered tools filtered by group.
Sourcepub fn with_capabilities(self, capabilities: McpCapabilities) -> Self
pub fn with_capabilities(self, capabilities: McpCapabilities) -> Self
Adds capabilities to the server.
Sourcepub fn with_resources(self) -> Self
pub fn with_resources(self) -> Self
Enables resource capabilities.
Sourcepub fn with_prompts(self) -> Self
pub fn with_prompts(self) -> Self
Enables prompt capabilities.
Sourcepub fn with_elicitation(self) -> Self
pub fn with_elicitation(self) -> Self
Enables elicitation capabilities.
Sourcepub fn with_tasks(self) -> Self
pub fn with_tasks(self) -> Self
Enables task capabilities.
Sourcepub fn with_logging(self) -> Self
pub fn with_logging(self) -> Self
Enables logging capabilities.
Sourcepub fn with_completions(self) -> Self
pub fn with_completions(self) -> Self
Enables completions capabilities.
Sourcepub fn build(self) -> McpServerConfig
pub fn build(self) -> McpServerConfig
Builds the server configuration.
Trait Implementations§
Source§impl Default for McpServerConfigBuilder
impl Default for McpServerConfigBuilder
Source§fn default() -> McpServerConfigBuilder
fn default() -> McpServerConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for McpServerConfigBuilder
impl !RefUnwindSafe for McpServerConfigBuilder
impl Send for McpServerConfigBuilder
impl Sync for McpServerConfigBuilder
impl Unpin for McpServerConfigBuilder
impl !UnwindSafe for McpServerConfigBuilder
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