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).

All Events (alphabetical)

NameDescription
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.
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.
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.