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

Method cancel

mcp/server.go:1491–1493  ·  view source on GitHub ↗

cancel is a placeholder: cancellation is handled the jsonrpc2 package. It should never be invoked in practice because cancellation is preempted, but having its signature here facilitates the construction of methodInfo that can be used to validate incoming cancellation notifications.

(context.Context, *CancelledParams)

Source from the content-addressed store, hash-verified

1489// but having its signature here facilitates the construction of methodInfo
1490// that can be used to validate incoming cancellation notifications.
1491func (ss *ServerSession) cancel(context.Context, *CancelledParams) (Result, error) {
1492 return nil, nil
1493}
1494
1495func (ss *ServerSession) setLevel(_ context.Context, params *SetLoggingLevelParams) (*emptyResult, error) {
1496 ss.updateState(func(state *ServerSessionState) {

Callers 4

CancelMethod · 0.45
processResultMethod · 0.45
writeMethod · 0.45
CloseMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected