all: fix typos (#869)

Grammar issues in docs, comments, and error messages.
This commit is contained in:
Oleksandr Redko 2026-03-30 19:43:01 +03:00 • committed by GitHub
commit b71a8391a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 15 additions and 15 deletions

View file

@ -219,7 +219,7 @@ to see the logical session
> modelcontextprotocol/modelcontextprotocol#1442 for potential refinements. > modelcontextprotocol/modelcontextprotocol#1442 for potential refinements.
_See [examples/server/distributed](../examples/server/distributed/main.go) for _See [examples/server/distributed](../examples/server/distributed/main.go) for
an example using statless mode to implement a server distributed across an example using stateless mode to implement a server distributed across
multiple processes._ multiple processes._
### Custom transports ### Custom transports
@ -264,7 +264,7 @@ and invokes the
passed to `RequireBearerToken` to parse the token and perform validation. passed to `RequireBearerToken` to parse the token and perform validation.
The middleware function checks expiration and scopes (if they are provided in The middleware function checks expiration and scopes (if they are provided in
[`RequireBearerTokenOptions.Scopes`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/auth#RequireBearerTokenOptions.Scopes)), so the [`RequireBearerTokenOptions.Scopes`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/auth#RequireBearerTokenOptions.Scopes)), so the
`TokenVerifer` doesn't have to. `TokenVerifier` doesn't have to.
If [`RequireBearerTokenOptions.ResourceMetadataURL`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/auth#RequireBearerTokenOptions.ResourceMetadataURL) is set and verification fails, If [`RequireBearerTokenOptions.ResourceMetadataURL`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/auth#RequireBearerTokenOptions.ResourceMetadataURL) is set and verification fails,
the middleware function sets the WWW-Authenticate header as required by the [Protected Resource the middleware function sets the WWW-Authenticate header as required by the [Protected Resource
Metadata spec](https://datatracker.ietf.org/doc/html/rfc9728). Metadata spec](https://datatracker.ietf.org/doc/html/rfc9728).

View file

@ -61,7 +61,7 @@ type DeleteEntitiesArgs struct {
// DeleteObservationsArgs defines the delete observations tool parameters. // DeleteObservationsArgs defines the delete observations tool parameters.
type DeleteObservationsArgs struct { type DeleteObservationsArgs struct {
Deletions []Observation `json:"deletions" mcp:"obeservations to delete"` Deletions []Observation `json:"deletions" mcp:"observations to delete"`
} }
// DeleteRelationsArgs defines the delete relations tool parameters. // DeleteRelationsArgs defines the delete relations tool parameters.

View file

@ -36,7 +36,7 @@ func simpleGreeting(_ context.Context, _ *mcp.CallToolRequest, input Input) (*mc
// manualGreeter handles the parsing and validation of input and output manually. // manualGreeter handles the parsing and validation of input and output manually.
// //
// Therfore, it needs to close over its resolved schemas, to use them in // Therefore, it needs to close over its resolved schemas, to use them in
// validation. // validation.
type manualGreeter struct { type manualGreeter struct {
inputSchema *jsonschema.Resolved inputSchema *jsonschema.Resolved

View file

@ -144,7 +144,7 @@ to see the logical session
> modelcontextprotocol/modelcontextprotocol#1442 for potential refinements. > modelcontextprotocol/modelcontextprotocol#1442 for potential refinements.
_See [examples/server/distributed](../examples/server/distributed/main.go) for _See [examples/server/distributed](../examples/server/distributed/main.go) for
an example using statless mode to implement a server distributed across an example using stateless mode to implement a server distributed across
multiple processes._ multiple processes._
### Custom transports ### Custom transports
@ -189,7 +189,7 @@ and invokes the
passed to `RequireBearerToken` to parse the token and perform validation. passed to `RequireBearerToken` to parse the token and perform validation.
The middleware function checks expiration and scopes (if they are provided in The middleware function checks expiration and scopes (if they are provided in
[`RequireBearerTokenOptions.Scopes`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/auth#RequireBearerTokenOptions.Scopes)), so the [`RequireBearerTokenOptions.Scopes`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/auth#RequireBearerTokenOptions.Scopes)), so the
`TokenVerifer` doesn't have to. `TokenVerifier` doesn't have to.
If [`RequireBearerTokenOptions.ResourceMetadataURL`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/auth#RequireBearerTokenOptions.ResourceMetadataURL) is set and verification fails, If [`RequireBearerTokenOptions.ResourceMetadataURL`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/auth#RequireBearerTokenOptions.ResourceMetadataURL) is set and verification fails,
the middleware function sets the WWW-Authenticate header as required by the [Protected Resource the middleware function sets the WWW-Authenticate header as required by the [Protected Resource
Metadata spec](https://datatracker.ietf.org/doc/html/rfc9728). Metadata spec](https://datatracker.ietf.org/doc/html/rfc9728).

View file

@ -641,7 +641,7 @@ func (c *Client) elicit(ctx context.Context, req *ElicitRequest) (*ElicitResult,
} }
err = resolved.ApplyDefaults(&res.Content) err = resolved.ApplyDefaults(&res.Content)
if err != nil { if err != nil {
return nil, &jsonrpc.Error{Code: jsonrpc.CodeInvalidParams, Message: fmt.Sprintf("failed to apply schema defalts to elicitation result: %v", err)} return nil, &jsonrpc.Error{Code: jsonrpc.CodeInvalidParams, Message: fmt.Sprintf("failed to apply schema defaults to elicitation result: %v", err)}
} }
} }
return res, nil return res, nil

View file

@ -254,7 +254,7 @@ func TestCommandTransportTerminateDuration(t *testing.T) {
requireExec(t) requireExec(t)
// Unfortunately, since it does I/O, this test needs to rely on timing (we // Unfortunately, since it does I/O, this test needs to rely on timing (we
// can't use synctest). However, we can still decreate the default // can't use synctest). However, we can still decrease the default
// termination duration to speed up the test. // termination duration to speed up the test.
const defaultDur = 50 * time.Millisecond const defaultDur = 50 * time.Millisecond
defer mcp.SetDefaultTerminateDuration(defaultDur)() defer mcp.SetDefaultTerminateDuration(defaultDur)()

View file

@ -323,7 +323,7 @@ func runServerTest(t *testing.T, test *conformanceTest) {
// Before closing the stream, wait for all messages to be processed. // Before closing the stream, wait for all messages to be processed.
synctest.Wait() synctest.Wait()
if err != nil { if err != nil {
t.Fatalf("reading server messages failedd: %v", err) t.Fatalf("reading server messages failed: %v", err)
} }
if extra != nil { if extra != nil {
t.Fatalf("got extra response: %v", extra) t.Fatalf("got extra response: %v", extra)

View file

@ -1220,7 +1220,7 @@ type ToolChoice struct {
// ElicitationCapabilities describes the capabilities for elicitation. // ElicitationCapabilities describes the capabilities for elicitation.
// //
// If neither Form nor URL is set, the 'Form' capabilitiy is assumed. // If neither Form nor URL is set, the 'Form' capability is assumed.
type ElicitationCapabilities struct { type ElicitationCapabilities struct {
Form *FormElicitationCapabilities `json:"form,omitempty"` Form *FormElicitationCapabilities `json:"form,omitempty"`
URL *URLElicitationCapabilities `json:"url,omitempty"` URL *URLElicitationCapabilities `json:"url,omitempty"`
@ -1552,7 +1552,7 @@ type ServerCapabilities struct {
Logging *LoggingCapabilities `json:"logging,omitempty"` Logging *LoggingCapabilities `json:"logging,omitempty"`
// Prompts is present if the server supports prompts. // Prompts is present if the server supports prompts.
Prompts *PromptCapabilities `json:"prompts,omitempty"` Prompts *PromptCapabilities `json:"prompts,omitempty"`
// Resources is present if the server supports resourcs. // Resources is present if the server supports resources.
Resources *ResourceCapabilities `json:"resources,omitempty"` Resources *ResourceCapabilities `json:"resources,omitempty"`
// Tools is present if the supports tools. // Tools is present if the supports tools.
Tools *ToolCapabilities `json:"tools,omitempty"` Tools *ToolCapabilities `json:"tools,omitempty"`

View file

@ -1293,7 +1293,7 @@ func (ss *ServerSession) Elicit(ctx context.Context, params *ElicitParams) (*Eli
} }
err = resolved.ApplyDefaults(&res.Content) err = resolved.ApplyDefaults(&res.Content)
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to apply schema defalts to elicitation result: %v", err) return nil, fmt.Errorf("failed to apply schema defaults to elicitation result: %v", err)
} }
return res, nil return res, nil

View file

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

View file

@ -1024,7 +1024,7 @@ func TestStreamableServerTransport(t *testing.T) {
{ {
name: "background", name: "background",
// Enabling replay is necessary here because the standalone "GET" request // Enabling replay is necessary here because the standalone "GET" request
// is fully asynronous. Replay is needed to guarantee message delivery. // is fully asynchronous. Replay is needed to guarantee message delivery.
// //
// TODO(rfindley): this should no longer be necessary. // TODO(rfindley): this should no longer be necessary.
replay: true, replay: true,