Migrate secret_scanning toolset to modelcontextprotocol/go-sdk#1436
Merged
omgitsads merged 9 commits intoomgitsads/go-sdkfrom Nov 19, 2025
Merged
Migrate secret_scanning toolset to modelcontextprotocol/go-sdk#1436omgitsads merged 9 commits intoomgitsads/go-sdkfrom
omgitsads merged 9 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>
Copilot
AI
changed the title
[WIP] Migrate secret protection toolset to modelcontextprotocol/go-sdk
Migrate secret_scanning toolset to modelcontextprotocol/go-sdk
Nov 18, 2025
Contributor
LuluBeatson
approved these changes
Nov 19, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the secret_protection toolset from mark3labs/mcp-go to modelcontextprotocol/go-sdk as part of a larger migration effort. It updates the implementation of GetSecretScanningAlert and ListSecretScanningAlerts tools to use the new SDK's API patterns and enables the toolset in the default toolset group.
Key changes:
- Converted DSL-style tool schemas to explicit
jsonschema.Schemastructures - Updated handler signatures to return 3 values:
(*mcp.CallToolResult, any, error) - Migrated parameter extraction from
mcp.CallToolRequesttomap[string]anyargs - Replaced
mcp.NewToolResult*helpers withutils.NewToolResult*
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
pkg/github/secret_scanning.go |
Migrated tool definitions and handlers from mark3labs/mcp-go to modelcontextprotocol/go-sdk API |
pkg/github/secret_scanning_test.go |
Updated tests to invoke handlers with new 3-value signature and added toolsnaps validation |
pkg/github/tools.go |
Uncommented secretProtection toolset registration to enable it in the default toolset group |
pkg/github/__toolsnaps__/get_secret_scanning_alert.snap |
Added JSON schema snapshot for get_secret_scanning_alert tool |
pkg/github/__toolsnaps__/list_secret_scanning_alerts.snap |
Added JSON schema snapshot for list_secret_scanning_alerts tool |
…igrate-secret-protection-toolset
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.

Closes: Part of #1428
Migrates the
secret_protectiontoolset (GetSecretScanningAlertandListSecretScanningAlerts) from mark3labs/mcp-go to modelcontextprotocol/go-sdk.Changes
jsonschema.Schemastructuresmcp.ToolHandlerFor[map[string]any, any]with 3-value returns(*mcp.CallToolResult, any, error)args map[string]anydirectly instead of extracting from requestmcp.NewToolResult*withutils.NewToolResult*secret_protectioninDefaultToolsetGroupExample of the schema migration:
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.