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

Function NewNotification

internal/jsonrpc2/messages.go:96–99  ·  view source on GitHub ↗

NewNotification constructs a new Notification message for the supplied method and parameters.

(method string, params any)

Source from the content-addressed store, hash-verified

94// NewNotification constructs a new Notification message for the supplied
95// method and parameters.
96func NewNotification(method string, params any) (*Request, error) {
97 p, merr := marshalToRaw(params)
98 return &Request{Method: method, Params: p}, merr
99}
100
101// NewCall constructs a new Call message for the supplied ID, method and
102// parameters.

Callers 2

newNotificationFunction · 0.92
NotifyMethod · 0.85

Calls 1

marshalToRawFunction · 0.85

Tested by 1

newNotificationFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…