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

Function formatToolWarning

pkg/runtime/loop.go:1197–1204  ·  view source on GitHub ↗
(a *agent.Agent, warnings []string)

Source from the content-addressed store, hash-verified

1195}
1196
1197func formatToolWarning(a *agent.Agent, warnings []string) string {
1198 var builder strings.Builder
1199 fmt.Fprintf(&builder, "Some toolsets failed to initialize for agent '%s'.\n\nDetails:\n\n", a.Name())
1200 for _, warning := range warnings {
1201 fmt.Fprintf(&builder, "- %s\n", warning)
1202 }
1203 return strings.TrimSuffix(builder.String(), "\n")
1204}
1205
1206// filterExcludedTools removes tools whose names appear in the excluded list.
1207// This is used by skill sub-sessions to prevent recursive run_skill calls.

Callers 1

emitAgentWarningsMethod · 0.85

Calls 2

NameMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected