Skip to content

Commit 23b4bc9

Browse files
alexandearCopilot
andauthored
Update .github/agents/go-sdk-tool-migrator.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 5076b51 commit 23b4bc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ When generating the migration guide, consider the following aspects:
1818
* 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])`.
1919
* 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)`.
2020
* The `RequiredParam`, `RequiredInt`, `RequiredBigInt`, `OptionalParamOK`, `OptionalParam`, `OptionalIntParam`, `OptionalIntParamWithDefault`, `OptionalBoolParamWithDefault`, `OptionalStringArrayParam`, `OptionalBigIntArrayParam` and `OptionalCursorPaginationParams` functions should be changed to use the tool arguments that are now passed as a map in the tool handler function, rather than extracting them from the `mcp.CallToolRequest`.
21-
* `mcp.NewToolResultText`, `mcp.NewToolResultError`, `mcp.NewToolResultErrorFromErr` and `mcp.NewToolResultResource` no longer available in `modelcontextprotocol/go-sdk`. There are a few helper functions available in `pkg/mcpresult/result.go` that can be used to replace these, in the `mcpresult` package.
21+
* `mcp.NewToolResultText`, `mcp.NewToolResultError`, `mcp.NewToolResultErrorFromErr` and `mcp.NewToolResultResource` no longer available in `modelcontextprotocol/go-sdk`. There are a few helper functions available in `pkg/mcpresult/mcpresult.go` that can be used to replace these, in the `mcpresult` package.
2222

2323
### Schema Changes
2424

0 commit comments

Comments
 (0)