-
Notifications
You must be signed in to change notification settings - Fork 3.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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Copilot
wants to merge
8
commits into
omgitsads/go-sdk
Choose a base branch
from
copilot/migrate-discussions-toolset
base: omgitsads/go-sdk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
|
test |
Copilot
AI
changed the title
[WIP] Migrate discussions toolset to modelcontextprotocol/go-sdk
Migrate discussions toolset to modelcontextprotocol/go-sdk
Nov 20, 2025
Copilot finished work on behalf of
omgitsads
November 20, 2025 10:30
Contributor
LuluBeatson
approved these changes
Nov 20, 2025
Copilot finished reviewing on behalf of
LuluBeatson
November 20, 2025 16:46
Contributor
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 the discussions toolset from mark3labs/mcp-go to modelcontextprotocol/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
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.


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 our 2 minute survey.