TsgcWSAPIClient_MCP › Events › OnMCPSubscriptionAcknowledged
Fires when the server accepts a subscription opened with subscriptions/listen.
property OnMCPSubscriptionAcknowledged: TsgcAI_MCP_Client_OnSubscriptionAcknowledgedEvent;
// TsgcAI_MCP_Client_OnSubscriptionAcknowledgedEvent = procedure(Sender: TObject; const aSubscriptionId, aNotifications: string) of object
—
aSubscriptionId is the value returned by SubscriptionsListen. aNotifications is the raw JSON of the notifications the server honors, which can be a subset of the requested ones.
With the HTTP transports the event runs in a background thread; use TThread.Queue or TThread.Synchronize to update visual controls. See Subscriptions.
procedure TMainForm.MCPSubscriptionAcknowledged(Sender: TObject;
const aSubscriptionId, aNotifications: string);
begin
Log('listening ' + aSubscriptionId + ': ' + aNotifications);
end;