Skip to content

Conversation

@omgitsads
Copy link
Member

Replaces #1415, since Copilot Coding Agent can't do stacked PRs from a fork branch.

Switch from mark3labs/mcp-go to modelcontextprotocol/go-sdk

Closes: https://github.com/github/copilot-agent-services/issues/373

omgitsads and others added 11 commits November 18, 2025 14:52
We should do this eventually, but to keep the existing behavior, we
just return the error to the client.
* Initial plan

* Migrate gists toolset to modelcontextprotocol/go-sdk

- Remove //go:build ignore tags from gists.go and gists_test.go
- Update imports to use modelcontextprotocol/go-sdk instead of mark3labs/mcp-go
- Migrate all 4 tools (ListGists, GetGist, CreateGist, UpdateGist):
  - Updated tool definitions to use jsonschema.Schema for InputSchema
  - Changed handler signatures to new SDK format with generics
  - Updated parameter extraction to use args map instead of request object
  - Replaced result helpers with utils package equivalents
- Updated all tests to match new handler signatures
- Added toolsnap tests for all 4 tools
- Added parseISOTimestamp utility function to minimal_types.go
- Created toolsnaps for all 4 tools

Related to #1428

Co-authored-by: omgitsads <[email protected]>

* fix invalid schema, re-add gists toolset to server

* make schema types lowercase

* Don't assert without a testing.T

* just return the tool & handler

* Add Close method to IOLogger to close underlying reader and writer

* Update cmd/github-mcp-server/generate_docs.go

Co-authored-by: Copilot <[email protected]>

* remove unnecessary translation

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: omgitsads <[email protected]>
Co-authored-by: LuluBeatson <[email protected]>
Co-authored-by: Adam Holt <[email protected]>
Co-authored-by: Adam Holt <[email protected]>
Co-authored-by: Copilot <[email protected]>
* Initial plan

* Migrate code-scanning toolset to modelcontextprotocol/go-sdk

Co-authored-by: omgitsads <[email protected]>

* fix lint

* re-add code_security toolset

* nolint:unused

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: omgitsads <[email protected]>
Co-authored-by: LuluBeatson <[email protected]>
…1434)

* Initial plan

* Migrate security_advisories toolset to modelcontextprotocol/go-sdk

Co-authored-by: omgitsads <[email protected]>

* Add toolsnaps tests and snapshots for security_advisories

Co-authored-by: omgitsads <[email protected]>

* Dont bubble up an error for getClient

We should do this eventually, but to keep the existing behavior, we
just return the error to the client.

* re-add security_advisories toolset

* Revert this change from the base PR

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: omgitsads <[email protected]>
Co-authored-by: Adam Holt <[email protected]>
Co-authored-by: LuluBeatson <[email protected]>
* Initial plan

* Migrate secret_scanning toolset to modelcontextprotocol/go-sdk

Co-authored-by: omgitsads <[email protected]>

* Enable secret_protection toolset in DefaultToolsetGroup

Co-authored-by: omgitsads <[email protected]>

* Don't assert without a testing.T

* just return the tool & handler

* use lowercase strings for the jsonschema types

* Add Close method to IOLogger to close underlying reader and writer

* Update cmd/github-mcp-server/generate_docs.go

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: omgitsads <[email protected]>
Co-authored-by: Adam Holt <[email protected]>
Co-authored-by: Adam Holt <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: LuluBeatson <[email protected]>
* Initial plan

* Migrate git toolset to modelcontextprotocol/go-sdk

- Remove //go:build ignore tag from git.go
- Update imports to use modelcontextprotocol/go-sdk
- Convert GetRepositoryTree tool schema to jsonschema format
- Update handler signature to use new generics pattern
- Update parameter extraction to use args map
- Replace mcp.NewToolResult* with utils package helpers
- Create dedicated git_test.go with updated test patterns
- Update toolsnaps for get_repository_tree

Related to #1428

Co-authored-by: omgitsads <[email protected]>

* re-add git toolset

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: omgitsads <[email protected]>
Co-authored-by: LuluBeatson <[email protected]>
* Initial plan

* Migrate labels toolset from mark3labs/mcp-go to modelcontextprotocol/go-sdk

Co-authored-by: omgitsads <[email protected]>

* re-add labels toolset

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: omgitsads <[email protected]>
Co-authored-by: LuluBeatson <[email protected]>
Copilot AI and others added 2 commits November 20, 2025 11:14
* Initial plan

* Migrate imports and first 3 tools (IssueRead, ListIssueTypes, helper functions)

Co-authored-by: omgitsads <[email protected]>

* Migrate AddIssueComment, SubIssueWrite and helper functions

Co-authored-by: omgitsads <[email protected]>

* Migrate SearchIssues and search_utils helper

Co-authored-by: omgitsads <[email protected]>

* Migrate IssueWrite tool with CreateIssue and UpdateIssue helpers

Co-authored-by: omgitsads <[email protected]>

* Migrate remaining tools: ListIssues, AssignCopilotToIssue, AssignCodingAgentPrompt

Co-authored-by: omgitsads <[email protected]>

* Fix all linter errors in issues.go and search_utils.go

Co-authored-by: omgitsads <[email protected]>

* Fix test file and update toolsnaps - migration complete!

Co-authored-by: omgitsads <[email protected]>

* uncomment issues toolset

* Migrate Issue workflow prompt

* Remove commented out tool definition

* Remove duplicate func

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: omgitsads <[email protected]>
Co-authored-by: Adam Holt <[email protected]>
* Initial plan

* Migrate dependabot toolset to modelcontextprotocol/go-sdk

Co-authored-by: omgitsads <[email protected]>

* re-add dependabot toolset

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: omgitsads <[email protected]>
Co-authored-by: LuluBeatson <[email protected]>
Co-authored-by: Adam Holt <[email protected]>
@notjoannaakl

This comment was marked as off-topic.

Copy link

@notjoannaakl notjoannaakl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks amazing

Copilot AI added a commit that referenced this pull request Nov 20, 2025
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 <[email protected]>
* Migrate repo resources to Go SDK

* Enable resources for repos

* Properly handle encoding and closing of the buffer

* Remove outdated comment

* Switch to StdEncoding, as it was originally

* fix casing for linter

* Update licenses
* Migrate repo resources to Go SDK

* Enable resources for repos

* Properly handle encoding and closing of the buffer

* Remove outdated comment

* Switch to StdEncoding, as it was originally

* fix casing for linter

* Update licenses

* Handle multiple path components
{
"annotations": {
"title": "Assign Copilot to issue",
"readOnlyHint": false,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Todo: Validate if this is available in the Go SDK for Prompts

* Initial plan

* Migrate dynamic toolset to modelcontextprotocol/go-sdk

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 <[email protected]>

* Enable dynamic tools

* Remove new test and toolsnaps, we can follow up with this

* Just return the tool and handler directly instead of assigning to variables first.

This stops copilot complaining in review that the variables are unused.

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: omgitsads <[email protected]>
Co-authored-by: Adam Holt <[email protected]>
@gigo841
Copy link

gigo841 commented Nov 21, 2025

Ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants