Table of Contents

TTMSMCPServer.OnCompletion Event

Occurs when a client asks for argument auto-completion candidates for a prompt or resource template.

API unit family: TMS.MCP.Server Declaring type: TTMSMCPServer Inherited from: TTMSMCPCustomServer

Syntax

OnCompletion: TTMSMCPCompletionEvent;

Remarks

Without a handler the server answers every request with an empty candidate list, so enabling completions is only useful together with this event.

Parameters

Name Description
Sender Server that received the request.
ARef Reference object identifying what is being completed, typically a prompt or a resource template. It is owned by the server; do not free it.
AArgument Object holding the argument name and the partial value typed so far. It is owned by the server; do not free it.
AValues Candidate values to return. Assign the matches; leave it empty when nothing matches.
ATotal Total number of matches available, which may exceed the number of values actually returned.
AHasMore Set it to True when more candidates exist than were returned.