Here are some other functions that doesn't fit in any categories before.
Sending notifications to clients
These functions allow the server to push messages to connected MCP clients at any time, without waiting for a client request.
BroadcastNotification: Sends a notification to all connected and initialized MCP clients simultaneously.
The notification is delivered immediately to every active session. It is fire-and-forget: the server does not wait for a client acknowledgment.
Method: The notification method name, e.g. "game/enemySpawned".
ParamsJson: The notification payload as a JSON string.
SendNotificationToSession: Sends a notification to a single connected MCP client, identified by its session ID:
SessionId: The target session ID. Use GetActiveSessions to retrieve available session IDs.
Method: The notification method name.
ParamsJson: The notification payload as a JSON string.
Utility Functions
These functions provide runtime information about the server state and registered content.
IsRunning: Returns whether the MCP server is currently running and accepting connections.
GetActiveSessions: Returns the list of session IDs for all currently connected and initialized MCP clients.
GetRegisteredTools: Returns the list of all resources and resource templates currently registered on the server.
GetRegisteredResources:
GetRegisteredNotifications: Returns the list of all notification methods currently registered on the server.