Skip to content

Commit 416f83d

Browse files
committed
run go generate
1 parent b987fd6 commit 416f83d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

docs/client.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func Example_roots() {
7070
## Sampling
7171

7272
[Sampling](https://modelcontextprotocol.io/specification/2025-06-18/client/sampling)
73-
is a way for server's to leverage the client's AI capabilities. It is
73+
is a way for servers to leverage the client's AI capabilities. It is
7474
implemented in the SDK as follows:
7575

7676
**Client-side**: To add the `sampling` capability to a client, set
@@ -84,7 +84,7 @@ This function is invoked whenever the server requests sampling.
8484
func Example_sampling() {
8585
ctx := context.Background()
8686

87-
// Create a client with a single root.
87+
// Create a client with a sampling handler.
8888
c := mcp.NewClient(&mcp.Implementation{Name: "client", Version: "v0.0.1"}, &mcp.ClientOptions{
8989
CreateMessageHandler: func(_ context.Context, req *mcp.CreateMessageRequest) (*mcp.CreateMessageResult, error) {
9090
return &mcp.CreateMessageResult{
@@ -127,15 +127,15 @@ allows servers to request user inputs. It is implemented in the SDK as follows:
127127
The elicitation handler must return a result that matches the requested schema;
128128
otherwise, elicitation returns an error.
129129

130-
**Server-side**: To use eliciation from the server, call
130+
**Server-side**: To use elicitation from the server, call
131131
[`ServerSession.Elicit`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ServerSession.Elicit).
132132

133133
```go
134134
func Example_elicitation() {
135135
ctx := context.Background()
136136
ct, st := mcp.NewInMemoryTransports()
137137

138-
s := mcp.NewServer(testImpl, nil)
138+
s := mcp.NewServer(&mcp.Implementation{Name: "server", Version: "v0.0.1"}, nil)
139139
ss, err := s.Connect(ctx, st, nil)
140140
if err != nil {
141141
log.Fatal(err)

docs/protocol.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ session.
3636
[`ClientSession`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ClientSession).
3737
This session is initialized during the `Connect` method, and provides methods
3838
to communicate with the server peer.
39-
- A `Server` is a logical MCP server, configure with various
39+
- A `Server` is a logical MCP server, configured with various
4040
[`ServerOptions`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ServerOptions).
4141
- When a server is connected to a client using
4242
[`Server.Connect`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#Server.Connect),
@@ -53,7 +53,7 @@ session, and a `Wait` method to await session termination by the peer. Typically
5353
it is the client's responsibility to end the session.
5454

5555
```go
56-
func Example_lifeCycle() {
56+
func Example_lifecycle() {
5757
ctx := context.Background()
5858

5959
// Create a client and server.
@@ -119,7 +119,7 @@ newline-delimited JSON over its stdin/stdout.
119119

120120
**Client-side**: the client side of the `stdio` transport is implemented by
121121
[`CommandTransport`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#CommandTransport),
122-
which starts the a given `exec.Cmd` as a subprocess and communicates over its
122+
which starts the a `exec.Cmd` as a subprocess and communicates over its
123123
stdin/stdout.
124124

125125
**Server-side**: the server side of the `stdio` transport is implemented by
@@ -144,7 +144,7 @@ pass it an `mcp.Server`:
144144

145145
```go
146146
func ExampleStreamableHTTPHandler() {
147-
// Create a new stramable handler, using the same MCP server for every request.
147+
// Create a new streamable handler, using the same MCP server for every request.
148148
//
149149
// Here, we configure it to serves application/json responses rather than
150150
// text/event-stream, just so the output below doesn't use random event ids.

0 commit comments

Comments
 (0)