Table of Contents

TTMSMCPCustomClientConnection.OnToolResponse Event

Occurs when a tool call returns its content blocks.

API unit family: TMS.MCP.Client.Connection Declaring type: TTMSMCPCustomClientConnection

Syntax

OnToolResponse: TTMSMCPClientServerToolResponseEvent;

Remarks

Raised on the main thread. The handler may inspect the content but cannot change what the caller of the tool receives. When the call was issued on behalf of a waiting client, the text blocks are already combined and handed to that caller before this event is raised.

Parameters

Name Description
Sender Connection that received the result.
AId Identifier of the request the result answers, for matching it to the call that was issued.
AContent Array of content blocks. It belongs to the response being processed and is released as soon as the handler returns, so copy anything that must outlive the call; changing it does not change what the caller of the tool receives.
AIsError True when the server marked the result as an error result, False when the call succeeded.