@@ -110,7 +110,7 @@ func (s *Server) podsListInAllNamespaces(ctx context.Context, ctr mcp.CallToolRe
110110 selector = labelSelector .(string )
111111 }
112112
113- ret , err := s .k .PodsListInAllNamespaces (ctx , selector )
113+ ret , err := s .k .Derived ( ctx ). PodsListInAllNamespaces (ctx , selector )
114114 if err != nil {
115115 return NewTextResult ("" , fmt .Errorf ("failed to list pods in all namespaces: %v" , err )), nil
116116 }
@@ -127,7 +127,7 @@ func (s *Server) podsListInNamespace(ctx context.Context, ctr mcp.CallToolReques
127127 if labelSelector != nil {
128128 selector = labelSelector .(string )
129129 }
130- ret , err := s .k .PodsListInNamespace (ctx , ns .(string ), selector )
130+ ret , err := s .k .Derived ( ctx ). PodsListInNamespace (ctx , ns .(string ), selector )
131131 if err != nil {
132132 return NewTextResult ("" , fmt .Errorf ("failed to list pods in namespace %s: %v" , ns , err )), nil
133133 }
@@ -143,7 +143,7 @@ func (s *Server) podsGet(ctx context.Context, ctr mcp.CallToolRequest) (*mcp.Cal
143143 if name == nil {
144144 return NewTextResult ("" , errors .New ("failed to get pod, missing argument name" )), nil
145145 }
146- ret , err := s .k .PodsGet (ctx , ns .(string ), name .(string ))
146+ ret , err := s .k .Derived ( ctx ). PodsGet (ctx , ns .(string ), name .(string ))
147147 if err != nil {
148148 return NewTextResult ("" , fmt .Errorf ("failed to get pod %s in namespace %s: %v" , name , ns , err )), nil
149149 }
@@ -159,7 +159,7 @@ func (s *Server) podsDelete(ctx context.Context, ctr mcp.CallToolRequest) (*mcp.
159159 if name == nil {
160160 return NewTextResult ("" , errors .New ("failed to delete pod, missing argument name" )), nil
161161 }
162- ret , err := s .k .PodsDelete (ctx , ns .(string ), name .(string ))
162+ ret , err := s .k .Derived ( ctx ). PodsDelete (ctx , ns .(string ), name .(string ))
163163 if err != nil {
164164 return NewTextResult ("" , fmt .Errorf ("failed to delete pod %s in namespace %s: %v" , name , ns , err )), nil
165165 }
@@ -190,7 +190,7 @@ func (s *Server) podsExec(ctx context.Context, ctr mcp.CallToolRequest) (*mcp.Ca
190190 } else {
191191 return NewTextResult ("" , errors .New ("failed to exec in pod, invalid command argument" )), nil
192192 }
193- ret , err := s .k .PodsExec (ctx , ns .(string ), name .(string ), container .(string ), command )
193+ ret , err := s .k .Derived ( ctx ). PodsExec (ctx , ns .(string ), name .(string ), container .(string ), command )
194194 if err != nil {
195195 return NewTextResult ("" , fmt .Errorf ("failed to exec in pod %s in namespace %s: %v" , name , ns , err )), nil
196196 } else if ret == "" {
@@ -212,7 +212,7 @@ func (s *Server) podsLog(ctx context.Context, ctr mcp.CallToolRequest) (*mcp.Cal
212212 if container == nil {
213213 container = ""
214214 }
215- ret , err := s .k .PodsLog (ctx , ns .(string ), name .(string ), container .(string ))
215+ ret , err := s .k .Derived ( ctx ). PodsLog (ctx , ns .(string ), name .(string ), container .(string ))
216216 if err != nil {
217217 return NewTextResult ("" , fmt .Errorf ("failed to get pod %s log in namespace %s: %v" , name , ns , err )), nil
218218 } else if ret == "" {
@@ -238,7 +238,7 @@ func (s *Server) podsRun(ctx context.Context, ctr mcp.CallToolRequest) (*mcp.Cal
238238 if port == nil {
239239 port = float64 (0 )
240240 }
241- ret , err := s .k .PodsRun (ctx , ns .(string ), name .(string ), image .(string ), int32 (port .(float64 )))
241+ ret , err := s .k .Derived ( ctx ). PodsRun (ctx , ns .(string ), name .(string ), image .(string ), int32 (port .(float64 )))
242242 if err != nil {
243243 return NewTextResult ("" , fmt .Errorf ("failed to get pod %s log in namespace %s: %v" , name , ns , err )), nil
244244 }
0 commit comments