Update
This commit is contained in:
@@ -2,6 +2,7 @@ package to | ||||
| ||||
import ( | ||||
"encoding/json" | ||||
"fmt" | ||||
| ||||
"gitea.com/gitea/gitea-mcp/pkg/log" | ||||
"github.com/mark3labs/mcp-go/mcp" | ||||
@@ -10,7 +11,7 @@ import ( | ||||
func TextResult(v any) (*mcp.CallToolResult, error) { | ||||
result, err := json.Marshal(v) | ||||
if err != nil { | ||||
return mcp.NewToolResultError("marshal result error"), err | ||||
return nil, fmt.Errorf("marshal result err: %v", err) | ||||
} | ||||
log.Debugf("Text Result: %s", string(result)) | ||||
return mcp.NewToolResultText(string(result)), nil | ||||
|
Reference in New Issue
Block a user