Migrate security_advisories toolset to modelcontextprotocol/go-sdk#1434
Merged
omgitsads merged 9 commits intoomgitsads/go-sdkfrom Nov 19, 2025
Merged
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 security_advisories toolset to modelcontextprotocol/go-sdk
Migrate security_advisories toolset to modelcontextprotocol/go-sdk
Nov 18, 2025
We should do this eventually, but to keep the existing behavior, we just return the error to the client.
…igrate-security-advisories-toolset
Contributor
LuluBeatson
approved these changes
Nov 19, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR successfully migrates the security_advisories toolset from mark3labs/mcp-go to modelcontextprotocol/go-sdk, bringing 4 security advisory tools back into the active codebase.
Key Changes:
- Function signatures updated from DSL-based tool definitions to explicit JSON Schema structs
- Handler signatures migrated to 3-parameter/3-return pattern
- Result helpers changed from
mcp.NewToolResult*toutils.NewToolResult* - All 4 tools (list global, get global, list repository, list org) properly migrated and registered
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| pkg/github/tools.go | Uncommented securityAdvisories toolset registration, adding 4 migrated tools back to the active toolset group |
| pkg/github/security_advisories.go | Migrated all 4 security advisory tools from mark3labs/mcp-go to modelcontextprotocol/go-sdk with explicit JSON schemas, updated handler signatures, and proper error handling |
| pkg/github/security_advisories_test.go | Updated test handlers to use new 3-param/3-return signature, added toolsnaps validation calls, but missing ReadOnlyHint assertions for all 4 tools |
| pkg/github/toolsnaps/*.snap | Created 4 new snapshot files capturing the JSON schema definitions for all security advisory tools, properly documenting the API surface |
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
security_advisoriestoolset frommark3labs/mcp-gotomodelcontextprotocol/go-sdk.Changes
Migrated 4 tools:
list_global_security_advisories- List advisories with filtering by GHSA ID, CVE ID, ecosystem, severity, CWEsget_global_security_advisory- Get specific advisory by GHSA IDlist_repository_security_advisories- List advisories for a repositorylist_org_repository_security_advisories- List advisories across an organizationImplementation updates:
(mcp.Tool, server.ToolHandlerFunc)→(mcp.Tool, mcp.ToolHandlerFor[map[string]any, any])func(ctx, request) (*result, error)→func(ctx, *request, args) (*result, any, error)jsonschema.Schemastructs with properjson.RawMessagefor defaultsrequestobject → directargsmap accessmcp.NewToolResult*→utils.NewToolResult*Testing:
toolsnaps.Test()calls for schema validationExample 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.