TsgcWSAPIServer_MCP › Methods › SendNotificationProgress

SendNotificationProgress Method

Sends a notifications/progress notification for the request being processed.

Syntax

procedure SendNotificationProgress(const aSession: TsgcAI_MCP_Session; const aProgressToken: string; aProgress, aTotal: Double; const aMessage: string = '');

Parameters

NameTypeDescription
aSessionTsgcAI_MCP_SessionSession of the current request, as received in the request event.
aProgressTokenconst stringProgress token sent by the client, available in aRequest.ProgressToken.
aProgressDoubleCurrent progress value.
aTotalDoubleTotal value, if known.
aMessageconst stringOptional human readable message.

Remarks

For a 2026-07-28 request the notification is streamed in the response of the same request (Server-Sent Events over HTTP when the client accepts text/event-stream), and only when the request contains a progress token. For legacy sessions it is delivered through the session streams as before. See Logging and Progress.

Example

if aRequest.ProgressToken <> '' then
  MCPServer.SendNotificationProgress(aSession, aRequest.ProgressToken, 3, 10, 'Step 3 of 10');

Back to Methods