Skip to content

Commit e85c62e

Browse files
docs(examples): correct use of GetArguments (#316)
As part of 28c9cc3 we made `Params.Arguments` return an `any`. We'd updated almost all the documentation, aside from this case. This doesn't impact the Prompt examples, as they're still using the old method. Co-authored-by: Navendu Pottekkat <[email protected]>
1 parent f99e547 commit e85c62e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func main() {
5858
}
5959

6060
func helloHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
61-
name, ok := request.Params.Arguments["name"].(string)
61+
name, ok := request.GetArguments()["name"].(string)
6262
if !ok {
6363
return nil, errors.New("name must be a string")
6464
}

0 commit comments

Comments
 (0)