@@ -6,6 +6,7 @@ import (
66 "fmt"
77 "log/slog"
88 "slices"
9+ "strings"
910 "sync"
1011 "time"
1112
@@ -122,16 +123,16 @@ func runTool(ctx context.Context, name, toolName string, input string) (tools.To
122123 return tools.NewTextErrorResponse(err.Error()), nil
123124 }
124125
125− output := ""
126+ var output strings.Builder
126127 for _, v := range result.Content {
127128 if v, ok := v.(mcp.TextContent); ok {
128− output = v.Text
129+ output.WriteString(v.Text)
129130 } else {
130− output = fmt.Sprintf("%v", v)
131+ _, _ = fmt.Fprintf(&output, "%v: ", v)
131132 }
132133 }
133134
134− return tools.NewTextResponse(output), nil
135+ return tools.NewTextResponse(output.String()), nil
135136}
136137
137138func (b *McpTool) Run(ctx context.Context, params tools.ToolCall) (tools.ToolResponse, error) {