- Notifications
You must be signed in to change notification settings - Fork3.1k
Migrate discussions toolset to modelcontextprotocol/go-sdk#1448
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
notjoannaakl commentedNov 20, 2025
test |
Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>
LuluBeatson 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 successfully migrates thediscussions toolset frommark3labs/mcp-go tomodelcontextprotocol/go-sdk, as part of the broader SDK migration effort tracked in#1428.
Key Changes:
- Updated function signatures to return
mcp.ToolHandlerFor[map[string]any, any]instead ofserver.ToolHandlerFunc - Converted tool definitions from DSL-based to explicit JSON Schema structures
- Modified parameter extraction to use
args map[string]anydirectly instead ofrequest.Params.Arguments - Updated all error handling and result helpers to use the
utilspackage
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
pkg/github/discussions.go | Migrated 4 discussion tools (list_discussions, get_discussion, get_discussion_comments, list_discussion_categories) to new SDK with updated signatures and schema definitions |
pkg/github/discussions_test.go | Updated tests to match new handler signatures, added toolsnap validation, and updated schema assertions to use*jsonschema.Schema type casting |
pkg/github/tools.go | Uncommented and re-enabled the discussions toolset registration in the default toolset group |
pkg/github/__toolsnaps__/*.snap | Added 4 new toolsnap files documenting the JSON schemas for all discussion tools |
…igrate-discussions-toolset
…igrate-discussions-toolset
4042338 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.
Closes: Part of#1428
Description
Migrates the
discussionstoolset frommark3labs/mcp-gotomodelcontextprotocol/go-sdk.Changes
Tool Function Signatures
(mcp.Tool, server.ToolHandlerFunc)→(mcp.Tool, mcp.ToolHandlerFor[map[string]any, any])func(ctx, request) (*result, error)→func(ctx, *request, args) (*result, any, error)Schema Definitions
Parameter Extraction
request.Params.Argumentsto directargs map[string]anyparameterutilspackage:utils.NewToolResultError(),utils.NewToolResultText()Test Updates
handler(ctx, req)→handler(ctx, &req, reqParams)res, _, err := handler(...)toolsnaps.Test()calls for schema validationInputSchemato*jsonschema.Schemafor property accessMigrated Tools
list_discussionsget_discussionget_discussion_commentslist_discussion_categoriesAll 4 toolsnap files created and validated.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our2 minute survey.