-
Notifications
You must be signed in to change notification settings - Fork 118
McpClients bean #1393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
McpClients bean #1393
Conversation
This comment has been minimized.
This comment has been minimized.
I personally don't find it terribly useful, but I'm dead set against it either :) |
Honestly my position is similar, but @maxandersen requested it so.. ;) |
@maxandersen why do you need this instead of just using standard CDI features? |
Status for workflow
|
see details of discussion in https://quarkusio.zulipchat.com/#narrow/channel/187038-dev/topic/mcp.20client issue is that to use built-in CDI I either have to
Hence the ask for tools to know their name OR be able to get a map from names to the tools to use. does that make sense? (same issue exists for when wanting to support multiple models in quarkus l4j) |
Are you sure? You can extract the qualifiers from the instance, no? |
Hmm. Not something I found ? Got example ? |
Something like: boolean found = false;
for (InstanceHandle<McpClient> handle : Arc.container().select(McpClient.class).handles()) {
InjectableBean<McpClient> bean = handle.getBean();
for (Annotation qualifier : bean.getQualifiers()) {
if (qualifier instanceof McpClient mcpClient) }
if ("whatever".equals(name)) {
found = true;
break;
}
}
}
} |
Fixes #1345
Accepting suggestions on how to make the name a bit more distinguished..
Also moves the
@McpClientName
annotation out of theruntime
package as it is meant to be public API, hence thebreaking-change
label.