Table of Contents

Method AddRootAsync

Namespace
LMKit.Mcp.Client
Assembly
LM-Kit.NET.dll

AddRootAsync(McpRoot, bool, CancellationToken)

Adds a root to the available roots list.

public Task AddRootAsync(McpRoot root, bool notifyServer = true, CancellationToken cancellationToken = default)

Parameters

root McpRoot

The root to add.

notifyServer bool

Whether to send a list_changed notification to the server.

cancellationToken CancellationToken

A token to cancel the operation.

Returns

Task

AddRootAsync(string, string, bool, CancellationToken)

Adds a root from a local filesystem path.

public Task AddRootAsync(string path, string name = null, bool notifyServer = true, CancellationToken cancellationToken = default)

Parameters

path string

The local filesystem path.

name string

Optional display name for the root.

notifyServer bool

Whether to send a list_changed notification to the server.

cancellationToken CancellationToken

A token to cancel the operation.

Returns

Task