ProjectsAgentsModelFactory.MCPToolboxTool Method

Definition

An MCP tool stored in a toolbox.

public static Azure.AI.Projects.Agents.MCPToolboxTool MCPToolboxTool(string name = default, string description = default, System.Collections.Generic.IDictionary<string,Azure.AI.Projects.Agents.ToolConfig> toolConfigs = default, string serverLabel = default, Uri serverUri = default, OpenAI.MCPToolboxToolConnectorId? connectorId = default, string authorization = default, string serverDescription = default, System.Collections.Generic.IDictionary<string,string> headers = default, BinaryData allowedTools = default, BinaryData requireApprovalInternal = default, bool? deferLoading = default, string projectConnectionId = default);
static member MCPToolboxTool : string * string * System.Collections.Generic.IDictionary<string, Azure.AI.Projects.Agents.ToolConfig> * string * Uri * Nullable<OpenAI.MCPToolboxToolConnectorId> * string * string * System.Collections.Generic.IDictionary<string, string> * BinaryData * BinaryData * Nullable<bool> * string -> Azure.AI.Projects.Agents.MCPToolboxTool
Public Shared Function MCPToolboxTool (Optional name As String = Nothing, Optional description As String = Nothing, Optional toolConfigs As IDictionary(Of String, ToolConfig) = Nothing, Optional serverLabel As String = Nothing, Optional serverUri As Uri = Nothing, Optional connectorId As Nullable(Of MCPToolboxToolConnectorId) = Nothing, Optional authorization As String = Nothing, Optional serverDescription As String = Nothing, Optional headers As IDictionary(Of String, String) = Nothing, Optional allowedTools As BinaryData = Nothing, Optional requireApprovalInternal As BinaryData = Nothing, Optional deferLoading As Nullable(Of Boolean) = Nothing, Optional projectConnectionId As String = Nothing) As MCPToolboxTool

Parameters

name
String

Optional user-defined name for this tool or configuration.

description
String

Optional user-defined description for this tool or configuration.

toolConfigs
IDictionary<String,ToolConfig>

Per-tool configuration map. Keys are tool names or * (catch-all default). Resolution order: exact tool name match takes priority over *. Unknown tool names are silently ignored at runtime.

serverLabel
String

A label for this MCP server, used to identify it in tool calls.

serverUri
Uri

The URL for the MCP server. One of server_url or connector_id must be provided.

connectorId
Nullable<MCPToolboxToolConnectorId>

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`
authorization
String

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.

serverDescription
String

Optional description of the MCP server, used to provide more context.

allowedTools
BinaryData
requireApprovalInternal
BinaryData
deferLoading
Nullable<Boolean>

Whether this MCP tool is deferred and discovered via tool search.

projectConnectionId
String

The connection ID in the project for the MCP server. The connection stores authentication and other connection details needed to connect to the MCP server.

Returns

A new MCPToolboxTool instance for mocking.

Applies to