pub struct McpClientOptions {
pub application_name: Option<String>,
pub application_version: Option<String>,
pub disable_mcp_instrumentation: bool,
pub prefix: Option<String>,
pub tool_filters: Option<McpToolFilters>,
pub list_max_pages: Option<u32>,
pub progress_callback: Option<McpProgressCallback>,
pub elicitation_callback: Option<Arc<dyn ElicitationCallback>>,
pub continue_on_error: bool,
pub log_handler: Option<McpLogHandler>,
}Expand description
Behaviour shared by every MCP client configuration (McpClientOptions).
Fields§
§application_name: Option<String>The client name sent in the MCP handshake; DEFAULT_CLIENT_NAME when absent.
application_version: Option<String>The client version sent in the MCP handshake; the crate version when absent.
disable_mcp_instrumentation: boolSends no W3C trace context in tool call arguments.
prefix: Option<String>Prefix for agent-facing tool names, applied as <prefix>_<toolName>.
tool_filters: Option<McpToolFilters>Filters controlling which tools this client exposes.
list_max_pages: Option<u32>Page cap for the list methods that aggregate every page; 0 disables it. Defaults to 64.
progress_callback: Option<McpProgressCallback>Receives progress notifications during tool calls, including the agent’s. A per-call callback takes precedence.
elicitation_callback: Option<Arc<dyn ElicitationCallback>>Handles server elicitation requests. When set, the client advertises elicitation support (form and URL modes).
continue_on_error: boolSkips connection failures and overlong prefixed tool names with warnings.
log_handler: Option<McpLogHandler>Receives the server’s log messages; they go to tracing when absent.
Implementations§
Source§impl McpClientOptions
impl McpClientOptions
Sourcepub fn builder() -> McpClientOptionsBuilder
pub fn builder() -> McpClientOptionsBuilder
Create an instance of McpClientOptions using the builder syntax
Trait Implementations§
Source§impl Clone for McpClientOptions
impl Clone for McpClientOptions
Source§impl Debug for McpClientOptions
impl Debug for McpClientOptions
Auto Trait Implementations§
impl !RefUnwindSafe for McpClientOptions
impl !UnwindSafe for McpClientOptions
impl Freeze for McpClientOptions
impl Send for McpClientOptions
impl Sync for McpClientOptions
impl Unpin for McpClientOptions
impl UnsafeUnpin for McpClientOptions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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