- Notifications
You must be signed in to change notification settings - Fork3.1k
Migrate dynamic toolset to modelcontextprotocol/go-sdk#1450
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
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 toolsRelated to#1428Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>
omgitsads commentedNov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull Request Overview
This PR migrates the dynamic toolset functionality (enable_toolset,list_available_toolsets,get_toolset_tools) from themark3labs/mcp-go SDK to themodelcontextprotocol/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 forenable_toolset tool |
pkg/github/__toolsnaps__/get_toolset_tools.snap | Added schema snapshot forget_toolset_tools tool |
pkg/github/__toolsnaps__/list_available_toolsets.snap | Added schema snapshot forlist_available_toolsets tool |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
…iables first.This stops copilot complaining in review that the variables are unused.
42b5533 intoomgitsads/go-sdkUh oh!
There was an error while loading.Please reload this page.

Uh oh!
There was an error while loading.Please reload this page.
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 agentset things up for you — coding agent works faster and does higher quality work when set up for your repo.