Skip to content
Tracon

IMcpToolRefresher

Namespace Tracon · Assembly Tracon.Abstractions.dll

Refreshes the tool list of remote MCP servers on demand.

public interface IMcpToolRefresher

Refreshing normally happens in the background, at fixed intervals. This interface exists so that when a server is newly added, the user does not have to wait for the next scheduled refresh.

The abstraction lives in Tracon.Abstractions because the HTTP layer triggers the refresh but does not depend on the Tracon.Mcp package: MCP stays an optional package.

DI lifetime — singleton. Registered as a singleton with TryAdd; a consumer’s own registration wins. The same instance also runs the background, fixed-interval refresh, so an implementation must be safe under a concurrent on-demand IMcpToolRefresher.RefreshAsync call.

Refreshes the tool list now.

ValueTask<McpRefreshOutcome> RefreshAsync(CancellationToken cancellationToken = default)

cancellationToken CancellationToken

The cancellation token.

ValueTask<McpRefreshOutcome>

The result of this refresh.