Share via


Tool Class

Definition

The Tool. Please note Tool is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. The available derived classes include A2ATool, AzureAISearchAgentTool, AzureFunctionAgentTool, BingCustomSearchAgentTool, BingGroundingAgentTool, BrowserAutomationAgentTool, CaptureStructuredOutputsTool, CodeInterpreterTool, ComputerUsePreviewTool, MicrosoftFabricAgentTool, FileSearchTool, FunctionTool, ImageGenTool, LocalShellTool, MCPTool, MemorySearchTool, OpenApiAgentTool, SharepointAgentTool and WebSearchPreviewTool.

[System.ClientModel.Primitives.PersistableModelProxy(typeof(Azure.AI.AgentServer.Contracts.Generated.OpenAI.UnknownTool))]
public abstract class Tool : Azure.AI.AgentServer.Contracts.Generated.Common.IUtf8JsonSerializable, System.ClientModel.Primitives.IJsonModel<Azure.AI.AgentServer.Contracts.Generated.OpenAI.Tool>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.AgentServer.Contracts.Generated.OpenAI.Tool>
[<System.ClientModel.Primitives.PersistableModelProxy(typeof(Azure.AI.AgentServer.Contracts.Generated.OpenAI.UnknownTool))>]
type Tool = class
    interface IUtf8JsonSerializable
    interface IJsonModel<Tool>
    interface IPersistableModel<Tool>
Public MustInherit Class Tool
Implements IJsonModel(Of Tool), IPersistableModel(Of Tool), IUtf8JsonSerializable
Inheritance
Tool
Derived
Attributes
Implements

Constructors

Name Description
Tool()

Initializes a new instance of Tool.

Tool(ToolType, IDictionary<String,BinaryData>)

Initializes a new instance of Tool.

Properties

Name Description
Type

Gets or sets the type.

Methods

Name Description
DeserializeTool(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<Tool>.Create(Utf8JsonReader, ModelReaderWriterOptions)

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

IJsonModel<Tool>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<Tool>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<Tool>.GetFormatFromOptions(ModelReaderWriterOptions)

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

IPersistableModel<Tool>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

IUtf8JsonSerializable.Write(Utf8JsonWriter)

Applies to