TTMSMCPSamplingMessageContent.CreateToolResult Method
Creates content carrying the outcome of a tool invocation.
API unit family: TMS.MCP.Sampling
Declaring type: TTMSMCPSamplingMessageContent
Syntax
class function CreateToolResult(const AToolUseId: string; AContent: TJSONArray; AIsError: Boolean = False): TTMSMCPSamplingMessageContent; static;
Parameters
| Name | Description |
|---|---|
AToolUseId |
Identifier of the invocation this outcome belongs to. |
AContent |
Outcome items to send back. The content takes ownership of them. |
AIsError |
When True, the outcome is reported to the model as a failure so that it can react to it; when False, it is reported as a normal result. Defaults to False. |
Returns
New content of kind smctToolResult, owned by the caller.