TsgcWSAPIServer_MCP › Methods › RequestElicitationCreate
Sends an elicitation/create request asking the client to collect structured input from the user.
function RequestElicitationCreate(const aSessionId: string; const aRequest: TsgcAI_MCP_Request_ElicitationCreate): Boolean;
| Name | Type | Description |
|---|---|---|
aSessionId | const string | Identifier of the target MCP session. |
aRequest | const TsgcAI_MCP_Request_ElicitationCreate | Request object carrying the prompt Message shown to the user and the JSON RequestedSchema that describes the expected input. |
Returns True when the request has been written to the client connection; False when the session is unknown or offline. (Boolean)
Triggers an elicitation/create exchange so the client can open a UI, collect values matching the supplied JSON schema, and return them back to the server. The outcome is delivered asynchronously through OnMCPResponseElicitationCreate, where the Action field reports whether the user submitted (accept), skipped (decline) or cancelled the dialog. Use it to ask for missing arguments before completing a tool call.
var
oRequest: TsgcAI_MCP_Request_ElicitationCreate;
begin
oRequest := TsgcAI_MCP_Request_ElicitationCreate.Create;
try
oRequest.Params.Message := 'Please provide the deployment identifier.';
oRequest.Params.RequestedSchema.Properties.AddProperty('deploymentId', True, aimcpjtString, 'CI/CD deployment id');
MCPServer.RequestElicitationCreate(SessionId, oRequest);
finally
oRequest.Free;
end;
end;