TsgcWSAPIClient_MCPMethods › Complete

Complete Method

Requests argument autocomplete suggestions from the server (completion/complete).

Syntax

procedure Complete(const aRefType, aRefName, aArgumentName, aArgumentValue: string);

Parameters

NameTypeDescription
aRefTypeconst stringKind of the referenced object the user is editing. Typical values are ref/prompt or ref/resource.
aRefNameconst stringName or URI of the referenced prompt or resource template whose argument is being completed.
aArgumentNameconst stringName of the argument the user is currently typing.
aArgumentValueconst stringPartial value already typed by the user. The server uses it as the prefix when ranking suggestions.

Remarks

Sends the JSON-RPC completion/complete request. The response carries a list of suggested values (capped by the server, normally at 100 entries) along with a hasMore flag. Results are surfaced through the OnMCPCompletionComplete handler. The session must be in aimcpstInitialized state and the server must advertise the completions capability during initialize.

Example

MCP.Complete('ref/prompt', 'CodeReview', 'language', 'pas');

Back to Methods