Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Migrate secret_scanning toolset to modelcontextprotocol/go-sdk#1436

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

Merged

Conversation

Copy link
Contributor

CopilotAI commentedNov 18, 2025
edited
Loading

Closes: Part of#1428

Migrates thesecret_protection toolset (GetSecretScanningAlert andListSecretScanningAlerts) from mark3labs/mcp-go to modelcontextprotocol/go-sdk.

Changes

  • Tool definitions: Converted DSL-style schemas to explicitjsonschema.Schema structures
  • Handler signatures: Updated tomcp.ToolHandlerFor[map[string]any, any] with 3-value returns(*mcp.CallToolResult, any, error)
  • Parameter extraction: Now usesargs map[string]any directly instead of extracting from request
  • Result helpers: Replacedmcp.NewToolResult* withutils.NewToolResult*
  • Test updates: Added toolsnaps validation and updated handler invocations
  • Toolset registration: Enabledsecret_protection inDefaultToolsetGroup

Example of the schema migration:

// Before (mark3labs/mcp-go)mcp.NewTool("get_secret_scanning_alert",mcp.WithString("owner",mcp.Required()),mcp.WithString("repo",mcp.Required()),mcp.WithNumber("alertNumber",mcp.Required()),)// After (modelcontextprotocol/go-sdk)mcp.Tool{Name:"get_secret_scanning_alert",InputSchema:&jsonschema.Schema{Type:"object",Properties:map[string]*jsonschema.Schema{"owner": {Type:"string"},"repo": {Type:"string"},"alertNumber": {Type:"number"},        },Required: []string{"owner","repo","alertNumber"},    },}
Original prompt

Migrate thesecret_protection toolset to modelcontextprotocol/go-sdk.

This will be merged into the parent PR#1428, so reference that PR in the description to track the migration

Custom agent used: go-sdk-tool-migrator
Agent specializing in migrating MCP tools from mark3labs/mcp-go to modelcontextprotocol/go-sdk


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn moreCopilot coding agent tips in the docs.

CopilotAIand others added2 commitsNovember 18, 2025 11:28
Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>
Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>
CopilotAI changed the title[WIP] Migrate secret protection toolset to modelcontextprotocol/go-sdkMigrate secret_scanning toolset to modelcontextprotocol/go-sdkNov 18, 2025
Copilot finished work on behalf ofomgitsadsNovember 18, 2025 12:19
@LuluBeatsonLuluBeatson self-requested a reviewNovember 19, 2025 10:27
@LuluBeatson
Copy link
Contributor

image

@LuluBeatsonLuluBeatson marked this pull request as ready for reviewNovember 19, 2025 10:44
@LuluBeatsonLuluBeatson requested a review froma team as acode ownerNovember 19, 2025 10:44
CopilotAI review requested due to automatic review settingsNovember 19, 2025 10:44
Copilot finished reviewing on behalf ofLuluBeatsonNovember 19, 2025 10:46
Copy link
Contributor

CopilotAI left a 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 migrates thesecret_protection toolset frommark3labs/mcp-go tomodelcontextprotocol/go-sdk as part of a larger migration effort. It updates the implementation ofGetSecretScanningAlert andListSecretScanningAlerts 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 explicitjsonschema.Schema structures
  • Updated handler signatures to return 3 values:(*mcp.CallToolResult, any, error)
  • Migrated parameter extraction frommcp.CallToolRequest tomap[string]any args
  • Replacedmcp.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
FileDescription
pkg/github/secret_scanning.goMigrated tool definitions and handlers from mark3labs/mcp-go to modelcontextprotocol/go-sdk API
pkg/github/secret_scanning_test.goUpdated tests to invoke handlers with new 3-value signature and added toolsnaps validation
pkg/github/tools.goUncommented secretProtection toolset registration to enable it in the default toolset group
pkg/github/__toolsnaps__/get_secret_scanning_alert.snapAdded JSON schema snapshot for get_secret_scanning_alert tool
pkg/github/__toolsnaps__/list_secret_scanning_alerts.snapAdded JSON schema snapshot for list_secret_scanning_alerts tool

@omgitsadsomgitsads merged commit66e6ad5 intoomgitsads/go-sdkNov 19, 2025
13 of 14 checks passed
@omgitsadsomgitsads deleted the copilot/migrate-secret-protection-toolset branchNovember 19, 2025 15:43
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

@LuluBeatsonLuluBeatsonLuluBeatson approved these changes

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@LuluBeatson@t3xash0rnyt0ad777-commits@omgitsads

[8]ページ先頭

©2009-2025 Movatter.jp