Table of Contents

Class ClientAppToolSource

Namespace
RDCore.SDK.Client
Assembly
RDCore.SDK.dll

The tools of the language server a client app is connected to, for an assistant bridge (McpToolServer): rdcore/tools/list and rdcore/tools/call sent over the app's LSP connection.

public sealed class ClientAppToolSource : IAssistantToolSource
Inheritance
ClientAppToolSource
Implements
Inherited Members

Remarks

The app must expect the AssistantTools capability (CorePlatformClientCapabilities): the language server refuses the requests of a client that did not advertise it. Cancelling a request sends $/cancelRequest.

Constructors

ClientAppToolSource(IRDCoreClientApp)

The tools of the language server a client app is connected to, for an assistant bridge (McpToolServer): rdcore/tools/list and rdcore/tools/call sent over the app's LSP connection.

public ClientAppToolSource(IRDCoreClientApp app)

Parameters

app IRDCoreClientApp

The client app whose connection the requests are sent over.

Remarks

The app must expect the AssistantTools capability (CorePlatformClientCapabilities): the language server refuses the requests of a client that did not advertise it. Cancelling a request sends $/cancelRequest.

Methods

CallAsync(ToolCallParams, CancellationToken)

Calls a tool (rdcore/tools/call).

public Task<ToolCallResult> CallAsync(ToolCallParams call, CancellationToken cancellationToken)

Parameters

call ToolCallParams

The tool and its arguments.

cancellationToken CancellationToken

A token that cancels the call.

Returns

Task<ToolCallResult>

What the tool answers.

ListAsync(CancellationToken)

Lists the tools (rdcore/tools/list).

public Task<ToolsListResult> ListAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

A token that cancels the request.

Returns

Task<ToolsListResult>

Every tool of the language server's catalog.

WaitForReadyAsync(CancellationToken)

Completes once the app's connection to the language server is ready (WaitForReadyAsync(CancellationToken)).

public Task WaitForReadyAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

A token that stops the wait.

Returns

Task

A task that completes when the connection is ready, and faults if it is lost first.