Migrate projects toolset to modelcontextprotocol/go-sdk#1475
Migrate projects toolset to modelcontextprotocol/go-sdk#1475omgitsads merged 6 commits intoomgitsads/go-sdkfrom
Conversation
Co-authored-by: omgitsads <[email protected]>
Co-authored-by: omgitsads <[email protected]>
Co-authored-by: omgitsads <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR migrates the projects toolset (9 tools) from mark3labs/mcp-go to modelcontextprotocol/go-sdk as part of the broader SDK migration (#1428). The migration updates tool definitions from DSL-based schemas to jsonschema.Schema structs, changes handler signatures to the new SDK pattern, and enables the previously commented-out projects toolset.
Key Changes:
- Converted 9 project-related tools (list, get, add, update, delete operations for projects, fields, and items)
- Updated handler signatures to new 3-return-value pattern with separate
argsparameter - Changed parameter extraction and result construction to use new SDK utilities
- Enabled projects toolset registration in
tools.go
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/github/projects.go | Migrated all 9 project tool definitions and handlers to new SDK, updated parameter extraction to use args map, changed result construction to use utils package |
| pkg/github/projects_test.go | Updated tests to cast InputSchema to *jsonschema.Schema, modified handler calls to pass 3 arguments and expect 3 return values, removed build ignore directive |
| pkg/github/tools.go | Enabled projects toolset by uncommenting registration code |
| pkg/github/toolsnaps/*.snap | Updated tool snapshots to reflect new schema structure (field ordering changes, missing readOnlyHint: false for write operations) |
| README.md | Auto-generated documentation changes (incorrectly removed projects toolset from available toolsets) |
| docs/remote-server.md | Auto-generated documentation changes (incorrectly removed projects toolset from remote server toolsets) |
| "annotations": { | ||
| "title": "Add project item", | ||
| "readOnlyHint": false | ||
| "title": "Add project item" |
There was a problem hiding this comment.
The toolsnap file is missing "readOnlyHint": false in the annotations for this write operation. Other write tools in the codebase (e.g., create_branch.snap, push_files.snap, star_repository.snap) include this field. Since AddProjectItem correctly sets ReadOnlyHint: false in the code (line 649 of projects.go), the toolsnap should reflect this.
The toolsnap should include:
"annotations": {
"title": "Add project item",
"readOnlyHint": false
},This needs to be regenerated by running UPDATE_TOOLSNAPS=true go test ./....
| "title": "Add project item" | |
| "title": "Add project item", | |
| "readOnlyHint": false |
| "annotations": { | ||
| "title": "Update project item", | ||
| "readOnlyHint": false | ||
| "title": "Update project item" |
There was a problem hiding this comment.
The toolsnap file is missing "readOnlyHint": false in the annotations for this write operation. Other write tools in the codebase (e.g., create_branch.snap, push_files.snap, star_repository.snap) include this field. Since UpdateProjectItem correctly sets ReadOnlyHint: false in the code (line 755 of projects.go), the toolsnap should reflect this.
The toolsnap should include:
"annotations": {
"title": "Update project item",
"readOnlyHint": false
},This needs to be regenerated by running UPDATE_TOOLSNAPS=true go test ./....
| "title": "Update project item" | |
| "title": "Update project item", | |
| "readOnlyHint": false |
| "annotations": { | ||
| "title": "Delete project item", | ||
| "readOnlyHint": false | ||
| "title": "Delete project item" |
There was a problem hiding this comment.
The toolsnap file is missing "readOnlyHint": false in the annotations for this write operation. Other write tools in the codebase (e.g., create_branch.snap, push_files.snap, star_repository.snap) include this field. Since DeleteProjectItem correctly sets ReadOnlyHint: false in the code (line 862 of projects.go), the toolsnap should reflect this.
The toolsnap should include:
"annotations": {
"title": "Delete project item",
"readOnlyHint": false
},This needs to be regenerated by running UPDATE_TOOLSNAPS=true go test ./....
| "title": "Delete project item" | |
| "title": "Delete project item", | |
| "readOnlyHint": false |
| | Code Security | Code security related tools, such as GitHub Code Scanning | https://api.githubcopilot.com/mcp/x/code_security | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-code_security&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fcode_security%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/code_security/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-code_security&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fcode_security%2Freadonly%22%7D) | | ||
| | Dependabot | Dependabot tools | https://api.githubcopilot.com/mcp/x/dependabot | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-dependabot&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fdependabot%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/dependabot/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-dependabot&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fdependabot%2Freadonly%22%7D) | | ||
| | Discussions | GitHub Discussions related tools | https://api.githubcopilot.com/mcp/x/discussions | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-discussions&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fdiscussions%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/discussions/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-discussions&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fdiscussions%2Freadonly%22%7D) | | ||
| | Experiments | Experimental features that are not considered stable yet | https://api.githubcopilot.com/mcp/x/experiments | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-experiments&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fexperiments%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/experiments/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-experiments&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fexperiments%2Freadonly%22%7D) | |
There was a problem hiding this comment.
Are these generated docs changes deliberate in that PR





Migrates the
projectstoolset (9 tools) frommark3labs/mcp-gotomodelcontextprotocol/go-sdkas part of the broader SDK migration (#1428).Changes
Tool definitions
mcp.WithString(),mcp.WithNumber()) tojsonschema.Schemastructs(ctx, req) -> (result, error)to(ctx, req, args) -> (result, data, error)ReadOnlyHintfrom pointer type to booleanParameter extraction
RequiredParam[T](req, "key")withRequiredParam[T](args, "key")extractPaginationOptions()to acceptmap[string]anyinstead ofmcp.CallToolRequestResult construction
mcp.NewToolResultText/Error()toutils.NewToolResultText/Error()Tests
tool.InputSchemato*jsonschema.Schema&requestandtc.requestArgsseparately, expect 3 return valuesRegistration
tools.go(previously commented out)Example
Before:
After:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.