TsgcWSAPIClient_MCP › Events

TsgcWSAPIClient_MCP Events

Events you can handle, grouped by purpose, followed by the full alphabetical list.

Session

NameDescription
OnMCPInitializeFires when the server replies to the initialize handshake; inspect capabilities and set Accept := False to abort.
OnMCPPingFires when the server acknowledges a ping. Useful for round-trip telemetry.
OnMCPStreamMessageFires while streaming responses are being read; inspect the raw JSON fragment and set Cancel := True to abort the stream.

Tools

NameDescription
OnMCPListToolsReceives the tools catalogue returned by tools/list.
OnMCPResponseToolDelivers the result of a tools/call invocation.

Prompts

NameDescription
OnMCPListPromptsReceives the prompt templates catalogue returned by prompts/list.
OnMCPResponsePromptDelivers the rendered prompt content returned by prompts/get.

Resources

NameDescription
OnMCPListResourcesReceives the resources catalogue returned by resources/list.
OnMCPResponseResourceDelivers the payload returned by resources/read, including streamed chunks.

Server-initiated

NameDescription
OnMCPListRootsFires when the server asks the client for its filesystem roots (roots/list).
OnMCPSamplingCreateMessageFires when the server asks the client to sample an LLM (sampling/createMessage).
OnMCPElicitationCreateFires when the server asks the user for additional input (elicitation/create).

Protocol 2026-07-28

NameDescription
OnMCPDiscoverFires when the server answers server/discover; set Accept := False to reject the server.
OnMCPListChangedFires when the server notifies that the tools, prompts or resources list changed.
OnMCPInputRequiredFires when the server answers with input_required and the client must provide the requested inputs.

Subscriptions

NameDescription
OnMCPSubscriptionAcknowledgedFires when the server accepts a subscription opened with subscriptions/listen.
OnMCPSubscriptionClosedFires when a subscription ends.
OnMCPResourcesUpdatedFires when a watched resource changed (notifications/resources/updated).

Tasks

NameDescription
OnMCPTaskCreatedFires when a tools/call returns a task handle instead of the tool result.
OnMCPTaskStatusFires when the status of a task changes.
OnMCPTaskCompletedFires when a task reaches a terminal status (completed, failed or cancelled).

Authorization

NameDescription
OnMCPAuthorizationURLFires with the URL the user must open to authorize the client.
OnMCPAuthorizationCredentialsFires to load or store the credentials of an authorization server.

All Events (alphabetical)

NameDescription
OnMCPAuthorizationCredentialsFires to load or store the credentials of an authorization server.
OnMCPAuthorizationURLFires with the URL the user must open to authorize the client.
OnMCPDiscoverFires when the server answers server/discover; set Accept := False to reject the server.
OnMCPElicitationCreateFires when the server asks the user for additional input (elicitation/create).
OnMCPInitializeFires when the server replies to the initialize handshake; inspect capabilities and set Accept := False to abort.
OnMCPInputRequiredFires when the server answers with input_required and the client must provide the requested inputs.
OnMCPListChangedFires when the server notifies that the tools, prompts or resources list changed.
OnMCPListPromptsReceives the prompt templates catalogue returned by prompts/list.
OnMCPListResourcesReceives the resources catalogue returned by resources/list.
OnMCPListRootsFires when the server asks the client for its filesystem roots (roots/list).
OnMCPListToolsReceives the tools catalogue returned by tools/list.
OnMCPPingFires when the server acknowledges a ping. Useful for round-trip telemetry.
OnMCPResourcesUpdatedFires when a watched resource changed (notifications/resources/updated).
OnMCPResponsePromptDelivers the rendered prompt content returned by prompts/get.
OnMCPResponseResourceDelivers the payload returned by resources/read, including streamed chunks.
OnMCPResponseToolDelivers the result of a tools/call invocation.
OnMCPSamplingCreateMessageFires when the server asks the client to sample an LLM (sampling/createMessage).
OnMCPStreamMessageFires while streaming responses are being read; inspect the raw JSON fragment and set Cancel := True to abort the stream.
OnMCPSubscriptionAcknowledgedFires when the server accepts a subscription opened with subscriptions/listen.
OnMCPSubscriptionClosedFires when a subscription ends.
OnMCPTaskCompletedFires when a task reaches a terminal status (completed, failed or cancelled).
OnMCPTaskCreatedFires when a tools/call returns a task handle instead of the tool result.
OnMCPTaskStatusFires when the status of a task changes.