diff --git a/README.md b/README.md index 17181eaa..d4900674 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ type HiParams struct { func SayHi(ctx context.Context, cc *mcp.ServerSession, params *mcp.CallToolParamsFor[HiParams]) (*mcp.CallToolResultFor[any], error) { return &mcp.CallToolResultFor[any]{ - Content: []mcp.Content{&mcp.TextContent{Text: "Hi " + params.Name}}, + Content: []mcp.Content{&mcp.TextContent{Text: "Hi " + params.Arguments.Name}}, }, nil } diff --git a/internal/readme/server/server.go b/internal/readme/server/server.go index 177cf8fa..534e0798 100644 --- a/internal/readme/server/server.go +++ b/internal/readme/server/server.go @@ -18,7 +18,7 @@ type HiParams struct { func SayHi(ctx context.Context, cc *mcp.ServerSession, params *mcp.CallToolParamsFor[HiParams]) (*mcp.CallToolResultFor[any], error) { return &mcp.CallToolResultFor[any]{ - Content: []mcp.Content{&mcp.TextContent{Text: "Hi " + params.Name}}, + Content: []mcp.Content{&mcp.TextContent{Text: "Hi " + params.Arguments.Name}}, }, nil }