Skip to content

Commit 671b179

Browse files
committed
clean up
1 parent 9aa7ed5 commit 671b179

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pkg/toolsets/toolsets.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,13 +304,12 @@ func (tg *ToolsetGroup) FindToolByName(toolName string) (*server.ServerTool, str
304304
func (tg *ToolsetGroup) RegisterSpecificTools(s *server.MCPServer, toolNames []string, readOnly bool) error {
305305
var skippedTools []string
306306
for _, toolName := range toolNames {
307-
tool, toolsetName, err := tg.FindToolByName(toolName)
307+
tool, _, err := tg.FindToolByName(toolName)
308308
if err != nil {
309309
return fmt.Errorf("tool %s not found: %w", toolName, err)
310310
}
311311

312312
// Check if it's a write tool and we're in read-only mode
313-
// ReadOnlyHint should always be set, but add defensive check
314313
if tool.Tool.Annotations.ReadOnlyHint != nil {
315314
isWriteTool := !*tool.Tool.Annotations.ReadOnlyHint
316315
if isWriteTool && readOnly {
@@ -322,7 +321,6 @@ func (tg *ToolsetGroup) RegisterSpecificTools(s *server.MCPServer, toolNames []s
322321

323322
// Register the tool
324323
s.AddTool(tool.Tool, tool.Handler)
325-
_ = toolsetName // toolsetName is available for potential future use (logging, etc.)
326324
}
327325

328326
// Log skipped write tools if any

0 commit comments

Comments
 (0)