internal/mcp: rename ServerConnection->ServerSession
Bring the Server implementation up to date with the spec by renaming ServerConnection to ServerSession. Also update variable names, which were in various states of disarray from the multiple renamings of this type. Change-Id: I4aec883db6d0500fb91e6daa51b702614877cf8a Reviewed-on: https://go-review.googlesource.com/c/tools/+/672655 Auto-Submit: Robert Findley <rfindley@google.com> TryBot-Bypass: Robert Findley <rfindley@google.com> Commit-Queue: Robert Findley <rfindley@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
This commit is contained in:
parent
9f16a99bb1
commit
ac828d5a82
1 changed files with 74 additions and 75 deletions
|
|
@ -19,7 +19,7 @@ type SayHiParams struct {
|
|||
Name string `json:"name" mcp:"the name to say hi to"`
|
||||
}
|
||||
|
||||
func SayHi(ctx context.Context, cc *mcp.ServerConnection, params *SayHiParams) ([]*mcp.Content, error) {
|
||||
func SayHi(ctx context.Context, cc *mcp.ServerSession, params *SayHiParams) ([]*mcp.Content, error) {
|
||||
return []*mcp.Content{
|
||||
mcp.NewTextContent("Hi " + params.Name),
|
||||
}, nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue