FoundryAITool Class

Definition

Provides factory methods for creating AITool instances from Microsoft Foundry and OpenAI response tools.

public static class FoundryAITool
type FoundryAITool = class
Public Class FoundryAITool
Inheritance
FoundryAITool

Remarks

This class wraps Azure.AI.Projects.Agents.AgentTool (Azure.AI.Projects.OpenAI) and OpenAI.Responses.ResponseTool (OpenAI SDK) factory methods, returning AITool directly — eliminating the need for manual casting and .AsAITool() calls.

Instead of writing: ((ResponseTool)AgentTool.CreateOpenApiTool(definition)).AsAITool() You can write: FoundryAITool.CreateOpenApiTool(definition)

Methods

Name Description
CreateA2ATool(Uri, String)

Creates an AITool for Agent-to-Agent (A2A) communication.

CreateAzureAISearchTool(AzureAISearchToolOptions)

Creates an AITool for Azure AI Search.

CreateBingCustomSearchTool(BingCustomSearchToolOptions)

Creates an AITool for Bing Custom Search.

CreateBingGroundingTool(BingGroundingSearchToolOptions)

Creates an AITool for Bing Grounding search.

CreateBrowserAutomationTool(BrowserAutomationToolOptions)

Creates an AITool for browser automation.

CreateCodeInterpreterTool(CodeInterpreterToolContainer)

Creates an AITool for code interpreter.

CreateComputerTool(ComputerToolEnvironment, Int32, Int32)

Creates an AITool for computer use (screen interaction).

CreateFileSearchTool(IEnumerable<String>, Nullable<Int32>, FileSearchToolRankingOptions, BinaryData)

Creates an AITool for file search over vector stores.

CreateFunctionTool(String, BinaryData, Nullable<Boolean>, String)

Creates an AITool for function tool invocations.

CreateImageGenerationTool(String, Nullable<ImageGenerationToolQuality>, Nullable<ImageGenerationToolSize>, Nullable<ImageGenerationToolOutputFileFormat>, Nullable<Int32>, Nullable<ImageGenerationToolModerationLevel>, Nullable<ImageGenerationToolBackground>, Nullable<ImageGenerationToolInputFidelity>, ImageGenerationToolInputImageMask, Nullable<Int32>)

Creates an AITool for image generation.

CreateMcpTool(String, McpToolConnectorId, String, String, IDictionary<String,String>, McpToolFilter, McpToolCallApprovalPolicy)

Creates an AITool for MCP (Model Context Protocol) server tools using a connector ID.

CreateMcpTool(String, Uri, String, String, IDictionary<String,String>, McpToolFilter, McpToolCallApprovalPolicy)

Creates an AITool for MCP (Model Context Protocol) server tools.

CreateMicrosoftFabricTool(FabricDataAgentToolOptions)

Creates an AITool for Microsoft Fabric data agent.

CreateOpenApiTool(OpenApiFunctionDefinition)

Creates an AITool for OpenAPI tool invocations.

CreateSharepointTool(SharePointGroundingToolOptions)

Creates an AITool for SharePoint grounding.

CreateStructuredOutputsTool(StructuredOutputDefinition)

Creates an AITool for structured output capture.

CreateWebSearchTool(WebSearchToolLocation, Nullable<WebSearchToolContextSize>, WebSearchToolFilters)

Creates an AITool for web search.

FromResponseTool(ResponseTool)

Converts an existing OpenAI.Responses.ResponseTool into an AITool.

Applies to