IMcpClientRoots
Provides access to MCP client roots for the current MCP session.
- Kind:
Interface - Namespace: Repl.Mcp
- Assembly:
Repl.Mcp - Source: src/Repl.Mcp/IMcpClientRoots.cs
Signature
Section titled “Signature”public interface IMcpClientRootsMethods
Section titled “Methods”ClearSoftRoots()
Section titled “ClearSoftRoots()”Clears the soft roots for the current session.
void ClearSoftRoots()GetAsync(CancellationToken)
Section titled “GetAsync(CancellationToken)”Resolves the current effective roots for the session, refreshing native roots on demand when supported.
ValueTask<IReadOnlyList<McpClientRoot>> GetAsync(CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”cancellationToken(CancellationToken)
Returns
Section titled “Returns”ValueTask<IReadOnlyList<McpClientRoot>>
SetSoftRoots(IEnumerable<McpClientRoot>)
Section titled “SetSoftRoots(IEnumerable<McpClientRoot>)”Sets soft roots for the current session.
void SetSoftRoots(IEnumerable<McpClientRoot> roots)Parameters
Section titled “Parameters”roots(IEnumerable<McpClientRoot>)
Properties
Section titled “Properties”Current
Section titled “Current”Gets the current effective roots for the session. Native roots are preferred when supported; otherwise soft roots are returned.
IReadOnlyList<McpClientRoot> Current { get; }Returns
Section titled “Returns”IReadOnlyList<McpClientRoot>
HasSoftRoots
Section titled “HasSoftRoots”Gets a value that indicates whether soft roots were configured for the current session.
bool HasSoftRoots { get; }Returns
Section titled “Returns”IsSupported
Section titled “IsSupported”Gets a value that indicates whether the connected MCP client supports native roots discovery.
bool IsSupported { get; }