Migrate dynamic toolset to modelcontextprotocol/go-sdk#1450
Merged
omgitsads merged 5 commits intoomgitsads/go-sdkfrom Nov 20, 2025
Merged
Migrate dynamic toolset to modelcontextprotocol/go-sdk#1450omgitsads merged 5 commits intoomgitsads/go-sdkfrom
omgitsads merged 5 commits intoomgitsads/go-sdkfrom
Conversation
This commit migrates the dynamic toolset (enable_toolset, list_available_toolsets, get_toolset_tools) from mark3labs/mcp-go to modelcontextprotocol/go-sdk. Changes: - Removed //go:build ignore tag - Updated imports to use modelcontextprotocol/go-sdk - Migrated all tool functions to use new SDK patterns - Updated ToolsetEnum helper to return []any instead of mcp.PropertyOption - Converted DSL-based schema definitions to jsonschema.Schema structures - Updated handler signatures to use map[string]any args - Replaced old result helpers with utils package equivalents - Fixed EnableToolset to use RegisterFunc instead of AddTools - Created comprehensive test suite for all three tools - Generated toolsnaps for the new tools Related to #1428 Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Migrate dynamic toolset to modelcontextprotocol/go-sdk
Migrate dynamic toolset to modelcontextprotocol/go-sdk
Nov 20, 2025
Member
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the dynamic toolset functionality (enable_toolset, list_available_toolsets, get_toolset_tools) from the mark3labs/mcp-go SDK to the modelcontextprotocol/go-sdk. The migration includes schema conversion from DSL to JSON Schema, handler signature updates, and fixing tool registration logic.
Key changes:
- Schema definitions converted from DSL-based
mcp.NewTool()calls to explicitjsonschema.Schemastructures - Handler signatures updated to use new SDK's
ToolHandlerFor[map[string]any, any]pattern - Tool registration fixed to use
RegisterFunc()method instead of non-existentAddTools()
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
pkg/github/dynamic_tools.go |
Migrated three tools to new SDK with updated schemas, handlers, and tool registration logic |
pkg/github/dynamic_tools_test.go |
Added comprehensive test coverage for all three dynamic tools with schema validation |
pkg/github/__toolsnaps__/enable_toolset.snap |
Added schema snapshot for enable_toolset tool |
pkg/github/__toolsnaps__/get_toolset_tools.snap |
Added schema snapshot for get_toolset_tools tool |
pkg/github/__toolsnaps__/list_available_toolsets.snap |
Added schema snapshot for list_available_toolsets tool |
…iables first. This stops copilot complaining in review that the variables are unused.
SamMorrowDrums
approved these changes
Nov 20, 2025
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.

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.