mcp: fix tool result in examples (#45)
This commit is contained in:
parent
600ba61efe
commit
10dcf48fdb
2 changed files with 2 additions and 2 deletions
|
|
@ -25,7 +25,7 @@ type HiArgs struct {
|
|||
func SayHi(ctx context.Context, ss *mcp.ServerSession, params *mcp.CallToolParamsFor[HiArgs]) (*mcp.CallToolResultFor[struct{}], error) {
|
||||
return &mcp.CallToolResultFor[struct{}]{
|
||||
Content: []mcp.Content{
|
||||
&mcp.TextContent{Text: "Hi " + params.Name},
|
||||
&mcp.TextContent{Text: "Hi " + params.Arguments.Name},
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ type SayHiParams struct {
|
|||
func SayHi(ctx context.Context, cc *mcp.ServerSession, params *mcp.CallToolParamsFor[SayHiParams]) (*mcp.CallToolResultFor[any], error) {
|
||||
return &mcp.CallToolResultFor[any]{
|
||||
Content: []mcp.Content{
|
||||
&mcp.TextContent{Text: "Hi " + params.Name},
|
||||
&mcp.TextContent{Text: "Hi " + params.Arguments.Name},
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue