diff --git a/docs/protocol.md b/docs/protocol.md index 72b901d..70f5f41 100644 --- a/docs/protocol.md +++ b/docs/protocol.md @@ -219,7 +219,7 @@ to see the logical session > modelcontextprotocol/modelcontextprotocol#1442 for potential refinements. _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._ ### Custom transports @@ -264,7 +264,7 @@ and invokes the passed to `RequireBearerToken` to parse the token and perform validation. 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 -`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, the middleware function sets the WWW-Authenticate header as required by the [Protected Resource Metadata spec](https://datatracker.ietf.org/doc/html/rfc9728). diff --git a/examples/server/memory/main.go b/examples/server/memory/main.go index 99d109a..039c21b 100644 --- a/examples/server/memory/main.go +++ b/examples/server/memory/main.go @@ -61,7 +61,7 @@ type DeleteEntitiesArgs struct { // DeleteObservationsArgs defines the delete observations tool parameters. 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. diff --git a/examples/server/toolschemas/main.go b/examples/server/toolschemas/main.go index abc1e3f..0a2cfbd 100644 --- a/examples/server/toolschemas/main.go +++ b/examples/server/toolschemas/main.go @@ -36,7 +36,7 @@ func simpleGreeting(_ context.Context, _ *mcp.CallToolRequest, input Input) (*mc // 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. type manualGreeter struct { inputSchema *jsonschema.Resolved diff --git a/internal/docs/protocol.src.md b/internal/docs/protocol.src.md index 5de26d9..7d132d2 100644 --- a/internal/docs/protocol.src.md +++ b/internal/docs/protocol.src.md @@ -144,7 +144,7 @@ to see the logical session > modelcontextprotocol/modelcontextprotocol#1442 for potential refinements. _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._ ### Custom transports @@ -189,7 +189,7 @@ and invokes the passed to `RequireBearerToken` to parse the token and perform validation. 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 -`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, the middleware function sets the WWW-Authenticate header as required by the [Protected Resource Metadata spec](https://datatracker.ietf.org/doc/html/rfc9728). diff --git a/mcp/client.go b/mcp/client.go index 74900b1..dc7bef1 100644 --- a/mcp/client.go +++ b/mcp/client.go @@ -641,7 +641,7 @@ func (c *Client) elicit(ctx context.Context, req *ElicitRequest) (*ElicitResult, } err = resolved.ApplyDefaults(&res.Content) 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 diff --git a/mcp/cmd_test.go b/mcp/cmd_test.go index 1bbff30..57f45a2 100644 --- a/mcp/cmd_test.go +++ b/mcp/cmd_test.go @@ -254,7 +254,7 @@ func TestCommandTransportTerminateDuration(t *testing.T) { requireExec(t) // 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. const defaultDur = 50 * time.Millisecond defer mcp.SetDefaultTerminateDuration(defaultDur)() diff --git a/mcp/conformance_test.go b/mcp/conformance_test.go index 3695ad5..7f1a744 100644 --- a/mcp/conformance_test.go +++ b/mcp/conformance_test.go @@ -323,7 +323,7 @@ func runServerTest(t *testing.T, test *conformanceTest) { // Before closing the stream, wait for all messages to be processed. synctest.Wait() if err != nil { - t.Fatalf("reading server messages failedd: %v", err) + t.Fatalf("reading server messages failed: %v", err) } if extra != nil { t.Fatalf("got extra response: %v", extra) diff --git a/mcp/protocol.go b/mcp/protocol.go index d071740..0b6bf47 100644 --- a/mcp/protocol.go +++ b/mcp/protocol.go @@ -1220,7 +1220,7 @@ type ToolChoice struct { // 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 { Form *FormElicitationCapabilities `json:"form,omitempty"` URL *URLElicitationCapabilities `json:"url,omitempty"` @@ -1552,7 +1552,7 @@ type ServerCapabilities struct { Logging *LoggingCapabilities `json:"logging,omitempty"` // Prompts is present if the server supports prompts. 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"` // Tools is present if the supports tools. Tools *ToolCapabilities `json:"tools,omitempty"` diff --git a/mcp/server.go b/mcp/server.go index c13955c..207276c 100644 --- a/mcp/server.go +++ b/mcp/server.go @@ -1293,7 +1293,7 @@ func (ss *ServerSession) Elicit(ctx context.Context, params *ElicitParams) (*Eli } err = resolved.ApplyDefaults(&res.Content) 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 diff --git a/mcp/streamable.go b/mcp/streamable.go index 7f09b40..ceb1742 100644 --- a/mcp/streamable.go +++ b/mcp/streamable.go @@ -97,7 +97,7 @@ func (i *sessionInfo) startPOST() { 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. func (i *sessionInfo) endPOST() { 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. // 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. stream, err := c.newStream(req.Context(), calls, crand.Text()) if err != nil { diff --git a/mcp/streamable_test.go b/mcp/streamable_test.go index d1dc482..ea75940 100644 --- a/mcp/streamable_test.go +++ b/mcp/streamable_test.go @@ -1024,7 +1024,7 @@ func TestStreamableServerTransport(t *testing.T) { { name: "background", // 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. replay: true,