McpServer.requireInitialized

Enforce the lifecycle rule that the server SHOULD NOT respond to a request (other than ping) before the client has sent notifications/initialized. With this enabled, a stateful session that receives e.g. tools/list after the initialize response but before notifications/initialized is rejected with -32002. initialize and ping are always allowed; the stateless path (which has no per-session initialized handshake) is exempt. OFF by default — the rule is a SHOULD and well-behaved clients send initialized immediately.

class McpServer
@safe
void
requireInitialized
()