Open
Conversation
> In v0.29.0, MCP-Go introduces breaking changes to tool request handling. The main change is that request.Params.Arguments is no longer directly accessible as a map. Instead, you must use the new GetArguments() method to retrieve arguments as a map. For type-safe argument access, new helper methods like RequireString(), RequireFloat(), and RequireBool() have been added. To migrate:
> Replace direct access to request.Params.Arguments["key"] with request.GetArguments()["key"]
> For better type safety, use the new helper methods: request.RequireString("key"), request.RequireFloat("key"), etc.
> For complex argument structures, use the new BindArguments() method with a struct, or try the new typed tool handlers with mcp.NewTypedToolHandler() as shown in the new examples/typed_tools example.
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.
There are additional MCP protocols supported in the newer version of the library. Some of these protocols are needed in order to use the current version of the inspector tool (https://github.com/modelcontextprotocol/inspector), which is useful for development.
There are breaking changes in the library, hence some code changes were needed.