Fix error with json.RawMessage breaking registry MCP server tool calls - #599
Open
inFocus7 wants to merge 2 commits into
Open
Fix error with json.RawMessage breaking registry MCP server tool calls#599inFocus7 wants to merge 2 commits into
json.RawMessage breaking registry MCP server tool calls#599inFocus7 wants to merge 2 commits into
Conversation
Signed-off-by: Fabian Gonzalez <fabian.gonzalez@solo.io>
Signed-off-by: Fabian Gonzalez <fabian.gonzalez@solo.io>
inFocus7
marked this pull request as ready for review
July 29, 2026 22:08
inFocus7
enabled auto-merge
July 29, 2026 22:09
RawMessage breaking registry MCP server tool callsjson.RawMessage breaking registry MCP server tool calls
inFocus7
commented
Jul 29, 2026
| }, | ||
| }) | ||
| if err != nil { | ||
| panic(fmt.Sprintf("registryserver: output schema for %v: %v", rt, err)) |
Collaborator
Author
There was a problem hiding this comment.
this panic would only occur on startup, so it's similar to like regexp.MustCompile() type calls we do which would also panic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Motivation: On resources that emit
json.RawMessagefields, the existing MCP SDK schema parser/validator fails since it expects it to be a byte array. This means no output is ever returned to a caller of MCP tools like deployments.What Changed: Special handling added for the
json.RawMessagetype so that it gets parsed as appropriate types.Change Type
Changelog
Additional Notes
Validation Script (place in repo root):
Note: The script has a hacky way of getting an access token to use because the dev server is backed by the
JWT_PRIVATE_KEY, requiring auth, but we don't have an issuer / oauth endpoints configured for that (since we are not an authz server). This means we can only auth via an access token minted, and interactive oauth isn't possible withJWT_PRIVATE_KEY. You could theoretically avoid this by not settingJWT_PRIVATE_KEYon installation which would make it all public.Without fix (
main):With fix: