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 projects toolset to modelcontextprotocol/go-sdk#1475

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
omgitsads merged 6 commits intoomgitsads/go-sdkfromcopilot/migrate-projects-toolset
Nov 24, 2025

Conversation

Copy link
Contributor

CopilotAI commentedNov 24, 2025
edited
Loading

Migrates theprojects toolset (9 tools) frommark3labs/mcp-go tomodelcontextprotocol/go-sdk as part of the broader SDK migration (#1428).

Changes

Tool definitions

  • Converted DSL-based schemas (mcp.WithString(),mcp.WithNumber()) tojsonschema.Schema structs
  • Updated handler signatures from(ctx, req) -> (result, error) to(ctx, req, args) -> (result, data, error)
  • ChangedReadOnlyHint from pointer type to boolean

Parameter extraction

  • ReplacedRequiredParam[T](req, "key") withRequiredParam[T](args, "key")
  • UpdatedextractPaginationOptions() to acceptmap[string]any instead ofmcp.CallToolRequest

Result construction

  • Changed frommcp.NewToolResultText/Error() toutils.NewToolResultText/Error()

Tests

  • Updated assertions to casttool.InputSchema to*jsonschema.Schema
  • Modified handler calls to pass&request andtc.requestArgs separately, expect 3 return values

Registration

  • Enabled projects toolset intools.go (previously commented out)

Example

Before:

funcListProjects(...) (tool mcp.Tool,handler server.ToolHandlerFunc) {returnmcp.NewTool("list_projects",mcp.WithString("owner",mcp.Required()),    ),func(ctx context.Context,req mcp.CallToolRequest) (*mcp.CallToolResult,error) {owner,_:=RequiredParam[string](req,"owner")returnmcp.NewToolResultText(result),nil    }}

After:

funcListProjects(...) (mcp.Tool, mcp.ToolHandlerFor[map[string]any,any]) {return mcp.Tool{Name:"list_projects",InputSchema:&jsonschema.Schema{Properties:map[string]*jsonschema.Schema{"owner": {Type:"string"},            },Required: []string{"owner"},        },    },func(ctx context.Context,_*mcp.CallToolRequest,argsmap[string]any) (*mcp.CallToolResult,any,error) {owner,_:=RequiredParam[string](args,"owner")returnutils.NewToolResultText(result),nil,nil    }}
Original prompt

Migrate theprojects 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


✨ Let Copilot coding agentset things up for you — coding agent works faster and does higher quality work when set up for your repo.

CopilotAIand others added3 commitsNovember 24, 2025 12:18
Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>
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 projects toolset to modelcontextprotocol/go-sdkMigrate projects toolset to modelcontextprotocol/go-sdkNov 24, 2025
CopilotAI requested a review fromomgitsadsNovember 24, 2025 12:26
Copilot finished work on behalf ofomgitsadsNovember 24, 2025 12:26
@LuluBeatsonLuluBeatson self-requested a reviewNovember 24, 2025 13:29
@LuluBeatson
Copy link
Contributor

ScreenshotsimageScreenshot 2025-11-24 at 13 45 49Screenshot 2025-11-24 at 13 46 42Screenshot 2025-11-24 at 13 47 11

⚠️ Can't get issues' database IDs with ONLYprojects toolset

Ifprojects is the only enabled toolset, then there isn't a way to get issues' database IDs which is needed foradd_project_item.
image

@LuluBeatsonLuluBeatson marked this pull request as ready for reviewNovember 24, 2025 13:51
@LuluBeatsonLuluBeatson requested a review froma team as acode ownerNovember 24, 2025 13:51
CopilotAI review requested due to automatic review settingsNovember 24, 2025 13:51
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 theprojects toolset (9 tools) frommark3labs/mcp-go tomodelcontextprotocol/go-sdk as part of the broader SDK migration (#1428). The migration updates tool definitions from DSL-based schemas tojsonschema.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 separateargs parameter
  • Changed parameter extraction and result construction to use new SDK utilities
  • Enabled projects toolset registration intools.go

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
pkg/github/projects.goMigrated all 9 project tool definitions and handlers to new SDK, updated parameter extraction to useargs map, changed result construction to useutils package
pkg/github/projects_test.goUpdated 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.goEnabled projects toolset by uncommenting registration code
pkg/github/toolsnaps/*.snapUpdated tool snapshots to reflect new schema structure (field ordering changes, missingreadOnlyHint: false for write operations)
README.mdAuto-generated documentation changes (incorrectly removed projects toolset from available toolsets)
docs/remote-server.mdAuto-generated documentation changes (incorrectly removed projects toolset from remote server toolsets)

"annotations": {
"title":"Add project item",
"readOnlyHint":false
"title":"Add project item"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

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. SinceAddProjectItem correctly setsReadOnlyHint: false in the code (line 649 ofprojects.go), the toolsnap should reflect this.

The toolsnap should include:

"annotations": {"title":"Add project item","readOnlyHint":false},

This needs to be regenerated by runningUPDATE_TOOLSNAPS=true go test ./....

Suggested change
"title":"Add project item"
"title":"Add project item",
"readOnlyHint":false

Copilot uses AI. Check for mistakes.
"annotations": {
"title":"Update project item",
"readOnlyHint":false
"title":"Update project item"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

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. SinceUpdateProjectItem correctly setsReadOnlyHint: false in the code (line 755 ofprojects.go), the toolsnap should reflect this.

The toolsnap should include:

"annotations": {"title":"Update project item","readOnlyHint":false},

This needs to be regenerated by runningUPDATE_TOOLSNAPS=true go test ./....

Suggested change
"title":"Update project item"
"title":"Update project item",
"readOnlyHint":false

Copilot uses AI. Check for mistakes.
"annotations": {
"title":"Delete project item",
"readOnlyHint":false
"title":"Delete project item"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

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. SinceDeleteProjectItem correctly setsReadOnlyHint: false in the code (line 862 ofprojects.go), the toolsnap should reflect this.

The toolsnap should include:

"annotations": {"title":"Delete project item","readOnlyHint":false},

This needs to be regenerated by runningUPDATE_TOOLSNAPS=true go test ./....

Suggested change
"title":"Delete project item"
"title":"Delete project item",
"readOnlyHint":false

Copilot uses AI. Check for mistakes.
| 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)|
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Are these generated docs changes deliberate in that PR

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

Reviewers

@SamMorrowDrumsSamMorrowDrumsSamMorrowDrums approved these changes

@LuluBeatsonLuluBeatsonLuluBeatson approved these changes

@omgitsadsomgitsadsAwaiting requested review from omgitsads

Copilot code reviewCopilotAwaiting requested review from Copilot

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@LuluBeatson@SamMorrowDrums@omgitsads

[8]ページ先頭

©2009-2025 Movatter.jp