Skip to content

Commit 1d257b1

Browse files
committed
Update agent to use build tags
1 parent 3620126 commit 1d257b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/agents/go-sdk-tool-migrator.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ cd migrate-go-sdk-<toolset>
2525

2626
## Migration Process
2727

28-
You should focus on ONLY the toolset provided to you 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 toolset you are asked to migrate 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.
2929

3030
When generating the migration guide, consider the following aspects:
3131

32-
* The initial tool file and it's corresponding test file will be fully commented out, as the tests will fail if the code is uncommented. The code should be uncommented before work begins.
32+
* The initial tool file and it's corresponding test file will have the `//go:build ignore` build tag, as the tests will fail if the code is not ignored. The `ignore` build tag should be removed before work begins.
3333
* The import for `github.com/mark3labs/mcp-go/mcp` should be changed to `github.com/modelcontextprotocol/go-sdk/mcp`
3434
* 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])`.
3535
* 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)`.

0 commit comments

Comments
 (0)