MCPToolboxTool Class

Definition

An MCP tool stored in a toolbox.

public class MCPToolboxTool : Azure.AI.Projects.Agents.ToolboxTool, System.ClientModel.Primitives.IJsonModel<Azure.AI.Projects.Agents.MCPToolboxTool>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.Projects.Agents.MCPToolboxTool>
type MCPToolboxTool = class
    inherit ToolboxTool
    interface IJsonModel<MCPToolboxTool>
    interface IPersistableModel<MCPToolboxTool>
Public Class MCPToolboxTool
Inherits ToolboxTool
Implements IJsonModel(Of MCPToolboxTool), IPersistableModel(Of MCPToolboxTool)
Inheritance
MCPToolboxTool
Implements

Constructors

Name Description
MCPToolboxTool(String)

Initializes a new instance of MCPToolboxTool.

Properties

Name Description
AllowedTools

Gets or sets the AllowedTools.

To assign an object to this property use FromObjectAsJson<T>(T, JsonSerializerOptions).

To assign an already formatted json string to this property use FromString(String).

<remarks> Supported types:

</remarks>

Examples:

  • BinaryData.FromObjectAsJson("foo"). : Creates a payload of "foo".
  • BinaryData.FromString("\"foo\""). : Creates a payload of "foo".
  • BinaryData.FromObjectAsJson(new { key = "value" }). : Creates a payload of { "key": "value" }.
  • BinaryData.FromString("{\"key\": \"value\"}"). : Creates a payload of { "key": "value" }.

Authorization

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.

ConnectorId

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`
DeferLoading

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

Description

Optional user-defined description for this tool or configuration.

(Inherited from ToolboxTool)
Headers

Gets or sets the Headers.

Name

Optional user-defined name for this tool or configuration.

(Inherited from ToolboxTool)
ProjectConnectionId

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.

ServerDescription

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

ServerLabel

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

ServerUri

The URI of an MCP server.

ToolCallApprovalPolicy

The approval policy used by the tool.

ToolConfigs

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.

(Inherited from ToolboxTool)

Methods

Name Description
JsonModelCreateCore(Utf8JsonReader, ModelReaderWriterOptions)
JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)
PersistableModelCreateCore(BinaryData, ModelReaderWriterOptions)
PersistableModelWriteCore(ModelReaderWriterOptions)

Explicit Interface Implementations

Name Description
IJsonModel<MCPToolboxTool>.Create(Utf8JsonReader, ModelReaderWriterOptions)
IJsonModel<MCPToolboxTool>.Write(Utf8JsonWriter, ModelReaderWriterOptions)
IJsonModel<ToolboxTool>.Create(Utf8JsonReader, ModelReaderWriterOptions) (Inherited from ToolboxTool)
IJsonModel<ToolboxTool>.Write(Utf8JsonWriter, ModelReaderWriterOptions) (Inherited from ToolboxTool)
IPersistableModel<MCPToolboxTool>.Create(BinaryData, ModelReaderWriterOptions)
IPersistableModel<MCPToolboxTool>.GetFormatFromOptions(ModelReaderWriterOptions)
IPersistableModel<MCPToolboxTool>.Write(ModelReaderWriterOptions)
IPersistableModel<ToolboxTool>.Create(BinaryData, ModelReaderWriterOptions) (Inherited from ToolboxTool)
IPersistableModel<ToolboxTool>.GetFormatFromOptions(ModelReaderWriterOptions) (Inherited from ToolboxTool)
IPersistableModel<ToolboxTool>.Write(ModelReaderWriterOptions) (Inherited from ToolboxTool)

Applies to