Migrate repos toolset to modelcontextprotocol/go-sdk#1445
Merged
omgitsads merged 10 commits intoomgitsads/go-sdkfrom Nov 24, 2025
Merged
Migrate repos toolset to modelcontextprotocol/go-sdk#1445omgitsads merged 10 commits intoomgitsads/go-sdkfrom
omgitsads merged 10 commits intoomgitsads/go-sdkfrom
Conversation
Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>
Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>
Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>
Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Migrate repos toolset to modelcontextprotocol/go-sdk
Migrate repos toolset to modelcontextprotocol/go-sdk
Nov 20, 2025
This comment was marked as outdated.
This comment was marked as outdated.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the repos toolset (18 tools) from mark3labs/mcp-go to modelcontextprotocol/go-sdk as part of the broader SDK migration effort tracked in #1428. The migration updates tool definitions, handler signatures, parameter extraction, and result types to align with the new SDK's API.
Key changes:
- Tool definitions converted from DSL-based
mcp.NewTool()to struct-basedmcp.Tool{}withjsonschema.Schema - Handler signatures changed from 2-parameter/2-return to 3-parameter/3-return pattern
- Result helpers migrated from
mcp.NewToolResult*toutils.NewToolResult*
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/github/tools.go | Uncommented repos and stargazers toolset registration to enable migrated tools |
| pkg/github/repositories.go | Migrated 18 repository tools to new SDK (GetCommit, ListCommits, CreateRepository, etc.) |
| pkg/github/repositories_test.go | Updated all tests to new handler signatures and schema casting patterns |
| pkg/github/helper_test.go | Consolidated resource result helpers into unified getResourceResult function |
| pkg/github/toolsnaps/*.snap | Updated 16 snapshots reflecting new schema format (property ordering, required array format) |
Contributor
LuluBeatson
approved these changes
Nov 24, 2025
…igrate-repos-toolset-to-go-sdk
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
repostoolset (18 tools) frommark3labs/mcp-gotomodelcontextprotocol/go-sdkas part of the broader SDK migration tracked in #1428.Changes
Tool Definitions
mcp.NewTool()DSL tomcp.Tool{}structs withjsonschema.Schema(mcp.Tool, server.ToolHandlerFunc)to(mcp.Tool, mcp.ToolHandlerFor[map[string]any, any])(ctx, *request, args)and return(result, data, error)Before:
After:
Parameter Extraction
RequiredParam[T](request, "key")toRequiredParam[T](args, "key")args map[string]anyResult Types
mcp.NewToolResultText/Error/Resourcewithutils.NewToolResultText/Error/Resourcemcp.TextResourceContentsandmcp.BlobResourceContentsintomcp.ResourceContentsBlobfield from base64 string to[]byteTest Updates
schema := tool.InputSchema.(*jsonschema.Schema)Toolsnaps
Updated 16 snapshot files reflecting schema format changes (property ordering, required array format).
Tools Migrated
GetCommit, ListCommits, ListBranches, CreateOrUpdateFile, CreateRepository, GetFileContents, ForkRepository, DeleteFile, CreateBranch, PushFiles, ListTags, GetTag, ListReleases, GetLatestRelease, GetReleaseByTag, ListStarredRepositories, StarRepository, UnstarRepository
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.