Table of Contents

TTMSMCPToolBuilder.DynamicExecuteCallback Method

Assigns the callback that runs when the tool is invoked, receiving its arguments keyed by parameter name. Choose it over the positional callback when optional parameters may be absent from a call.

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

Syntax

class function DynamicExecuteCallback(const ACallback: TTMSMCPDynamicMethod): TTMSMCPToolBuilderClass;

Parameters

Name Description
ACallback The anonymous method to run. It must be assigned.

Returns

The tool builder class, so the configuration can be chained.

Exceptions

Exception Description
EJsonRpcException Raised with an invalid-parameters code when the callback is not assigned.