MCPcopy Create free account
hub / github.com/modelcontextprotocol/go-sdk / hasInitialized

Method hasInitialized

mcp/server.go:1137–1141  ·  view source on GitHub ↗

hasInitialized reports whether the server has received the initialized notification. TODO(findleyr): use this to prevent change notifications.

()

Source from the content-addressed store, hash-verified

1135//
1136// TODO(findleyr): use this to prevent change notifications.
1137func (ss *ServerSession) hasInitialized() bool {
1138 ss.mu.Lock()
1139 defer ss.mu.Unlock()
1140 return ss.state.InitializedParams != nil
1141}
1142
1143// checkInitialized returns a formatted error if the server has not yet
1144// received the initialized notification.

Callers 1

checkInitializedMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected