Skip to content
Tracon

IMcpResourceContextProviderFactory

Namespace Tracon · Assembly Tracon.Abstractions.dll

The factory that builds an AI.AIContextProvider for AgentDefinition.McpResourceUris (Mode A).

public interface IMcpResourceContextProviderFactory

The abstraction lives in Tracon.Abstractions because AgentDefinitionCompiler (Tracon.Core) wants to add MCP resources to the context but does not depend on the Tracon.Mcp package: MCP stays an optional package. Same reason as IMcpToolRefresher.

DI lifetime — singleton. Registered as a singleton with TryAdd; a consumer’s own registration wins. IMcpResourceContextProviderFactory.Create itself is a pure factory call — the returned AI.AIContextProvider carries the per-agent state, not this factory.

Builds a context provider from the given resource references.

AIContextProvider Create(IReadOnlyList<string> resourceReferences, string tenantId)

resourceReferences IReadOnlyList<string>

References in "{server}:{uri}" form (AgentDefinition.McpResourceUris).

tenantId string

The tenant identifier. Resources are read only from this tenant’s servers.

AIContextProvider

The context provider.