File tree Expand file tree Collapse file tree
mcp/mcp-cli/src/main/java/software/amazon/smithy/java/mcp/cli/commands Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88import java .io .IOException ;
99import java .util .ArrayList ;
1010import java .util .List ;
11+ import java .util .Map ;
1112import java .util .concurrent .CompletableFuture ;
1213import java .util .function .Supplier ;
1314import java .util .stream .Collectors ;
@@ -77,7 +78,17 @@ public void execute(ExecutionContext context) throws IOException {
7778 var config = context .config ();
7879 // By default, load all available tools
7980 if (toolBundles == null || toolBundles .isEmpty ()) {
80- toolBundles = new ArrayList <>(config .getToolBundles ().keySet ());
81+ toolBundles = new ArrayList <>(config .getToolBundles ()
82+ .entrySet ()
83+ .stream ()
84+ .filter (entry -> {
85+ // By default, only include smithy bundles if no bundles are specified.
86+ // We can undo this once we have fanout support for generic bundles.
87+ var bundle = entry .getValue ();
88+ return bundle .getValue () instanceof McpBundleConfig .SmithyModeledMember ;
89+ })
90+ .map (Map .Entry ::getKey )
91+ .toList ());
8192 }
8293
8394 if (toolBundles .isEmpty () && !registryServer ) {
You can’t perform that action at this time.
0 commit comments