Skip to content
DocsTry Aspire
DocsTry

AzureAISearchToolResource Methods

ClassMethods1 member
A Foundry tool resource that grounds an agent's responses using data from an Azure AI Search index.
ToAgentToolAsync(CancellationToken)Section titled ToAgentToolAsync(CancellationToken)overrideTask<ResponseTool>
Converts this tool definition into the SDK Responses.ResponseTool representation.
public class AzureAISearchToolResource
{
public override Task<ResponseTool> ToAgentToolAsync(
CancellationToken cancellationToken = default(CancellationToken))
{
// ...
}
}
cancellationTokenCancellationTokenoptionalA cancellation token.
Task<ResponseTool>The SDK tool representation.
This method is called at deploy time, after infrastructure provisioning is complete. Tools that depend on provisioned resources (e.g., Azure AI Search connections) can safely resolve their connection identifiers at this point.