你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ToolChoiceObjectMCP Class

Definition

Use this option to force the model to call a specific tool on a remote MCP server.

public class ToolChoiceObjectMCP : Azure.AI.AgentServer.Contracts.Generated.OpenAI.ToolChoiceObject, System.ClientModel.Primitives.IJsonModel<Azure.AI.AgentServer.Contracts.Generated.OpenAI.ToolChoiceObjectMCP>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.AgentServer.Contracts.Generated.OpenAI.ToolChoiceObjectMCP>
type ToolChoiceObjectMCP = class
    inherit ToolChoiceObject
    interface IUtf8JsonSerializable
    interface IJsonModel<ToolChoiceObjectMCP>
    interface IPersistableModel<ToolChoiceObjectMCP>
Public Class ToolChoiceObjectMCP
Inherits ToolChoiceObject
Implements IJsonModel(Of ToolChoiceObjectMCP), IPersistableModel(Of ToolChoiceObjectMCP)
Inheritance
ToolChoiceObjectMCP
Implements

Constructors

Name Description
ToolChoiceObjectMCP()

Initializes a new instance of ToolChoiceObjectMCP for deserialization.

ToolChoiceObjectMCP(String)

Initializes a new instance of ToolChoiceObjectMCP.

ToolChoiceObjectMCP(ToolChoiceObjectType, IDictionary<String,BinaryData>, String, String)

Initializes a new instance of ToolChoiceObjectMCP.

Properties

Name Description
Name

The name of the tool to call on the server.

ServerLabel

The label of the MCP server to use.

Type

Gets or sets the type.

(Inherited from ToolChoiceObject)

Methods

Name Description
DeserializeToolChoiceObjectMCP(JsonElement, ModelReaderWriterOptions)
FromResponse(Response)

Deserializes the model from a raw response.

JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)
ToRequestContent()

Convert into a RequestContent.

Explicit Interface Implementations

Name Description
IJsonModel<ToolChoiceObject>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

(Inherited from ToolChoiceObject)
IJsonModel<ToolChoiceObject>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

(Inherited from ToolChoiceObject)
IJsonModel<ToolChoiceObjectMCP>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<ToolChoiceObjectMCP>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<ToolChoiceObject>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

(Inherited from ToolChoiceObject)
IPersistableModel<ToolChoiceObject>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

(Inherited from ToolChoiceObject)
IPersistableModel<ToolChoiceObject>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

(Inherited from ToolChoiceObject)
IPersistableModel<ToolChoiceObjectMCP>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<ToolChoiceObjectMCP>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<ToolChoiceObjectMCP>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

IUtf8JsonSerializable.Write(Utf8JsonWriter)

Applies to