pub struct MCPTool {
pub server_label: String,
pub allowed_tools: Option<MCPToolAllowedTools>,
pub authorization: Option<String>,
pub connector_id: Option<McpToolConnectorId>,
pub headers: Option<Value>,
pub require_approval: Option<MCPToolRequireApproval>,
pub server_description: Option<String>,
pub server_url: Option<String>,
}Fields§
§server_label: StringA label for this MCP server, used to identify it in tool calls.
allowed_tools: Option<MCPToolAllowedTools>List of allowed tool names or a filter object.
An OAuth access token that can be used with a remote MCP server, either with a custom MCP server URL or a service connector. Your application must handle the OAuth authorization flow and provide the token here.
connector_id: Option<McpToolConnectorId>Identifier for service connectors, like those available in ChatGPT. One of server_url or
connector_id must be provided. Learn more about service connectors here.
Currently supported connector_id values are:
- Dropbox:
connector_dropbox - Gmail:
connector_gmail - Google Calendar:
connector_googlecalendar - Google Drive:
connector_googledrive - Microsoft Teams:
connector_microsoftteams - Outlook Calendar:
connector_outlookcalendar - Outlook Email:
connector_outlookemail - SharePoint:
connector_sharepoint
headers: Option<Value>Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.
require_approval: Option<MCPToolRequireApproval>Specify which of the MCP server’s tools require approval.
server_description: Option<String>Optional description of the MCP server, used to provide more context.
server_url: Option<String>The URL for the MCP server. One of server_url or connector_id must be provided.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MCPTool
impl<'de> Deserialize<'de> for MCPTool
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>,
impl StructuralPartialEq for MCPTool
Auto Trait Implementations§
impl Freeze for MCPTool
impl RefUnwindSafe for MCPTool
impl Send for MCPTool
impl Sync for MCPTool
impl Unpin for MCPTool
impl UnwindSafe for MCPTool
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)