pub struct MCPToolArgs { /* private fields */ }Expand description
Builder for MCPTool.
Implementations§
Source§impl MCPToolArgs
impl MCPToolArgs
Sourcepub fn server_label<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn server_label<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
A label for this MCP server, used to identify it in tool calls.
Sourcepub fn allowed_tools<VALUE: Into<MCPToolAllowedTools>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn allowed_tools<VALUE: Into<MCPToolAllowedTools>>( &mut self, value: VALUE, ) -> &mut Self
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.
Sourcepub fn connector_id<VALUE: Into<McpToolConnectorId>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn connector_id<VALUE: Into<McpToolConnectorId>>( &mut self, value: VALUE, ) -> &mut Self
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
Sourcepub fn headers<VALUE: Into<Value>>(&mut self, value: VALUE) -> &mut Self
pub fn headers<VALUE: Into<Value>>(&mut self, value: VALUE) -> &mut Self
Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.
Sourcepub fn require_approval<VALUE: Into<MCPToolRequireApproval>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn require_approval<VALUE: Into<MCPToolRequireApproval>>( &mut self, value: VALUE, ) -> &mut Self
Specify which of the MCP server’s tools require approval.
Sourcepub fn server_description<VALUE: Into<String>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn server_description<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self
Optional description of the MCP server, used to provide more context.
Sourcepub fn server_url<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn server_url<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
The URL for the MCP server. One of server_url or connector_id must be provided.
Trait Implementations§
Source§impl Clone for MCPToolArgs
impl Clone for MCPToolArgs
Source§fn clone(&self) -> MCPToolArgs
fn clone(&self) -> MCPToolArgs
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more