pub struct OpenAIMcpTool {
pub server_label: String,
pub server_url: String,
pub require_approval: Option<String>,
pub allowed_tools: Vec<String>,
}Expand description
OpenAI remote MCP server configuration.
Fields§
§server_label: StringLabel for the server.
server_url: StringServer URL.
require_approval: Option<String>Approval policy, such as never or always.
allowed_tools: Vec<String>Optional allowlist of tool names.
Implementations§
Source§impl OpenAIMcpTool
impl OpenAIMcpTool
Sourcepub fn new(
server_label: impl Into<String>,
server_url: impl Into<String>,
) -> Self
pub fn new( server_label: impl Into<String>, server_url: impl Into<String>, ) -> Self
Creates a remote MCP server tool.
Sourcepub fn require_approval(self, policy: impl Into<String>) -> Self
pub fn require_approval(self, policy: impl Into<String>) -> Self
Sets approval policy.
Sourcepub fn allowed_tools(self, tools: impl Into<Vec<String>>) -> Self
pub fn allowed_tools(self, tools: impl Into<Vec<String>>) -> Self
Sets allowed tools.
Trait Implementations§
Source§impl Clone for OpenAIMcpTool
impl Clone for OpenAIMcpTool
Source§fn clone(&self) -> OpenAIMcpTool
fn clone(&self) -> OpenAIMcpTool
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OpenAIMcpTool
impl Debug for OpenAIMcpTool
Source§impl<'de> Deserialize<'de> for OpenAIMcpTool
impl<'de> Deserialize<'de> for OpenAIMcpTool
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for OpenAIMcpTool
Source§impl PartialEq for OpenAIMcpTool
impl PartialEq for OpenAIMcpTool
Source§impl Serialize for OpenAIMcpTool
impl Serialize for OpenAIMcpTool
impl StructuralPartialEq for OpenAIMcpTool
Auto Trait Implementations§
impl Freeze for OpenAIMcpTool
impl RefUnwindSafe for OpenAIMcpTool
impl Send for OpenAIMcpTool
impl Sync for OpenAIMcpTool
impl Unpin for OpenAIMcpTool
impl UnsafeUnpin for OpenAIMcpTool
impl UnwindSafe for OpenAIMcpTool
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