diff --git a/services/identity/identity.vdl.go b/services/identity/identity.vdl.go
index 46ed9a3..9243b32 100644
--- a/services/identity/identity.vdl.go
+++ b/services/identity/identity.vdl.go
@@ -93,7 +93,7 @@
 type OAuthBlesserServerMethods interface {
 	// BlessUsingAccessToken uses the provided access token to obtain the email
 	// address and returns a blessing along with the email address.
-	BlessUsingAccessToken(ctx ipc.ServerCall, token string) (blessing security.Blessings, email string, err error)
+	BlessUsingAccessToken(call ipc.ServerCall, token string) (blessing security.Blessings, email string, err error)
 }
 
 // OAuthBlesserServerStubMethods is the server interface containing
@@ -131,8 +131,8 @@
 	gs   *ipc.GlobState
 }
 
-func (s implOAuthBlesserServerStub) BlessUsingAccessToken(ctx ipc.ServerCall, i0 string) (security.Blessings, string, error) {
-	return s.impl.BlessUsingAccessToken(ctx, i0)
+func (s implOAuthBlesserServerStub) BlessUsingAccessToken(call ipc.ServerCall, i0 string) (security.Blessings, string, error) {
+	return s.impl.BlessUsingAccessToken(call, i0)
 }
 
 func (s implOAuthBlesserServerStub) Globber() *ipc.GlobState {
@@ -221,7 +221,7 @@
 type MacaroonBlesserServerMethods interface {
 	// Bless uses the provided macaroon (which contains email and caveats)
 	// to return a blessing for the client.
-	Bless(ctx ipc.ServerCall, macaroon string) (blessing security.Blessings, err error)
+	Bless(call ipc.ServerCall, macaroon string) (blessing security.Blessings, err error)
 }
 
 // MacaroonBlesserServerStubMethods is the server interface containing
@@ -259,8 +259,8 @@
 	gs   *ipc.GlobState
 }
 
-func (s implMacaroonBlesserServerStub) Bless(ctx ipc.ServerCall, i0 string) (security.Blessings, error) {
-	return s.impl.Bless(ctx, i0)
+func (s implMacaroonBlesserServerStub) Bless(call ipc.ServerCall, i0 string) (security.Blessings, error) {
+	return s.impl.Bless(call, i0)
 }
 
 func (s implMacaroonBlesserServerStub) Globber() *ipc.GlobState {
diff --git a/services/mgmt/binary/impl/service.go b/services/mgmt/binary/impl/service.go
index e258c30..75b4a98 100644
--- a/services/mgmt/binary/impl/service.go
+++ b/services/mgmt/binary/impl/service.go
@@ -217,7 +217,7 @@
 	return nil
 }
 
-func (i *binaryService) Download(context repository.BinaryDownloadContext, part int32) error {
+func (i *binaryService) Download(call repository.BinaryDownloadServerCall, part int32) error {
 	vlog.Infof("%v.Download(%v)", i.suffix, part)
 	path := i.generatePartPath(int(part))
 	if err := checksumExists(path); err != nil {
@@ -227,23 +227,23 @@
 	file, err := os.Open(dataPath)
 	if err != nil {
 		vlog.Errorf("Open(%v) failed: %v", dataPath, err)
-		return verror.New(ErrOperationFailed, context.Context())
+		return verror.New(ErrOperationFailed, call.Context())
 	}
 	defer file.Close()
 	buffer := make([]byte, BufferLength)
-	sender := context.SendStream()
+	sender := call.SendStream()
 	for {
 		n, err := file.Read(buffer)
 		if err != nil && err != io.EOF {
 			vlog.Errorf("Read() failed: %v", err)
-			return verror.New(ErrOperationFailed, context.Context())
+			return verror.New(ErrOperationFailed, call.Context())
 		}
 		if n == 0 {
 			break
 		}
 		if err := sender.Send(buffer[:n]); err != nil {
 			vlog.Errorf("Send() failed: %v", err)
-			return verror.New(ErrOperationFailed, context.Context())
+			return verror.New(ErrOperationFailed, call.Context())
 		}
 	}
 	return nil
@@ -300,12 +300,12 @@
 	return result, mediaInfo, nil
 }
 
-func (i *binaryService) Upload(context repository.BinaryUploadContext, part int32) error {
+func (i *binaryService) Upload(call repository.BinaryUploadServerCall, part int32) error {
 	vlog.Infof("%v.Upload(%v)", i.suffix, part)
 	path, suffix := i.generatePartPath(int(part)), ""
 	err := checksumExists(path)
 	if err == nil {
-		return verror.New(verror.ErrExist, context.Context(), path)
+		return verror.New(verror.ErrExist, call.Context(), path)
 	} else if !verror.Is(err, verror.ErrNoExist.ID) {
 		return err
 	}
@@ -314,21 +314,21 @@
 	lockFile, err := os.OpenFile(lockPath, flags, perm)
 	if err != nil {
 		if os.IsExist(err) {
-			return verror.New(ErrInProgress, context.Context(), path)
+			return verror.New(ErrInProgress, call.Context(), path)
 		}
 		vlog.Errorf("OpenFile(%v, %v, %v) failed: %v", lockPath, flags, suffix, err)
-		return verror.New(ErrOperationFailed, context.Context())
+		return verror.New(ErrOperationFailed, call.Context())
 	}
 	defer os.Remove(lockFile.Name())
 	defer lockFile.Close()
 	file, err := ioutil.TempFile(path, suffix)
 	if err != nil {
 		vlog.Errorf("TempFile(%v, %v) failed: %v", path, suffix, err)
-		return verror.New(ErrOperationFailed, context.Context())
+		return verror.New(ErrOperationFailed, call.Context())
 	}
 	defer file.Close()
 	h := md5.New()
-	rStream := context.RecvStream()
+	rStream := call.RecvStream()
 	for rStream.Advance() {
 		bytes := rStream.Value()
 		if _, err := file.Write(bytes); err != nil {
@@ -336,7 +336,7 @@
 			if err := os.Remove(file.Name()); err != nil {
 				vlog.Errorf("Remove(%v) failed: %v", file.Name(), err)
 			}
-			return verror.New(ErrOperationFailed, context.Context())
+			return verror.New(ErrOperationFailed, call.Context())
 		}
 		h.Write(bytes)
 	}
@@ -346,7 +346,7 @@
 		if err := os.Remove(file.Name()); err != nil {
 			vlog.Errorf("Remove(%v) failed: %v", file.Name(), err)
 		}
-		return verror.New(ErrOperationFailed, context.Context())
+		return verror.New(ErrOperationFailed, call.Context())
 	}
 
 	hash := hex.EncodeToString(h.Sum(nil))
@@ -356,7 +356,7 @@
 		if err := os.Remove(file.Name()); err != nil {
 			vlog.Errorf("Remove(%v) failed: %v", file.Name(), err)
 		}
-		return verror.New(ErrOperationFailed, context.Context())
+		return verror.New(ErrOperationFailed, call.Context())
 	}
 	dataFile := filepath.Join(path, dataFileName)
 	if err := os.Rename(file.Name(), dataFile); err != nil {
@@ -364,7 +364,7 @@
 		if err := os.Remove(file.Name()); err != nil {
 			vlog.Errorf("Remove(%v) failed: %v", file.Name(), err)
 		}
-		return verror.New(ErrOperationFailed, context.Context())
+		return verror.New(ErrOperationFailed, call.Context())
 	}
 	return nil
 }
diff --git a/services/mgmt/build/impl/service.go b/services/mgmt/build/impl/service.go
index a35224b..757f987 100644
--- a/services/mgmt/build/impl/service.go
+++ b/services/mgmt/build/impl/service.go
@@ -42,14 +42,14 @@
 //
 // TODO(jsimsa): Analyze the binary files for shared library
 // dependencies and ship these back.
-func (i *builderService) Build(ctx build.BuilderBuildContext, arch build.Architecture, opsys build.OperatingSystem) ([]byte, error) {
+func (i *builderService) Build(call build.BuilderBuildServerCall, arch build.Architecture, opsys build.OperatingSystem) ([]byte, error) {
 	vlog.VI(1).Infof("Build(%v, %v) called.", arch, opsys)
 	dir, prefix := "", ""
 	dirPerm, filePerm := os.FileMode(0700), os.FileMode(0600)
 	root, err := ioutil.TempDir(dir, prefix)
 	if err != nil {
 		vlog.Errorf("TempDir(%v, %v) failed: %v", dir, prefix, err)
-		return nil, verror.New(verror.ErrInternal, ctx.Context())
+		return nil, verror.New(verror.ErrInternal, call.Context())
 	}
 	defer os.RemoveAll(root)
 	if err := os.Chdir(root); err != nil {
@@ -58,25 +58,25 @@
 	srcDir := filepath.Join(root, "go", "src")
 	if err := os.MkdirAll(srcDir, dirPerm); err != nil {
 		vlog.Errorf("MkdirAll(%v, %v) failed: %v", srcDir, dirPerm, err)
-		return nil, verror.New(verror.ErrInternal, ctx.Context())
+		return nil, verror.New(verror.ErrInternal, call.Context())
 	}
-	iterator := ctx.RecvStream()
+	iterator := call.RecvStream()
 	for iterator.Advance() {
 		srcFile := iterator.Value()
 		filePath := filepath.Join(srcDir, filepath.FromSlash(srcFile.Name))
 		dir := filepath.Dir(filePath)
 		if err := os.MkdirAll(dir, dirPerm); err != nil {
 			vlog.Errorf("MkdirAll(%v, %v) failed: %v", dir, dirPerm, err)
-			return nil, verror.New(verror.ErrInternal, ctx.Context())
+			return nil, verror.New(verror.ErrInternal, call.Context())
 		}
 		if err := ioutil.WriteFile(filePath, srcFile.Contents, filePerm); err != nil {
 			vlog.Errorf("WriteFile(%v, %v) failed: %v", filePath, filePerm, err)
-			return nil, verror.New(verror.ErrInternal, ctx.Context())
+			return nil, verror.New(verror.ErrInternal, call.Context())
 		}
 	}
 	if err := iterator.Err(); err != nil {
 		vlog.Errorf("Advance() failed: %v", err)
-		return nil, verror.New(verror.ErrInternal, ctx.Context())
+		return nil, verror.New(verror.ErrInternal, call.Context())
 	}
 	cmd := exec.Command(i.gobin, "install", "-v", "./...")
 	cmd.Env = append(cmd.Env, "GOARCH="+string(arch))
@@ -93,7 +93,7 @@
 		if output.Len() != 0 {
 			vlog.Errorf("%v", output.String())
 		}
-		return output.Bytes(), verror.New(errBuildFailed, ctx.Context())
+		return output.Bytes(), verror.New(errBuildFailed, call.Context())
 	}
 	binDir := filepath.Join(root, "go", "bin")
 	if runtime.GOARCH != string(arch) || runtime.GOOS != string(opsys) {
@@ -102,22 +102,22 @@
 	files, err := ioutil.ReadDir(binDir)
 	if err != nil && !os.IsNotExist(err) {
 		vlog.Errorf("ReadDir(%v) failed: %v", binDir, err)
-		return nil, verror.New(verror.ErrInternal, ctx.Context())
+		return nil, verror.New(verror.ErrInternal, call.Context())
 	}
 	for _, file := range files {
 		binPath := filepath.Join(binDir, file.Name())
 		bytes, err := ioutil.ReadFile(binPath)
 		if err != nil {
 			vlog.Errorf("ReadFile(%v) failed: %v", binPath, err)
-			return nil, verror.New(verror.ErrInternal, ctx.Context())
+			return nil, verror.New(verror.ErrInternal, call.Context())
 		}
 		result := build.File{
 			Name:     "bin/" + file.Name(),
 			Contents: bytes,
 		}
-		if err := ctx.SendStream().Send(result); err != nil {
+		if err := call.SendStream().Send(result); err != nil {
 			vlog.Errorf("Send() failed: %v", err)
-			return nil, verror.New(verror.ErrInternal, ctx.Context())
+			return nil, verror.New(verror.ErrInternal, call.Context())
 		}
 	}
 	return output.Bytes(), nil
diff --git a/services/mgmt/device/config.vdl.go b/services/mgmt/device/config.vdl.go
index e9c48a9..a087027 100644
--- a/services/mgmt/device/config.vdl.go
+++ b/services/mgmt/device/config.vdl.go
@@ -63,7 +63,7 @@
 // Config is an RPC API to the config service.
 type ConfigServerMethods interface {
 	// Set sets the value for key.
-	Set(ctx ipc.ServerCall, key string, value string) error
+	Set(call ipc.ServerCall, key string, value string) error
 }
 
 // ConfigServerStubMethods is the server interface containing
@@ -101,8 +101,8 @@
 	gs   *ipc.GlobState
 }
 
-func (s implConfigServerStub) Set(ctx ipc.ServerCall, i0 string, i1 string) error {
-	return s.impl.Set(ctx, i0, i1)
+func (s implConfigServerStub) Set(call ipc.ServerCall, i0 string, i1 string) error {
+	return s.impl.Set(call, i0, i1)
 }
 
 func (s implConfigServerStub) Globber() *ipc.GlobState {
diff --git a/services/mgmt/device/impl/mock_repo_test.go b/services/mgmt/device/impl/mock_repo_test.go
index 834474b..8eb3e4e 100644
--- a/services/mgmt/device/impl/mock_repo_test.go
+++ b/services/mgmt/device/impl/mock_repo_test.go
@@ -117,17 +117,17 @@
 	return nil
 }
 
-func (i *brInvoker) Download(ctx repository.BinaryDownloadContext, _ int32) error {
+func (i *brInvoker) Download(call repository.BinaryDownloadServerCall, _ int32) error {
 	vlog.VI(1).Infof("Download()")
 	file, err := os.Open(os.Args[0])
 	if err != nil {
 		vlog.Errorf("Open() failed: %v", err)
-		return verror.New(ErrOperationFailed, ctx.Context())
+		return verror.New(ErrOperationFailed, call.Context())
 	}
 	defer file.Close()
 	bufferLength := 4096
 	buffer := make([]byte, bufferLength)
-	sender := ctx.SendStream()
+	sender := call.SendStream()
 	for {
 		n, err := file.Read(buffer)
 		switch err {
@@ -136,11 +136,11 @@
 		case nil:
 			if err := sender.Send(buffer[:n]); err != nil {
 				vlog.Errorf("Send() failed: %v", err)
-				return verror.New(ErrOperationFailed, ctx.Context())
+				return verror.New(ErrOperationFailed, call.Context())
 			}
 		default:
 			vlog.Errorf("Read() failed: %v", err)
-			return verror.New(ErrOperationFailed, ctx.Context())
+			return verror.New(ErrOperationFailed, call.Context())
 		}
 	}
 }
@@ -162,7 +162,7 @@
 	return []binary.PartInfo{part}, repository.MediaInfo{Type: "application/octet-stream"}, nil
 }
 
-func (i *brInvoker) Upload(repository.BinaryUploadContext, int32) error {
+func (i *brInvoker) Upload(repository.BinaryUploadServerCall, int32) error {
 	vlog.VI(1).Infof("Upload()")
 	return nil
 }
diff --git a/services/mgmt/logreader/impl/logfile.go b/services/mgmt/logreader/impl/logfile.go
index 6013859..b3f536b 100644
--- a/services/mgmt/logreader/impl/logfile.go
+++ b/services/mgmt/logreader/impl/logfile.go
@@ -74,7 +74,7 @@
 }
 
 // ReadLog returns log entries from the log file.
-func (i *logfileService) ReadLog(ctx logreader.LogFileReadLogContext, startpos int64, numEntries int32, follow bool) (int64, error) {
+func (i *logfileService) ReadLog(call logreader.LogFileReadLogServerCall, startpos int64, numEntries int32, follow bool) (int64, error) {
 	vlog.VI(1).Infof("%v.ReadLog(%v, %v, %v)", i.suffix, startpos, numEntries, follow)
 	fname, err := translateNameToFilename(i.root, i.suffix)
 	if err != nil {
@@ -83,11 +83,11 @@
 	f, err := os.Open(fname)
 	if err != nil {
 		if os.IsNotExist(err) {
-			return 0, verror.New(verror.ErrNoExist, ctx.Context(), fname)
+			return 0, verror.New(verror.ErrNoExist, call.Context(), fname)
 		}
-		return 0, verror.New(errOperationFailed, ctx.Context(), fname)
+		return 0, verror.New(errOperationFailed, call.Context(), fname)
 	}
-	reader := newFollowReader(ctx, f, startpos, follow)
+	reader := newFollowReader(call, f, startpos, follow)
 	if numEntries == types.AllEntries {
 		numEntries = int32(math.MaxInt32)
 	}
@@ -97,12 +97,12 @@
 			return reader.tell(), nil
 		}
 		if err == io.EOF {
-			return reader.tell(), types.NewErrEOF(ctx.Context())
+			return reader.tell(), types.NewErrEOF(call.Context())
 		}
 		if err != nil {
-			return reader.tell(), verror.New(errOperationFailed, ctx.Context(), fname)
+			return reader.tell(), verror.New(errOperationFailed, call.Context(), fname)
 		}
-		if err := ctx.SendStream().Send(types.LogEntry{Position: offset, Line: line}); err != nil {
+		if err := call.SendStream().Send(types.LogEntry{Position: offset, Line: line}); err != nil {
 			return reader.tell(), err
 		}
 	}
diff --git a/services/mgmt/pprof/impl/server.go b/services/mgmt/pprof/impl/server.go
index 2a4fbc5..d83cf04 100644
--- a/services/mgmt/pprof/impl/server.go
+++ b/services/mgmt/pprof/impl/server.go
@@ -48,25 +48,25 @@
 // addresses that pprof needs. Passing debug=1 adds comments translating
 // addresses to function names and line numbers, so that a programmer
 // can read the profile without tools.
-func (pprofService) Profile(ctx spprof.PProfProfileContext, name string, debug int32) error {
+func (pprofService) Profile(call spprof.PProfProfileServerCall, name string, debug int32) error {
 	profile := pprof.Lookup(name)
 	if profile == nil {
-		return verror.New(errNoProfile, ctx.Context(), name)
+		return verror.New(errNoProfile, call.Context(), name)
 	}
-	if err := profile.WriteTo(&streamWriter{ctx.SendStream()}, int(debug)); err != nil {
-		return verror.Convert(verror.ErrUnknown, ctx.Context(), err)
+	if err := profile.WriteTo(&streamWriter{call.SendStream()}, int(debug)); err != nil {
+		return verror.Convert(verror.ErrUnknown, call.Context(), err)
 	}
 	return nil
 }
 
 // CPUProfile enables CPU profiling for the requested duration and
 // streams the profile data.
-func (pprofService) CPUProfile(ctx spprof.PProfCPUProfileContext, seconds int32) error {
+func (pprofService) CPUProfile(call spprof.PProfCPUProfileServerCall, seconds int32) error {
 	if seconds <= 0 || seconds > 3600 {
-		return verror.New(errInvalidSeconds, ctx.Context(), seconds)
+		return verror.New(errInvalidSeconds, call.Context(), seconds)
 	}
-	if err := pprof.StartCPUProfile(&streamWriter{ctx.SendStream()}); err != nil {
-		return verror.Convert(verror.ErrUnknown, ctx.Context(), err)
+	if err := pprof.StartCPUProfile(&streamWriter{call.SendStream()}); err != nil {
+		return verror.Convert(verror.ErrUnknown, call.Context(), err)
 	}
 	time.Sleep(time.Duration(seconds) * time.Second)
 	pprof.StopCPUProfile()
diff --git a/services/mgmt/repository/repository.vdl.go b/services/mgmt/repository/repository.vdl.go
index 68122fd..d3c3fa6 100644
--- a/services/mgmt/repository/repository.vdl.go
+++ b/services/mgmt/repository/repository.vdl.go
@@ -122,7 +122,7 @@
 	// Put adds the given tuple of application version (specified
 	// through the object name suffix) and application envelope to all
 	// of the given application profiles.
-	Put(ctx ipc.ServerCall, Profiles []string, Envelope application.Envelope) error
+	Put(call ipc.ServerCall, Profiles []string, Envelope application.Envelope) error
 	// Remove removes the application envelope for the given profile
 	// name and application version (specified through the object name
 	// suffix). If no version is specified as part of the suffix, the
@@ -130,7 +130,7 @@
 	//
 	// TODO(jsimsa): Add support for using "*" to specify all profiles
 	// when Matt implements Globing (or Ken implements querying).
-	Remove(ctx ipc.ServerCall, Profile string) error
+	Remove(call ipc.ServerCall, Profile string) error
 }
 
 // ApplicationServerStubMethods is the server interface containing
@@ -170,12 +170,12 @@
 	gs *ipc.GlobState
 }
 
-func (s implApplicationServerStub) Put(ctx ipc.ServerCall, i0 []string, i1 application.Envelope) error {
-	return s.impl.Put(ctx, i0, i1)
+func (s implApplicationServerStub) Put(call ipc.ServerCall, i0 []string, i1 application.Envelope) error {
+	return s.impl.Put(call, i0, i1)
 }
 
-func (s implApplicationServerStub) Remove(ctx ipc.ServerCall, i0 string) error {
-	return s.impl.Remove(ctx, i0)
+func (s implApplicationServerStub) Remove(call ipc.ServerCall, i0 string) error {
+	return s.impl.Remove(call, i0)
 }
 
 func (s implApplicationServerStub) Globber() *ipc.GlobState {
@@ -314,7 +314,7 @@
 	Specification(ipc.ServerCall) (profile.Specification, error)
 	// Put sets the profile specification for the profile identified
 	// through the object name suffix.
-	Put(ctx ipc.ServerCall, Specification profile.Specification) error
+	Put(call ipc.ServerCall, Specification profile.Specification) error
 	// Remove removes the profile specification for the profile
 	// identified through the object name suffix.
 	Remove(ipc.ServerCall) error
@@ -357,16 +357,16 @@
 	gs *ipc.GlobState
 }
 
-func (s implProfileServerStub) Specification(ctx ipc.ServerCall) (profile.Specification, error) {
-	return s.impl.Specification(ctx)
+func (s implProfileServerStub) Specification(call ipc.ServerCall) (profile.Specification, error) {
+	return s.impl.Specification(call)
 }
 
-func (s implProfileServerStub) Put(ctx ipc.ServerCall, i0 profile.Specification) error {
-	return s.impl.Put(ctx, i0)
+func (s implProfileServerStub) Put(call ipc.ServerCall, i0 profile.Specification) error {
+	return s.impl.Put(call, i0)
 }
 
-func (s implProfileServerStub) Remove(ctx ipc.ServerCall) error {
-	return s.impl.Remove(ctx)
+func (s implProfileServerStub) Remove(call ipc.ServerCall) error {
+	return s.impl.Remove(call)
 }
 
 func (s implProfileServerStub) Globber() *ipc.GlobState {
diff --git a/services/mgmt/stats/impl/stats.go b/services/mgmt/stats/impl/stats.go
index caf1ee6..32abd7c 100644
--- a/services/mgmt/stats/impl/stats.go
+++ b/services/mgmt/stats/impl/stats.go
@@ -55,7 +55,7 @@
 
 // WatchGlob returns the name and value of the objects that match the request,
 // followed by periodic updates when values change.
-func (i *statsService) WatchGlob(ctx watch.GlobWatcherWatchGlobContext, req watchtypes.GlobRequest) error {
+func (i *statsService) WatchGlob(call watch.GlobWatcherWatchGlobServerCall, req watchtypes.GlobRequest) error {
 	vlog.VI(1).Infof("%v.WatchGlob(%+v)", i.suffix, req)
 
 	var t time.Time
@@ -76,17 +76,17 @@
 		}
 		if err := it.Err(); err != nil {
 			if err == libstats.ErrNotFound {
-				return verror.New(verror.ErrNoExist, ctx.Context(), i.suffix)
+				return verror.New(verror.ErrNoExist, call.Context(), i.suffix)
 			}
-			return verror.New(errOperationFailed, ctx.Context(), i.suffix)
+			return verror.New(errOperationFailed, call.Context(), i.suffix)
 		}
 		for _, change := range changes {
-			if err := ctx.SendStream().Send(change); err != nil {
+			if err := call.SendStream().Send(change); err != nil {
 				return err
 			}
 		}
 		select {
-		case <-ctx.Context().Done():
+		case <-call.Context().Done():
 			break Loop
 		case <-time.After(i.watchFreq):
 		}
diff --git a/services/mgmt/vtrace/impl/vtrace.go b/services/mgmt/vtrace/impl/vtrace.go
index 3f33148..c344825 100644
--- a/services/mgmt/vtrace/impl/vtrace.go
+++ b/services/mgmt/vtrace/impl/vtrace.go
@@ -19,13 +19,13 @@
 	return *tr, nil
 }
 
-func (v *vtraceService) AllTraces(ctx svtrace.StoreAllTracesContext) error {
+func (v *vtraceService) AllTraces(call svtrace.StoreAllTracesServerCall) error {
 	// TODO(mattr): Consider changing the store to allow us to iterate through traces
 	// when there are many.
-	store := vtrace.GetStore(ctx.Context())
+	store := vtrace.GetStore(call.Context())
 	traces := store.TraceRecords()
 	for i := range traces {
-		if err := ctx.SendStream().Send(traces[i]); err != nil {
+		if err := call.SendStream().Send(traces[i]); err != nil {
 			return err
 		}
 	}
diff --git a/services/mounttable/lib/collection_test_interface.vdl.go b/services/mounttable/lib/collection_test_interface.vdl.go
index 493f246..4d4a232 100644
--- a/services/mounttable/lib/collection_test_interface.vdl.go
+++ b/services/mounttable/lib/collection_test_interface.vdl.go
@@ -77,7 +77,7 @@
 	// an entry exists, if Overwrite is true, then the binding is replaced,
 	// otherwise the call fails with an error.  The Val must be no larger than
 	// MaxSize bytes.
-	Export(ctx ipc.ServerCall, Val string, Overwrite bool) error
+	Export(call ipc.ServerCall, Val string, Overwrite bool) error
 	// Lookup retrieves the value associated with a name.  Returns an error if
 	// there is no such binding.
 	Lookup(ipc.ServerCall) ([]byte, error)
@@ -118,12 +118,12 @@
 	gs   *ipc.GlobState
 }
 
-func (s implCollectionServerStub) Export(ctx ipc.ServerCall, i0 string, i1 bool) error {
-	return s.impl.Export(ctx, i0, i1)
+func (s implCollectionServerStub) Export(call ipc.ServerCall, i0 string, i1 bool) error {
+	return s.impl.Export(call, i0, i1)
 }
 
-func (s implCollectionServerStub) Lookup(ctx ipc.ServerCall) ([]byte, error) {
-	return s.impl.Lookup(ctx)
+func (s implCollectionServerStub) Lookup(call ipc.ServerCall) ([]byte, error) {
+	return s.impl.Lookup(call)
 }
 
 func (s implCollectionServerStub) Globber() *ipc.GlobState {
diff --git a/services/security/discharger.vdl.go b/services/security/discharger.vdl.go
index 3ea61b1..8c53b45 100644
--- a/services/security/discharger.vdl.go
+++ b/services/security/discharger.vdl.go
@@ -70,7 +70,7 @@
 	// Discharge is called by a principal that holds a blessing with a third
 	// party caveat and seeks to get a discharge that proves the fulfillment of
 	// this caveat.
-	Discharge(ctx ipc.ServerCall, Caveat security.Caveat, Impetus security.DischargeImpetus) (Discharge security.Discharge, err error)
+	Discharge(call ipc.ServerCall, Caveat security.Caveat, Impetus security.DischargeImpetus) (Discharge security.Discharge, err error)
 }
 
 // DischargerServerStubMethods is the server interface containing
@@ -108,8 +108,8 @@
 	gs   *ipc.GlobState
 }
 
-func (s implDischargerServerStub) Discharge(ctx ipc.ServerCall, i0 security.Caveat, i1 security.DischargeImpetus) (security.Discharge, error) {
-	return s.impl.Discharge(ctx, i0, i1)
+func (s implDischargerServerStub) Discharge(call ipc.ServerCall, i0 security.Caveat, i1 security.DischargeImpetus) (security.Discharge, error) {
+	return s.impl.Discharge(call, i0, i1)
 }
 
 func (s implDischargerServerStub) Globber() *ipc.GlobState {
diff --git a/services/wsprd/app/controller.vdl.go b/services/wsprd/app/controller.vdl.go
index 61951f1..73e5e3d 100644
--- a/services/wsprd/app/controller.vdl.go
+++ b/services/wsprd/app/controller.vdl.go
@@ -156,24 +156,24 @@
 type ControllerServerMethods interface {
 	// Serve instructs WSPR to start listening for calls on behalf
 	// of a javascript server.
-	Serve(ctx ipc.ServerCall, name string, serverId uint32) error
+	Serve(call ipc.ServerCall, name string, serverId uint32) error
 	// Stop instructs WSPR to stop listening for calls for the
 	// given javascript server.
-	Stop(ctx ipc.ServerCall, serverId uint32) error
+	Stop(call ipc.ServerCall, serverId uint32) error
 	// AddName adds a published name to an existing server.
-	AddName(ctx ipc.ServerCall, serverId uint32, name string) error
+	AddName(call ipc.ServerCall, serverId uint32, name string) error
 	// RemoveName removes a published name from an existing server.
-	RemoveName(ctx ipc.ServerCall, serverId uint32, name string) error
+	RemoveName(call ipc.ServerCall, serverId uint32, name string) error
 	// UnlinkJSBlessings removes the given blessings from the blessings store.
-	UnlinkJSBlessings(ctx ipc.ServerCall, handle int32) error
+	UnlinkJSBlessings(call ipc.ServerCall, handle int32) error
 	// BlessPublicKey creates a new blessing.
-	BlessPublicKey(ctx ipc.ServerCall, fromHandle int32, caveats []security.Caveat, durationMs time.Duration, extension string) (handle int32, publicKey string, err error)
+	BlessPublicKey(call ipc.ServerCall, fromHandle int32, caveats []security.Caveat, durationMs time.Duration, extension string) (handle int32, publicKey string, err error)
 	// CreateBlessings creates a new principal self-blessed with the given extension.
-	CreateBlessings(ctx ipc.ServerCall, extension string) (handle int32, publicKey string, err error)
+	CreateBlessings(call ipc.ServerCall, extension string) (handle int32, publicKey string, err error)
 	// RemoteBlessings fetches the remote blessings for a given name and method.
-	RemoteBlessings(ctx ipc.ServerCall, name string, method string) ([]string, error)
+	RemoteBlessings(call ipc.ServerCall, name string, method string) ([]string, error)
 	// Signature fetches the signature for a given name.
-	Signature(ctx ipc.ServerCall, name string) ([]signature.Interface, error)
+	Signature(call ipc.ServerCall, name string) ([]signature.Interface, error)
 }
 
 // ControllerServerStubMethods is the server interface containing
@@ -211,40 +211,40 @@
 	gs   *ipc.GlobState
 }
 
-func (s implControllerServerStub) Serve(ctx ipc.ServerCall, i0 string, i1 uint32) error {
-	return s.impl.Serve(ctx, i0, i1)
+func (s implControllerServerStub) Serve(call ipc.ServerCall, i0 string, i1 uint32) error {
+	return s.impl.Serve(call, i0, i1)
 }
 
-func (s implControllerServerStub) Stop(ctx ipc.ServerCall, i0 uint32) error {
-	return s.impl.Stop(ctx, i0)
+func (s implControllerServerStub) Stop(call ipc.ServerCall, i0 uint32) error {
+	return s.impl.Stop(call, i0)
 }
 
-func (s implControllerServerStub) AddName(ctx ipc.ServerCall, i0 uint32, i1 string) error {
-	return s.impl.AddName(ctx, i0, i1)
+func (s implControllerServerStub) AddName(call ipc.ServerCall, i0 uint32, i1 string) error {
+	return s.impl.AddName(call, i0, i1)
 }
 
-func (s implControllerServerStub) RemoveName(ctx ipc.ServerCall, i0 uint32, i1 string) error {
-	return s.impl.RemoveName(ctx, i0, i1)
+func (s implControllerServerStub) RemoveName(call ipc.ServerCall, i0 uint32, i1 string) error {
+	return s.impl.RemoveName(call, i0, i1)
 }
 
-func (s implControllerServerStub) UnlinkJSBlessings(ctx ipc.ServerCall, i0 int32) error {
-	return s.impl.UnlinkJSBlessings(ctx, i0)
+func (s implControllerServerStub) UnlinkJSBlessings(call ipc.ServerCall, i0 int32) error {
+	return s.impl.UnlinkJSBlessings(call, i0)
 }
 
-func (s implControllerServerStub) BlessPublicKey(ctx ipc.ServerCall, i0 int32, i1 []security.Caveat, i2 time.Duration, i3 string) (int32, string, error) {
-	return s.impl.BlessPublicKey(ctx, i0, i1, i2, i3)
+func (s implControllerServerStub) BlessPublicKey(call ipc.ServerCall, i0 int32, i1 []security.Caveat, i2 time.Duration, i3 string) (int32, string, error) {
+	return s.impl.BlessPublicKey(call, i0, i1, i2, i3)
 }
 
-func (s implControllerServerStub) CreateBlessings(ctx ipc.ServerCall, i0 string) (int32, string, error) {
-	return s.impl.CreateBlessings(ctx, i0)
+func (s implControllerServerStub) CreateBlessings(call ipc.ServerCall, i0 string) (int32, string, error) {
+	return s.impl.CreateBlessings(call, i0)
 }
 
-func (s implControllerServerStub) RemoteBlessings(ctx ipc.ServerCall, i0 string, i1 string) ([]string, error) {
-	return s.impl.RemoteBlessings(ctx, i0, i1)
+func (s implControllerServerStub) RemoteBlessings(call ipc.ServerCall, i0 string, i1 string) ([]string, error) {
+	return s.impl.RemoteBlessings(call, i0, i1)
 }
 
-func (s implControllerServerStub) Signature(ctx ipc.ServerCall, i0 string) ([]signature.Interface, error) {
-	return s.impl.Signature(ctx, i0)
+func (s implControllerServerStub) Signature(call ipc.ServerCall, i0 string) ([]signature.Interface, error) {
+	return s.impl.Signature(call, i0)
 }
 
 func (s implControllerServerStub) Globber() *ipc.GlobState {
diff --git a/services/wsprd/namespace/namespace.vdl.go b/services/wsprd/namespace/namespace.vdl.go
index 143b005..082c19a 100644
--- a/services/wsprd/namespace/namespace.vdl.go
+++ b/services/wsprd/namespace/namespace.vdl.go
@@ -75,7 +75,7 @@
 // TODO(nlacasse,bprosnitz): Remove this unused type and the security import
 // once https://github.com/veyron/release-issues/issues/1202 is fixed.
 type WorkaroundServerMethods interface {
-	Unused(ctx ipc.ServerCall, unused security.BlessingPattern) error
+	Unused(call ipc.ServerCall, unused security.BlessingPattern) error
 }
 
 // WorkaroundServerStubMethods is the server interface containing
@@ -113,8 +113,8 @@
 	gs   *ipc.GlobState
 }
 
-func (s implWorkaroundServerStub) Unused(ctx ipc.ServerCall, i0 security.BlessingPattern) error {
-	return s.impl.Unused(ctx, i0)
+func (s implWorkaroundServerStub) Unused(call ipc.ServerCall, i0 security.BlessingPattern) error {
+	return s.impl.Unused(call, i0)
 }
 
 func (s implWorkaroundServerStub) Globber() *ipc.GlobState {
@@ -353,21 +353,21 @@
 	Value() naming.VDLGlobReply
 	Err() error
 } {
-	return implNamespaceGlobCallRecv{c}
+	return implNamespaceGlobClientCallRecv{c}
 }
 
-type implNamespaceGlobCallRecv struct {
+type implNamespaceGlobClientCallRecv struct {
 	c *implNamespaceGlobClientCall
 }
 
-func (c implNamespaceGlobCallRecv) Advance() bool {
+func (c implNamespaceGlobClientCallRecv) Advance() bool {
 	c.c.errRecv = c.c.Recv(&c.c.valRecv)
 	return c.c.errRecv == nil
 }
-func (c implNamespaceGlobCallRecv) Value() naming.VDLGlobReply {
+func (c implNamespaceGlobClientCallRecv) Value() naming.VDLGlobReply {
 	return c.c.valRecv
 }
-func (c implNamespaceGlobCallRecv) Err() error {
+func (c implNamespaceGlobClientCallRecv) Err() error {
 	if c.c.errRecv == io.EOF {
 		return nil
 	}
@@ -382,30 +382,30 @@
 // implements for Namespace.
 type NamespaceServerMethods interface {
 	// Run a glob query and stream the results.
-	Glob(ctx NamespaceGlobContext, pattern string) error
+	Glob(call NamespaceGlobServerCall, pattern string) error
 	// Mount mounts a server under the given name.
-	Mount(ctx ipc.ServerCall, name string, server string, ttl time.Duration, replace bool) error
+	Mount(call ipc.ServerCall, name string, server string, ttl time.Duration, replace bool) error
 	// Unmount removes an existing mount point.
-	Unmount(ctx ipc.ServerCall, name string, server string) error
+	Unmount(call ipc.ServerCall, name string, server string) error
 	// Resolve resolves a name to an address.
-	Resolve(ctx ipc.ServerCall, name string) ([]string, error)
+	Resolve(call ipc.ServerCall, name string) ([]string, error)
 	// ResolveToMt resolves a name to the address of the mounttable directly
 	// hosting it.
-	ResolveToMT(ctx ipc.ServerCall, name string) ([]string, error)
+	ResolveToMT(call ipc.ServerCall, name string) ([]string, error)
 	// FlushCacheEntry removes the namespace cache entry for a given name.
-	FlushCacheEntry(ctx ipc.ServerCall, name string) (bool, error)
+	FlushCacheEntry(call ipc.ServerCall, name string) (bool, error)
 	// DisableCache disables the naming cache.
-	DisableCache(ctx ipc.ServerCall, disable bool) error
+	DisableCache(call ipc.ServerCall, disable bool) error
 	// Roots returns the addresses of the current mounttable roots.
 	Roots(ipc.ServerCall) ([]string, error)
 	// SetRoots sets the current mounttable roots.
-	SetRoots(ctx ipc.ServerCall, roots []string) error
+	SetRoots(call ipc.ServerCall, roots []string) error
 	// SetACL sets the ACL in a node in a mount table.
-	SetACL(ctx ipc.ServerCall, name string, acl access.TaggedACLMap, etag string) error
+	SetACL(call ipc.ServerCall, name string, acl access.TaggedACLMap, etag string) error
 	// GetACL returns the ACL in a node in a mount table.
-	GetACL(ctx ipc.ServerCall, name string) (acl access.TaggedACLMap, etag string, err error)
+	GetACL(call ipc.ServerCall, name string) (acl access.TaggedACLMap, etag string, err error)
 	// Delete deletes the name from the mounttable and, if requested, any subtree.
-	Delete(ctx ipc.ServerCall, name string, deleteSubtree bool) error
+	Delete(call ipc.ServerCall, name string, deleteSubtree bool) error
 }
 
 // NamespaceServerStubMethods is the server interface containing
@@ -414,30 +414,30 @@
 // is the streaming methods.
 type NamespaceServerStubMethods interface {
 	// Run a glob query and stream the results.
-	Glob(ctx *NamespaceGlobContextStub, pattern string) error
+	Glob(call *NamespaceGlobServerCallStub, pattern string) error
 	// Mount mounts a server under the given name.
-	Mount(ctx ipc.ServerCall, name string, server string, ttl time.Duration, replace bool) error
+	Mount(call ipc.ServerCall, name string, server string, ttl time.Duration, replace bool) error
 	// Unmount removes an existing mount point.
-	Unmount(ctx ipc.ServerCall, name string, server string) error
+	Unmount(call ipc.ServerCall, name string, server string) error
 	// Resolve resolves a name to an address.
-	Resolve(ctx ipc.ServerCall, name string) ([]string, error)
+	Resolve(call ipc.ServerCall, name string) ([]string, error)
 	// ResolveToMt resolves a name to the address of the mounttable directly
 	// hosting it.
-	ResolveToMT(ctx ipc.ServerCall, name string) ([]string, error)
+	ResolveToMT(call ipc.ServerCall, name string) ([]string, error)
 	// FlushCacheEntry removes the namespace cache entry for a given name.
-	FlushCacheEntry(ctx ipc.ServerCall, name string) (bool, error)
+	FlushCacheEntry(call ipc.ServerCall, name string) (bool, error)
 	// DisableCache disables the naming cache.
-	DisableCache(ctx ipc.ServerCall, disable bool) error
+	DisableCache(call ipc.ServerCall, disable bool) error
 	// Roots returns the addresses of the current mounttable roots.
 	Roots(ipc.ServerCall) ([]string, error)
 	// SetRoots sets the current mounttable roots.
-	SetRoots(ctx ipc.ServerCall, roots []string) error
+	SetRoots(call ipc.ServerCall, roots []string) error
 	// SetACL sets the ACL in a node in a mount table.
-	SetACL(ctx ipc.ServerCall, name string, acl access.TaggedACLMap, etag string) error
+	SetACL(call ipc.ServerCall, name string, acl access.TaggedACLMap, etag string) error
 	// GetACL returns the ACL in a node in a mount table.
-	GetACL(ctx ipc.ServerCall, name string) (acl access.TaggedACLMap, etag string, err error)
+	GetACL(call ipc.ServerCall, name string) (acl access.TaggedACLMap, etag string, err error)
 	// Delete deletes the name from the mounttable and, if requested, any subtree.
-	Delete(ctx ipc.ServerCall, name string, deleteSubtree bool) error
+	Delete(call ipc.ServerCall, name string, deleteSubtree bool) error
 }
 
 // NamespaceServerStub adds universal methods to NamespaceServerStubMethods.
@@ -469,52 +469,52 @@
 	gs   *ipc.GlobState
 }
 
-func (s implNamespaceServerStub) Glob(ctx *NamespaceGlobContextStub, i0 string) error {
-	return s.impl.Glob(ctx, i0)
+func (s implNamespaceServerStub) Glob(call *NamespaceGlobServerCallStub, i0 string) error {
+	return s.impl.Glob(call, i0)
 }
 
-func (s implNamespaceServerStub) Mount(ctx ipc.ServerCall, i0 string, i1 string, i2 time.Duration, i3 bool) error {
-	return s.impl.Mount(ctx, i0, i1, i2, i3)
+func (s implNamespaceServerStub) Mount(call ipc.ServerCall, i0 string, i1 string, i2 time.Duration, i3 bool) error {
+	return s.impl.Mount(call, i0, i1, i2, i3)
 }
 
-func (s implNamespaceServerStub) Unmount(ctx ipc.ServerCall, i0 string, i1 string) error {
-	return s.impl.Unmount(ctx, i0, i1)
+func (s implNamespaceServerStub) Unmount(call ipc.ServerCall, i0 string, i1 string) error {
+	return s.impl.Unmount(call, i0, i1)
 }
 
-func (s implNamespaceServerStub) Resolve(ctx ipc.ServerCall, i0 string) ([]string, error) {
-	return s.impl.Resolve(ctx, i0)
+func (s implNamespaceServerStub) Resolve(call ipc.ServerCall, i0 string) ([]string, error) {
+	return s.impl.Resolve(call, i0)
 }
 
-func (s implNamespaceServerStub) ResolveToMT(ctx ipc.ServerCall, i0 string) ([]string, error) {
-	return s.impl.ResolveToMT(ctx, i0)
+func (s implNamespaceServerStub) ResolveToMT(call ipc.ServerCall, i0 string) ([]string, error) {
+	return s.impl.ResolveToMT(call, i0)
 }
 
-func (s implNamespaceServerStub) FlushCacheEntry(ctx ipc.ServerCall, i0 string) (bool, error) {
-	return s.impl.FlushCacheEntry(ctx, i0)
+func (s implNamespaceServerStub) FlushCacheEntry(call ipc.ServerCall, i0 string) (bool, error) {
+	return s.impl.FlushCacheEntry(call, i0)
 }
 
-func (s implNamespaceServerStub) DisableCache(ctx ipc.ServerCall, i0 bool) error {
-	return s.impl.DisableCache(ctx, i0)
+func (s implNamespaceServerStub) DisableCache(call ipc.ServerCall, i0 bool) error {
+	return s.impl.DisableCache(call, i0)
 }
 
-func (s implNamespaceServerStub) Roots(ctx ipc.ServerCall) ([]string, error) {
-	return s.impl.Roots(ctx)
+func (s implNamespaceServerStub) Roots(call ipc.ServerCall) ([]string, error) {
+	return s.impl.Roots(call)
 }
 
-func (s implNamespaceServerStub) SetRoots(ctx ipc.ServerCall, i0 []string) error {
-	return s.impl.SetRoots(ctx, i0)
+func (s implNamespaceServerStub) SetRoots(call ipc.ServerCall, i0 []string) error {
+	return s.impl.SetRoots(call, i0)
 }
 
-func (s implNamespaceServerStub) SetACL(ctx ipc.ServerCall, i0 string, i1 access.TaggedACLMap, i2 string) error {
-	return s.impl.SetACL(ctx, i0, i1, i2)
+func (s implNamespaceServerStub) SetACL(call ipc.ServerCall, i0 string, i1 access.TaggedACLMap, i2 string) error {
+	return s.impl.SetACL(call, i0, i1, i2)
 }
 
-func (s implNamespaceServerStub) GetACL(ctx ipc.ServerCall, i0 string) (access.TaggedACLMap, string, error) {
-	return s.impl.GetACL(ctx, i0)
+func (s implNamespaceServerStub) GetACL(call ipc.ServerCall, i0 string) (access.TaggedACLMap, string, error) {
+	return s.impl.GetACL(call, i0)
 }
 
-func (s implNamespaceServerStub) Delete(ctx ipc.ServerCall, i0 string, i1 bool) error {
-	return s.impl.Delete(ctx, i0, i1)
+func (s implNamespaceServerStub) Delete(call ipc.ServerCall, i0 string, i1 bool) error {
+	return s.impl.Delete(call, i0, i1)
 }
 
 func (s implNamespaceServerStub) Globber() *ipc.GlobState {
@@ -651,34 +651,34 @@
 	}
 }
 
-// NamespaceGlobContext represents the context passed to Namespace.Glob.
-type NamespaceGlobContext interface {
+// NamespaceGlobServerCall represents the context passed to Namespace.Glob.
+type NamespaceGlobServerCall interface {
 	ipc.ServerCall
 	NamespaceGlobServerStream
 }
 
-// NamespaceGlobContextStub is a wrapper that converts ipc.StreamServerCall into
-// a typesafe stub that implements NamespaceGlobContext.
-type NamespaceGlobContextStub struct {
+// NamespaceGlobServerCallStub is a wrapper that converts ipc.StreamServerCall into
+// a typesafe stub that implements NamespaceGlobServerCall.
+type NamespaceGlobServerCallStub struct {
 	ipc.StreamServerCall
 }
 
-// Init initializes NamespaceGlobContextStub from ipc.StreamServerCall.
-func (s *NamespaceGlobContextStub) Init(call ipc.StreamServerCall) {
+// Init initializes NamespaceGlobServerCallStub from ipc.StreamServerCall.
+func (s *NamespaceGlobServerCallStub) Init(call ipc.StreamServerCall) {
 	s.StreamServerCall = call
 }
 
 // SendStream returns the send side of the Namespace.Glob server stream.
-func (s *NamespaceGlobContextStub) SendStream() interface {
+func (s *NamespaceGlobServerCallStub) SendStream() interface {
 	Send(item naming.VDLGlobReply) error
 } {
-	return implNamespaceGlobContextSend{s}
+	return implNamespaceGlobServerCallSend{s}
 }
 
-type implNamespaceGlobContextSend struct {
-	s *NamespaceGlobContextStub
+type implNamespaceGlobServerCallSend struct {
+	s *NamespaceGlobServerCallStub
 }
 
-func (s implNamespaceGlobContextSend) Send(item naming.VDLGlobReply) error {
+func (s implNamespaceGlobServerCallSend) Send(item naming.VDLGlobReply) error {
 	return s.s.Send(item)
 }
diff --git a/services/wsprd/namespace/request_handler.go b/services/wsprd/namespace/request_handler.go
index c20dc64..91d01bd 100644
--- a/services/wsprd/namespace/request_handler.go
+++ b/services/wsprd/namespace/request_handler.go
@@ -20,14 +20,14 @@
 	return &Server{v23.GetNamespace(ctx)}
 }
 
-func (s *Server) Glob(ctx *NamespaceGlobContextStub, pattern string) error {
+func (s *Server) Glob(call *NamespaceGlobServerCallStub, pattern string) error {
 	// Call Glob on the namespace client instance
-	ch, err := s.ns.Glob(ctx.Context(), pattern)
+	ch, err := s.ns.Glob(call.Context(), pattern)
 	if err != nil {
 		return err
 	}
 
-	stream := ctx.SendStream()
+	stream := call.SendStream()
 
 	for mp := range ch {
 		var reply naming.VDLGlobReply
