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

Method handle

mcp/client.go:927–932  ·  view source on GitHub ↗
(ctx context.Context, req *jsonrpc.Request)

Source from the content-addressed store, hash-verified

925}
926
927func (cs *ClientSession) handle(ctx context.Context, req *jsonrpc.Request) (any, error) {
928 if req.IsCall() {
929 jsonrpc2.Async(ctx)
930 }
931 return handleReceive(ctx, cs, req)
932}
933
934func (cs *ClientSession) sendingMethodHandler() MethodHandler {
935 cs.client.mu.Lock()

Callers

nothing calls this directly

Calls 3

AsyncFunction · 0.92
handleReceiveFunction · 0.85
IsCallMethod · 0.80

Tested by

no test coverage detected