MCPcopy Index your code
hub / github.com/docker/docker-agent / AddToolWarning

Method AddToolWarning

pkg/agent/agent.go:535–542  ·  view source on GitHub ↗

AddToolWarning records a warning generated while loading or starting toolsets. Warnings represent real failures the user should know about (a remote MCP server returning 4xx, an MCP binary missing, ...). Recoveries from a previous failure are intentionally not surfaced: the OAuth dialog and subseque

(msg string)

Source from the content-addressed store, hash-verified

533// subsequent tool use already make a successful start obvious, so emitting
534// a "now available" notification only adds noise.
535func (a *Agent) AddToolWarning(msg string) {
536 if msg == "" {
537 return
538 }
539 a.warningsMu.Lock()
540 defer a.warningsMu.Unlock()
541 a.pendingWarnings = append(a.pendingWarnings, msg)
542}
543
544// DrainWarnings returns pending warnings and clears them.
545func (a *Agent) DrainWarnings() []string {

Callers 7

collectToolsMethod · 0.95
reportCollisionsMethod · 0.95
WithLoadTimeWarningsFunction · 0.80

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45