"I am El Shaddai." Thus did the Holy One, blessed be He, say to Abram: you shall receive the commandment of circumcision; "enough" (dai) for the world are I and you. "Walk before Me." That is to say, perform My mission, and I credit it to you that you do not need Me to hold you up, just as it is said of Noah, "Noah walked with God" (Genesis 6:9). "And be whole." From here you learn that the foreskin is a blemish upon a man, and a man is not called whole in the world unless he is circumcised. A parable: to a king who wished to take a certain maiden, and she was passed before him, and he saw that she had an overgrown nail; the king said, "Repair that nail for her." So did the Holy One, blessed be He, say to Abram, "Walk before Me and be whole," and He commanded that the foreskin be repaired for him. Another interpretation of "And be whole": that you not be cut off from your wife and not be... from her. This is what Scripture says, "And be whole," as it is said, "You shall be whole with the LORD your God" (Deuteronomy 18:13).
Why Circumcision Made Abram Whole in Midrash Aggadah
Midrash Aggadah, Genesis 17:1
אני אל שדי. כך אמר לו הקב"ה לאברם אתה תקבל מצות מילה, די לעולם אני ואתה: התהלך לפני. כלומר עשה שליחותי ואני מעלה עליך שאתה אינך צריך לי לאחוז בך, כשם שאמר בנח את האלהים התהלך נח (בראשית ו ט): והיה תמים. מכאן אתה למד שהערלה מום הוא באדם, ואין אדם נקרא בעולם שלם, אלא כשהוא מהול, משל למלך שהיה רוצה ליקח ריבה אחת והעבירה לפניו, וראה שהיה בה צפורן משוך, אמר המלך תיקנו לה אותו צפורן, כך אמר הקב"ה לאברם התהלך לפני והיה תמים, וצוה לתקן לו הערלה: ד"א והיה תמים. שלא תהיה עקור מאשתך ולא תראה ממנה.... זה שאמר הכתוב והיה תמים, כד"א תמים תהיה עם ה' אלהיך (דברים יח יג):