mcp: fix inaccurate package doc (#534)

This commit is contained in:
Robert Findley 2025-09-26 14:16:10 -04:00 • committed by GitHub
commit ab092510d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -80,9 +80,9 @@
// validated. As a special case, if the output type is 'any', no output schema
// is generated.
//
// func double(_ context.Context, _ *mcp.CallToolRequest, in In) (*mcp.CallToolResponse, Out, error) {
// func double(_ context.Context, _ *mcp.CallToolRequest, in In) (*mcp.CallToolResult, Out, error) {
// return nil, Out{Answer: 2*in.Number}, nil
// }
// ...
// mcp.AddTool(&mcp.Tool{Name: "double", Description: "double a number"}, double)
// mcp.AddTool(server, &mcp.Tool{Name: "double"}, double)
package mcp