Migrate dynamic toolset to modelcontextprotocol/go-sdk #1450
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.

Migrates the dynamic toolset (
enable_toolset,list_available_toolsets,get_toolset_tools) frommark3labs/mcp-gotomodelcontextprotocol/go-sdk. Part of #1428.Changes
Schema Migration
jsonschema.SchemastructuresToolsetEnum()from returningmcp.PropertyOptionto[]anyfor enum valuesHandler Updates
(tool, handler server.ToolHandlerFunc)→(mcp.Tool, mcp.ToolHandlerFor[map[string]any, any])func(ctx, request) (*mcp.CallToolResult, error)→func(ctx, *request, args map[string]any) (*mcp.CallToolResult, any, error)RequiredParam[T](args, key)instead ofRequiredParam[T](request, key)Tool Registration
Fixed
EnableToolsetto callRegisterFunc(s)on eachServerToolinstead of non-existents.AddTools():Testing
dynamic_tools_test.gowith comprehensive test coverage//go:build ignoretag - tools now included in buildOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.