TTMSMCPServer.OnAfterExecute Event
Occurs after a tool method has returned, with both the native return value and the JSON form that will be sent back to the client.
API unit family: TMS.MCP.Server
Declaring type: TTMSMCPServer
Inherited from: TTMSMCPCustomServer
Syntax
OnAfterExecute: TTMSMCPAfterExecuteToolEvent;
Remarks
The handler is raised for tools owned by this server component, after the return value has been converted to JSON and before the result is wrapped into the reply. An exception raised here is reported as an internal error.
Parameters
| Name | Description |
|---|---|
ATool |
Tool whose method has just run. |
ResultValue |
Native value returned by the tool method. |
ResultJSON |
JSON representation built from the return value. It is owned by the server; do not free it. |