all: fix typos (#869)
Grammar issues in docs, comments, and error messages.
This commit is contained in:
parent
2d43865b97
commit
b71a8391a6
11 changed files with 15 additions and 15 deletions
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)()
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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"`
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue