You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/agents/go-sdk-tool-migrator.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,11 +25,11 @@ cd migrate-go-sdk-<toolset>
25
25
26
26
##Migration Process
27
27
28
-
You should focus on ONLY the toolsetprovidedtoyou and it's corresponding test file. If, for example, you are asked to migrate the`dependabot` toolset, you will be migrating the files located at`.tools-to-be-migrated/dependabot.go` and`.tools-to-be-migrated/dependabot_test.go`. The migrated version should be placed in the`github` package directory,`pkg/github` (e.g.`pkg/github/dependabot.go` and`pkg/github/dependabot_test.go`). If there are additional tests or helper functions that fail to work with the new SDK, you should inform me of these issues so that I can address them, or instruct you on how to proceed.
28
+
You should focus on ONLY the toolsetyou are askedtomigrate and it's corresponding test file. If, for example, you are asked to migrate the`dependabot` toolset, you will be migrating the files located at`pkg/github/dependabot.go` and`pkg/github/dependabot_test.go`. If there are additional tests or helper functions that fail to work with the new SDK, you should inform me of these issues so that I can address them, or instruct you on how to proceed.
29
29
30
30
When generating the migration guide, consider the following aspects:
31
31
32
-
* The initial tool file and it's corresponding test file willbe fully commented out, as the tests will fail if the code isuncommented. Thecodeshould beuncommented before work begins.
32
+
* The initial tool file and it's corresponding test file willhave the`//go:build ignore` build tag, as the tests will fail if the code isnot ignored. The`ignore` build tagshould beremoved before work begins.
33
33
* The import for`github.com/mark3labs/mcp-go/mcp` should be changed to`github.com/modelcontextprotocol/go-sdk/mcp`
34
34
* The return type for the tool constructor function should be updated from`mcp.Tool, server.ToolHandlerFunc` to`(mcp.Tool, mcp.ToolHandlerFor[map[string]any, any])`.
35
35
* The tool handler function signature should be updated to use generics, changing from`func(ctx context.Context, mcp.CallToolRequest) (*mcp.CallToolResult, error)` to`func(context.Context, *mcp.CallToolRequest, map[string]any) (*mcp.CallToolResult, any, error)`.