docs: fix README (#32)
This commit is contained in:
parent
1373ddf905
commit
abb650e45b
1 changed files with 2 additions and 2 deletions
|
|
@ -71,7 +71,7 @@ func main() {
|
|||
log.Fatal("tool failed")
|
||||
}
|
||||
for _, c := range res.Content {
|
||||
log.Print(c.Text)
|
||||
log.Print(c.(*mcp.TextContent).Text)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
@ -95,7 +95,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.ContentBlock{mcp.NewTextContent("Hi " + params.Name)},
|
||||
Content: []mcp.Content{&mcp.TextContent{Text: "Hi " + params.Name}},
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue