Skip to content
Docs Try Aspire
Docs Try

IFoundryTool Methods

Interface Methods 1 member
Represents a Foundry tool that can be attached to a prompt agent.
ToAgentToolAsync(CancellationToken) Section titled ToAgentToolAsync(CancellationToken) abstract Task<ResponseTool>
Converts this tool definition into the SDK Responses.ResponseTool representation.
public interface IFoundryTool
{
public abstract Task<ResponseTool> ToAgentToolAsync(
CancellationToken cancellationToken = default(CancellationToken))
{
// ...
}
}
cancellationToken CancellationToken optional A 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.