Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.function.Supplier;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -77,7 +78,17 @@ public void execute(ExecutionContext context) throws IOException {
var config = context.config();
// By default, load all available tools
if (toolBundles == null || toolBundles.isEmpty()) {
toolBundles = new ArrayList<>(config.getToolBundles().keySet());
toolBundles = new ArrayList<>(config.getToolBundles()
.entrySet()
.stream()
.filter(entry -> {
// By default, only include smithy bundles if no bundles are specified.
// We can undo this once we have fanout support for generic bundles.
var bundle = entry.getValue();
return bundle.getValue() instanceof McpBundleConfig.SmithyModeledMember;
})
.map(Map.Entry::getKey)
.toList());
Comment on lines +81 to +91

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
toolBundles = new ArrayList<>(config.getToolBundles()
.entrySet()
.stream()
.filter(entry -> {
// By default, only include smithy bundles if no bundles are specified.
// We can undo this once we have fanout support for generic bundles.
var bundle = entry.getValue();
return bundle.getValue() instanceof McpBundleConfig.SmithyModeledMember;
})
.map(Map.Entry::getKey)
.toList());
toolBundles = config.getToolBundles()
.entrySet()
.stream()
.filter(entry -> {
// By default, only include smithy bundles if no bundles are specified.
// We can undo this once we have fanout support for generic bundles.
var bundle = entry.getValue();
return bundle.getValue() instanceof McpBundleConfig.SmithyModeledMember;
})
.map(Map.Entry::getKey)
.toList();

}

if (toolBundles.isEmpty() && !registryServer) {
Expand Down