Skip to content

Commit a2cf933

Browse files
Cali0707nader-ziada
andcommitted
Apply suggestions from code review
Co-authored-by: Nader Ziada <[email protected]> Signed-off-by: Calum Murray <[email protected]>
1 parent 46ec869 commit a2cf933

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/mcp/resources_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,13 +630,13 @@ func (s *ResourcesSuite) TestResourcesScale() {
630630
s.Run("resources_scale with missing apiVersion returns error", func() {
631631
toolResult, _ := s.CallTool("resources_scale", map[string]interface{}{})
632632
s.Truef(toolResult.IsError, "call tool should fail")
633-
s.Equalf("failed get/update resource scale, missing argument apiVersion", toolResult.Content[0].(mcp.TextContent).Text,
633+
s.Equalf("failed to get/update resource scale, missing argument apiVersion", toolResult.Content[0].(mcp.TextContent).Text,
634634
"invalid error message, got %v", toolResult.Content[0].(mcp.TextContent).Text)
635635
})
636636
s.Run("resources_scale with missing kind returns error", func() {
637637
toolResult, _ := s.CallTool("resources_scale", map[string]interface{}{"apiVersion": "apps/v1"})
638638
s.Truef(toolResult.IsError, "call tool should fail")
639-
s.Equalf("failed get/update resource scale, missing argument kind", toolResult.Content[0].(mcp.TextContent).Text,
639+
s.Equalf("failed to get/update resource scale, missing argument kind", toolResult.Content[0].(mcp.TextContent).Text,
640640
"invalid error message, got %v", toolResult.Content[0].(mcp.TextContent).Text)
641641
})
642642
s.Run("resources_scale with missing name returns error", func() {

pkg/toolsets/core/resources.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ func resourcesScale(params api.ToolHandlerParams) (*api.ToolCallResult, error) {
306306

307307
gvk, err := parseGroupVersionKind(params.GetArguments())
308308
if err != nil {
309-
return api.NewToolCallResult("", fmt.Errorf("failed get/update resource scale, %w", err)), nil
309+
return api.NewToolCallResult("", fmt.Errorf("failed to get/update resource scale, %w", err)), nil
310310
}
311311

312312
name := params.GetArguments()["name"]
@@ -373,7 +373,7 @@ func getResourceClient(params api.ToolHandlerParams, gvk *schema.GroupVersionKin
373373

374374
isNamespaced, err := params.IsNamespaced(gvk)
375375
if err != nil {
376-
return nil, fmt.Errorf("failed to determine if resource is namespaceable")
376+
return nil, fmt.Errorf("failed to determine if resource is namespaced")
377377
}
378378

379379
if isNamespaced {

0 commit comments

Comments
 (0)