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.