Table of Contents

TTMSMCPTool.ExecuteStructured Method

Runs the tool through its structured callback, which receives the arguments by name and returns a JSON object directly instead of a value that still has to be converted. Use it when the result must match a declared output schema.

API unit family: TMS.MCP.Tools Declaring type: TTMSMCPTool

Syntax

function ExecuteStructured(const AJsonParams: TJSONObject): TJSONObject;

Parameters

Name Description
AJsonParams The arguments object of the call, or nil when the call carried none. Ownership stays with the caller.

Returns

The JSON object produced by the structured callback, owned by the caller, or nil when no structured callback is assigned.

Exceptions

Exception Description
EJsonRpcException Raised with an invalid-parameters code when a required parameter is missing or a value does not match its declared type.