Skip to content

Commit 9b34211

Browse files
authored
Check if the tool is _NOT_ read only before skipping it in read-only mode (#1514)
1 parent 60aef5d commit 9b34211

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/toolsets/toolsets.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ func (tg *ToolsetGroup) RegisterSpecificTools(s *mcp.Server, toolNames []string,
325325
return fmt.Errorf("tool %s not found: %w", toolName, err)
326326
}
327327

328-
if tool.Tool.Annotations.ReadOnlyHint && readOnly {
328+
if !tool.Tool.Annotations.ReadOnlyHint && readOnly {
329329
// Skip write tools in read-only mode
330330
skippedTools = append(skippedTools, toolName)
331331
continue

0 commit comments

Comments
 (0)