Skip to content

Commit ed6bf36

Browse files
committed
Fix default start-server behavior
The code currently looks at the type of the nested value instead of the type of the union variant.
1 parent 1a2d927 commit ed6bf36

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

  • mcp/mcp-cli/src/main/java/software/amazon/smithy/java/mcp/cli/commands

mcp/mcp-cli/src/main/java/software/amazon/smithy/java/mcp/cli/commands/StartServer.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,16 @@ public void execute(ExecutionContext context) throws IOException {
7878
var config = context.config();
7979
// By default, load all available tools
8080
if (toolBundles == null || toolBundles.isEmpty()) {
81-
toolBundles = new ArrayList<>(config.getToolBundles()
81+
toolBundles = config.getToolBundles()
8282
.entrySet()
8383
.stream()
8484
.filter(entry -> {
8585
// By default, only include smithy bundles if no bundles are specified.
8686
// We can undo this once we have fanout support for generic bundles.
87-
var bundle = entry.getValue();
88-
return bundle.getValue() instanceof McpBundleConfig.SmithyModeledMember;
87+
return entry.getValue().type() == McpBundleConfig.Type.smithyModeled;
8988
})
9089
.map(Map.Entry::getKey)
91-
.toList());
90+
.toList();
9291
}
9392

9493
if (toolBundles.isEmpty() && !registryServer) {

0 commit comments

Comments
 (0)