TTMSMCPServer.RequestElicitation Method
Asks the connected client to collect input from its user and blocks until the client answers.
API unit family: TMS.MCP.Server
Declaring type: TTMSMCPServer
Inherited from: TTMSMCPCustomServer
Syntax
function RequestElicitation(const ARequest: TTMSMCPElicitRequest): TTMSMCPElicitResult;
Remarks
Call this from inside a tool implementation so the request is routed to the session that made the call. Inspect the action on the returned result: the user may have declined or cancelled rather than submitted values.
Parameters
| Name | Description |
|---|---|
ARequest |
Prompt message and the schema of the fields to collect. |
Returns
Result reported by the client, including the action taken and any collected content.
Exceptions
| Exception | Description |
|---|---|
Exception |
Raised when no client has initialized, when elicitation is disabled, when the client reports an error, or when no valid response arrives. |