TTMSMCPTool.Execute Method
Runs the tool through its positional callback. The method property is used when assigned, otherwise the execute event.
API unit family: TMS.MCP.Tools
Declaring type: TTMSMCPTool
Overloads
Overload 1
Runs the tool through its positional callback. The method property is used when assigned, otherwise the execute event.
function Execute(const Args: array of TValue): TValue; overload; virtual;
Parameters
| Name | Description |
|---|---|
Args |
The converted arguments, in parameter declaration order. |
Returns
The value returned by the callback.
Exceptions
| Exception | Description |
|---|---|
EJsonRpcException |
Raised with an internal-error code when neither the method property nor the execute event is assigned, and re-raised unchanged when the callback itself raises one. |
Overload 2
Runs the tool through its name-keyed callback. The dynamic method property is used when assigned, otherwise the dynamic execute event.
function Execute(const Args: TDictionary<string, TValue>): TValue; overload; virtual;
Parameters
| Name | Description |
|---|---|
Args |
The converted arguments keyed by parameter name. Optional parameters the caller omitted are absent from the dictionary. |
Returns
The value returned by the callback.
Exceptions
| Exception | Description |
|---|---|
EJsonRpcException |
Raised with an internal-error code when neither the dynamic method property nor the dynamic execute event is assigned, and re-raised unchanged when the callback itself raises one. |