Skip to content

Commit 57aab1c

Browse files
committed
fix readme
1 parent 037db67 commit 57aab1c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,10 @@ type HiParams struct {
115115
Name string `json:"name" jsonschema:"the name of the person to greet"`
116116
}
117117

118-
func SayHi(ctx context.Context, req *mcp.ServerRequest[*mcp.CallToolParamsFor[HiParams]]) (*mcp.CallToolResultFor[any], error) {
119-
return &mcp.CallToolResultFor[any]{
120-
Content: []mcp.Content{&mcp.TextContent{Text: "Hi " + req.Params.Arguments.Name}},
121-
}, nil
118+
func SayHi(ctx context.Context, req *mcp.ServerRequest[*mcp.CallToolParams], args HiParams) (*mcp.CallToolResult, any, error) {
119+
return &mcp.CallToolResult{
120+
Content: []mcp.Content{&mcp.TextContent{Text: "Hi " + args.Name}},
121+
}, nil, nil
122122
}
123123

124124
func main() {

0 commit comments

Comments
 (0)