Share via


CachedFoundryToolCatalog.FetchToolsAsync Method

Definition

Fetches tool details from the underlying source. Derived classes must implement this method to provide the actual tool data.

protected abstract System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyDictionary<string,System.Collections.Generic.IReadOnlyList<Azure.AI.AgentServer.Core.Tools.Models.FoundryToolDetails>>> FetchToolsAsync(System.Collections.Generic.IReadOnlyList<Azure.AI.AgentServer.Core.Tools.Models.FoundryTool> tools, Azure.AI.AgentServer.Core.Tools.Models.UserInfo? userInfo, System.Threading.CancellationToken cancellationToken);
abstract member FetchToolsAsync : System.Collections.Generic.IReadOnlyList<Azure.AI.AgentServer.Core.Tools.Models.FoundryTool> * Azure.AI.AgentServer.Core.Tools.Models.UserInfo * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IReadOnlyList<Azure.AI.AgentServer.Core.Tools.Models.FoundryToolDetails>>>
Protected MustOverride Function FetchToolsAsync (tools As IReadOnlyList(Of FoundryTool), userInfo As UserInfo, cancellationToken As CancellationToken) As Task(Of IReadOnlyDictionary(Of String, IReadOnlyList(Of FoundryToolDetails)))

Parameters

tools
IReadOnlyList<FoundryTool>

The tools to fetch.

userInfo
UserInfo

The user context for fetching tools (used for connected tools).

cancellationToken
CancellationToken

The cancellation token.

Returns

A dictionary mapping each tool Id to its resolved details. Tools that could not be resolved should be omitted.

Applies to