- Notifications
You must be signed in to change notification settings - Fork3.1k
Migrate notifications toolset to modelcontextprotocol/go-sdk#1449
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
Migrate notifications toolset to modelcontextprotocol/go-sdk#1449
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>
…igrate-notifications-toolset
| "type":"object", | ||
| "required": [ | ||
| "threadID", | ||
| "state" |
LuluBeatsonNov 20, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
state was not required before migration. But actually, the tool handler requires it.
This is an acceptable change in the tool schema.
LuluBeatson commentedNov 20, 2025
There was a problem hiding this 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 6 notification tools frommark3labs/mcp-go tomodelcontextprotocol/go-sdk as part of the broader SDK migration effort (#1428). The migration updates tool definitions to usejsonschema.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) |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
ee72841 intoomgitsads/go-sdkUh oh!
There was an error while loading.Please reload this page.





Uh oh!
There was an error while loading.Please reload this page.
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 our2 minute survey.