MCPcopy
hub / github.com/docker/docker-agent / ToolCallMessage

Function ToolCallMessage

pkg/tui/types/types.go:121–134  ·  view source on GitHub ↗
(agentName string, toolCall tools.ToolCall, toolDef tools.Tool, status ToolStatus)

Source from the content-addressed store, hash-verified

119}
120
121func ToolCallMessage(agentName string, toolCall tools.ToolCall, toolDef tools.Tool, status ToolStatus) *Message {
122 msg := &Message{
123 Type: MessageTypeToolCall,
124 Sender: agentName,
125 ToolCall: toolCall,
126 ToolDefinition: toolDef,
127 ToolStatus: status,
128 }
129 if status == ToolStatusRunning {
130 now := time.Now()
131 msg.StartedAt = &now
132 }
133 return msg
134}
135
136func (m *Message) AppendToolOutput(output string) {
137 if output == "" {

Calls 1

NowMethod · 0.80