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

Function newRequest

mcp/shared.go:419–428  ·  view source on GitHub ↗
(s S, p P)

Source from the content-addressed store, hash-verified

417}
418
419func newRequest[S Session, P Params](s S, p P) Request {
420 switch s := any(s).(type) {
421 case *ClientSession:
422 return &ClientRequest[P]{Session: s, Params: p}
423 case *ServerSession:
424 return &ServerRequest[P]{Session: s, Params: p}
425 default:
426 panic("bad session")
427 }
428}
429
430// Meta is additional metadata for requests, responses and other types.
431type Meta map[string]any

Callers 1

notifySessionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…