Migrate notifications toolset to modelcontextprotocol/go-sdk#1449
Merged
omgitsads merged 6 commits intoomgitsads/go-sdkfrom Nov 24, 2025
Merged
Migrate notifications toolset to modelcontextprotocol/go-sdk#1449omgitsads merged 6 commits intoomgitsads/go-sdkfrom
omgitsads merged 6 commits intoomgitsads/go-sdkfrom
Conversation
Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Migrate notifications toolset to modelcontextprotocol/go-sdk
Migrate notifications toolset to modelcontextprotocol/go-sdk
Nov 20, 2025
…igrate-notifications-toolset
LuluBeatson
reviewed
Nov 20, 2025
| "type": "object", | ||
| "required": [ | ||
| "threadID", | ||
| "state" |
Contributor
There was a problem hiding this comment.
state was not required before migration. But actually, the tool handler requires it.
This is an acceptable change in the tool schema.
Contributor
LuluBeatson
approved these changes
Nov 20, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR migrates 6 notification tools from mark3labs/mcp-go to modelcontextprotocol/go-sdk as part of the broader SDK migration effort (#1428). The migration updates tool definitions to use jsonschema.Schema structs instead of DSL-based builders, updates handler signatures to match the new SDK's three-return-value pattern, and adjusts parameter extraction and result creation to use the new SDK's interfaces.
Key Changes
- Tool return types changed from
(mcp.Tool, server.ToolHandlerFunc)to(mcp.Tool, mcp.ToolHandlerFor[map[string]any, any]) - Schema definitions converted from DSL (
mcp.WithString(), etc.) tojsonschema.Schemastructs - Parameter extraction now uses
args map[string]anyinstead ofrequest - Result helpers updated from
mcp.NewToolResultText()toutils.NewToolResultText()
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
pkg/github/notifications.go |
Migrated 6 notification tool implementations to new SDK, including schema definitions and handler logic |
pkg/github/notifications_test.go |
Updated test invocations for new handler signatures (3 return values) and schema assertions to use *jsonschema.Schema |
pkg/github/tools.go |
Uncommented notifications toolset registration to re-enable these tools |
pkg/github/__toolsnaps__/*.snap |
Updated toolsnaps to reflect new schema serialization format (field ordering, optional false values omitted) |
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 6 notification tools from
mark3labs/mcp-gotomodelcontextprotocol/go-sdk:list_notificationsdismiss_notificationmark_all_notifications_readget_notification_detailsmanage_notification_subscriptionmanage_repository_notification_subscriptionChanges
Tool Implementation
(mcp.Tool, server.ToolHandlerFunc)→(mcp.Tool, mcp.ToolHandlerFor[map[string]any, any])func(context.Context, mcp.CallToolRequest) (*mcp.CallToolResult, error)→func(context.Context, *mcp.CallToolRequest, map[string]any) (*mcp.CallToolResult, any, error)mcp.NewTool(),mcp.WithString()) →jsonschema.SchemastructsOptionalParam[T](request, "key")→OptionalParam[T](args, "key")mcp.NewToolResultText()→utils.NewToolResultText()Test Updates
handler(ctx, request)→handler(ctx, &request, args)result, err→result, _, errExample
Toolsnaps updated to reflect new schema format while maintaining logical equivalence.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.