Skip to content

Commit b71a839

Browse files
authored
all: fix typos (#869)
Grammar issues in docs, comments, and error messages.
1 parent 2d43865 commit b71a839

11 files changed

Lines changed: 15 additions & 15 deletions

File tree

docs/protocol.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ to see the logical session
219219
> modelcontextprotocol/modelcontextprotocol#1442 for potential refinements.
220220
221221
_See [examples/server/distributed](../examples/server/distributed/main.go) for
222-
an example using statless mode to implement a server distributed across
222+
an example using stateless mode to implement a server distributed across
223223
multiple processes._
224224

225225
### Custom transports
@@ -264,7 +264,7 @@ and invokes the
264264
passed to `RequireBearerToken` to parse the token and perform validation.
265265
The middleware function checks expiration and scopes (if they are provided in
266266
[`RequireBearerTokenOptions.Scopes`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/auth#RequireBearerTokenOptions.Scopes)), so the
267-
`TokenVerifer` doesn't have to.
267+
`TokenVerifier` doesn't have to.
268268
If [`RequireBearerTokenOptions.ResourceMetadataURL`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/auth#RequireBearerTokenOptions.ResourceMetadataURL) is set and verification fails,
269269
the middleware function sets the WWW-Authenticate header as required by the [Protected Resource
270270
Metadata spec](https://datatracker.ietf.org/doc/html/rfc9728).

examples/server/memory/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ type DeleteEntitiesArgs struct {
6161

6262
// DeleteObservationsArgs defines the delete observations tool parameters.
6363
type DeleteObservationsArgs struct {
64-
Deletions []Observation `json:"deletions" mcp:"obeservations to delete"`
64+
Deletions []Observation `json:"deletions" mcp:"observations to delete"`
6565
}
6666

6767
// DeleteRelationsArgs defines the delete relations tool parameters.

examples/server/toolschemas/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func simpleGreeting(_ context.Context, _ *mcp.CallToolRequest, input Input) (*mc
3636

3737
// manualGreeter handles the parsing and validation of input and output manually.
3838
//
39-
// Therfore, it needs to close over its resolved schemas, to use them in
39+
// Therefore, it needs to close over its resolved schemas, to use them in
4040
// validation.
4141
type manualGreeter struct {
4242
inputSchema *jsonschema.Resolved

internal/docs/protocol.src.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ to see the logical session
144144
> modelcontextprotocol/modelcontextprotocol#1442 for potential refinements.
145145
146146
_See [examples/server/distributed](../examples/server/distributed/main.go) for
147-
an example using statless mode to implement a server distributed across
147+
an example using stateless mode to implement a server distributed across
148148
multiple processes._
149149

150150
### Custom transports
@@ -189,7 +189,7 @@ and invokes the
189189
passed to `RequireBearerToken` to parse the token and perform validation.
190190
The middleware function checks expiration and scopes (if they are provided in
191191
[`RequireBearerTokenOptions.Scopes`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/auth#RequireBearerTokenOptions.Scopes)), so the
192-
`TokenVerifer` doesn't have to.
192+
`TokenVerifier` doesn't have to.
193193
If [`RequireBearerTokenOptions.ResourceMetadataURL`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/auth#RequireBearerTokenOptions.ResourceMetadataURL) is set and verification fails,
194194
the middleware function sets the WWW-Authenticate header as required by the [Protected Resource
195195
Metadata spec](https://datatracker.ietf.org/doc/html/rfc9728).

mcp/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ func (c *Client) elicit(ctx context.Context, req *ElicitRequest) (*ElicitResult,
641641
}
642642
err = resolved.ApplyDefaults(&res.Content)
643643
if err != nil {
644-
return nil, &jsonrpc.Error{Code: jsonrpc.CodeInvalidParams, Message: fmt.Sprintf("failed to apply schema defalts to elicitation result: %v", err)}
644+
return nil, &jsonrpc.Error{Code: jsonrpc.CodeInvalidParams, Message: fmt.Sprintf("failed to apply schema defaults to elicitation result: %v", err)}
645645
}
646646
}
647647
return res, nil

mcp/cmd_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ func TestCommandTransportTerminateDuration(t *testing.T) {
254254
requireExec(t)
255255

256256
// Unfortunately, since it does I/O, this test needs to rely on timing (we
257-
// can't use synctest). However, we can still decreate the default
257+
// can't use synctest). However, we can still decrease the default
258258
// termination duration to speed up the test.
259259
const defaultDur = 50 * time.Millisecond
260260
defer mcp.SetDefaultTerminateDuration(defaultDur)()

mcp/conformance_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ func runServerTest(t *testing.T, test *conformanceTest) {
323323
// Before closing the stream, wait for all messages to be processed.
324324
synctest.Wait()
325325
if err != nil {
326-
t.Fatalf("reading server messages failedd: %v", err)
326+
t.Fatalf("reading server messages failed: %v", err)
327327
}
328328
if extra != nil {
329329
t.Fatalf("got extra response: %v", extra)

mcp/protocol.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,7 @@ type ToolChoice struct {
12201220

12211221
// ElicitationCapabilities describes the capabilities for elicitation.
12221222
//
1223-
// If neither Form nor URL is set, the 'Form' capabilitiy is assumed.
1223+
// If neither Form nor URL is set, the 'Form' capability is assumed.
12241224
type ElicitationCapabilities struct {
12251225
Form *FormElicitationCapabilities `json:"form,omitempty"`
12261226
URL *URLElicitationCapabilities `json:"url,omitempty"`
@@ -1552,7 +1552,7 @@ type ServerCapabilities struct {
15521552
Logging *LoggingCapabilities `json:"logging,omitempty"`
15531553
// Prompts is present if the server supports prompts.
15541554
Prompts *PromptCapabilities `json:"prompts,omitempty"`
1555-
// Resources is present if the server supports resourcs.
1555+
// Resources is present if the server supports resources.
15561556
Resources *ResourceCapabilities `json:"resources,omitempty"`
15571557
// Tools is present if the supports tools.
15581558
Tools *ToolCapabilities `json:"tools,omitempty"`

mcp/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,7 @@ func (ss *ServerSession) Elicit(ctx context.Context, params *ElicitParams) (*Eli
12931293
}
12941294
err = resolved.ApplyDefaults(&res.Content)
12951295
if err != nil {
1296-
return nil, fmt.Errorf("failed to apply schema defalts to elicitation result: %v", err)
1296+
return nil, fmt.Errorf("failed to apply schema defaults to elicitation result: %v", err)
12971297
}
12981298

12991299
return res, nil

mcp/streamable.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func (i *sessionInfo) startPOST() {
9797
i.refs++
9898
}
9999

100-
// endPOST sigals that a request for this session is ending, starting the
100+
// endPOST signals that a request for this session is ending, starting the
101101
// timeout if there are no other requests running.
102102
func (i *sessionInfo) endPOST() {
103103
if i.timeout <= 0 {
@@ -1203,7 +1203,7 @@ func (c *streamableServerConn) servePOST(w http.ResponseWriter, req *http.Reques
12031203
//
12041204
// Create a logical stream to track its responses.
12051205
// Important: don't publish the incoming messages until the stream is
1206-
// registered, as the server may attempt to respond to imcoming messages as
1206+
// registered, as the server may attempt to respond to incoming messages as
12071207
// soon as they're published.
12081208
stream, err := c.newStream(req.Context(), calls, crand.Text())
12091209
if err != nil {

0 commit comments

Comments
 (0)