Skip to content
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

feat(kubernetes): use custom ToolResponseEncoder for common serialization #18

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

manusa
Copy link
Contributor

@manusa manusa commented Feb 7, 2025

Fixes fabric8io/kubernetes-client#6870

Note that for collection return types, using a List instead of Collection will break the current behavior.

I understand that this might have something to do with:

https://github.com/quarkiverse/quarkus-mcp-server/blob/95649c2095a53cdd0595c1eb26e413ca6b9e2395/core/deployment/src/main/java/io/quarkiverse/mcp/server/deployment/McpServerProcessor.java#L659-L682

and the result being serialized or deserialized before passing it on to the customized ToolResponseEncoder.

You can check this by changing the return type of the resources_list to Collection<GenericKubernetesResource>.
The integration test will fail because the customized ObjectMapper won't work because the objects in the list probably are no longer GenericKubernetesResource.

@manusa manusa force-pushed the refactor/use-custom-encoder branch from ebdc627 to a7d7f41 Compare February 7, 2025 17:24
Improves capabilities for debugging serialization and other Quarkus MCP server extension features.
@manusa manusa force-pushed the refactor/use-custom-encoder branch from ddcdedc to a573121 Compare February 10, 2025 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kubernetes MCP Server: Use ToolResponseEncoder to marshal resources into json
1 participant