MCPcopy Create free account
hub / github.com/github/gh-aw / notifyProgress

Function notifyProgress

pkg/cli/mcp_tools_privileged.go:622–634  ·  view source on GitHub ↗

notifyProgress sends a progress notification to the MCP client if the request includes a progress token. The req, req.Params, and req.Session fields are checked for nil before use. Errors are silently ignored because progress notifications are best-effort; the tool result is not affected. If the cli

(ctx context.Context, req *mcp.CallToolRequest, progress, total float64, message string)

Source from the content-addressed store, hash-verified

620// has disconnected or the notification fails for any reason, the tool continues
621// executing normally.
622func notifyProgress(ctx context.Context, req *mcp.CallToolRequest, progress, total float64, message string) {
623 if req == nil || req.Session == nil {
624 return
625 }
626 if token := req.Params.GetProgressToken(); token != nil {
627 _ = req.Session.NotifyProgress(ctx, &mcp.ProgressNotificationParams{
628 ProgressToken: token,
629 Progress: progress,
630 Total: total,
631 Message: message,
632 })
633 }
634}
635
636// filtering out debug log lines (e.g. "workflow:script_registry Creating... +151ns").
637// Console messages are identified by their prefix symbols (✗, ✓, ℹ, ⚠, etc.).

Callers 3

registerLogsToolFunction · 0.85
registerAuditToolFunction · 0.85
registerAuditDiffToolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected