Skip to content

Commit abb650e

Browse files
authored
docs: fix README (#32)
1 parent 1373ddf commit abb650e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func main() {
7171
log.Fatal("tool failed")
7272
}
7373
for _, c := range res.Content {
74-
log.Print(c.Text)
74+
log.Print(c.(*mcp.TextContent).Text)
7575
}
7676
}
7777
```
@@ -95,7 +95,7 @@ type HiParams struct {
9595

9696
func SayHi(ctx context.Context, cc *mcp.ServerSession, params *mcp.CallToolParamsFor[HiParams]) (*mcp.CallToolResultFor[any], error) {
9797
return &mcp.CallToolResultFor[any]{
98-
Content: []*mcp.ContentBlock{mcp.NewTextContent("Hi " + params.Name)},
98+
Content: []mcp.Content{&mcp.TextContent{Text: "Hi " + params.Name}},
9999
}, nil
100100
}
101101

0 commit comments

Comments
 (0)