MCPcopy Create free account
hub / github.com/docker/docker-agent / EmitOutput

Function EmitOutput

pkg/tools/tools.go:74–84  ·  view source on GitHub ↗

EmitOutput streams output through the emitter in ctx. It returns false when no emitter is attached or output is empty.

(ctx context.Context, output string)

Source from the content-addressed store, hash-verified

72// EmitOutput streams output through the emitter in ctx. It returns false when
73// no emitter is attached or output is empty.
74func EmitOutput(ctx context.Context, output string) bool {
75 if output == "" {
76 return false
77 }
78 emit, ok := ToolOutputEmitterFromContext(ctx)
79 if !ok {
80 return false
81 }
82 emit(output)
83 return true
84}
85
86type ToolCall struct {
87 ID string `json:"id,omitempty"`

Calls 2

emitFunction · 0.85