Skip to content

Commit 251077a

Browse files
committed
sync README with internal/readme
1 parent 163c4d4 commit 251077a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@ func main() {
7171
log.Fatal("tool failed")
7272
}
7373
for _, c := range res.Content {
74-
if t, ok := c.(*mcp.TextContent); ok {
75-
log.Print(t.Text)
76-
}
74+
log.Print(c.(*mcp.TextContent).Text)
7775
}
7876
}
7977
```
@@ -97,9 +95,7 @@ type HiParams struct {
9795

9896
func SayHi(ctx context.Context, cc *mcp.ServerSession, params *mcp.CallToolParamsFor[HiParams]) (*mcp.CallToolResultFor[any], error) {
9997
return &mcp.CallToolResultFor[any]{
100-
Content: []mcp.Content{
101-
&mcp.TextContent{Text: "Hi " + params.Name},
102-
},
98+
Content: []mcp.Content{&mcp.TextContent{Text: "Hi " + params.Name}},
10399
}, nil
104100
}
105101

0 commit comments

Comments
 (0)