Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/client/src/client/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export interface OAuthClientProvider {
get clientMetadata(): OAuthClientMetadata;

/**
* Returns a OAuth2 state parameter.
* Returns an OAuth2 state parameter.
*/
state?(): string | Promise<string>;

Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/client/authExtensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function createPrivateKeyJwtAuth(options: {
// Lazy import to avoid heavy dependency unless used
if (globalThis.crypto === undefined) {
throw new TypeError(
'crypto is not available, please ensure you add have Web Crypto API support for older Node.js versions (see https://github.com/modelcontextprotocol/typescript-sdk#nodejs-web-crypto-globalthiscrypto-compatibility)'
'crypto is not available, please ensure you have Web Crypto API support for older Node.js versions (see https://github.com/modelcontextprotocol/typescript-sdk#nodejs-web-crypto-globalthiscrypto-compatibility)'
);
}

Expand Down
6 changes: 3 additions & 3 deletions packages/client/src/client/streamableHttp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export interface StartSSEOptions {

/**
* Override Message ID to associate with the replay message
* so that response can be associate with the new resumed request.
* so that the response can be associated with the new resumed request.
*/
replayMessageId?: string | number;
}
Expand Down Expand Up @@ -255,7 +255,7 @@ export class StreamableHTTPClientTransport implements Transport {
}

/**
* Calculates the next reconnection delay using backoff algorithm
* Calculates the next reconnection delay using a backoff algorithm
*
* @param attempt Current reconnection attempt count for the specific stream
* @returns Time to wait in milliseconds before next reconnection attempt
Expand Down Expand Up @@ -463,7 +463,7 @@ export class StreamableHTTPClientTransport implements Transport {
const { resumptionToken, onresumptiontoken } = options || {};

if (resumptionToken) {
// If we have at last event ID, we need to reconnect the SSE stream
// If we have a last event ID, we need to reconnect the SSE stream
this._startOrAuthSse({ resumptionToken, replayMessageId: isJSONRPCRequest(message) ? message.id : undefined }).catch(
error => this.onerror?.(error)
);
Expand Down
2 changes: 1 addition & 1 deletion packages/client/test/client/authExtensions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ describe('createPrivateKeyJwtAuth', () => {
const params = new URLSearchParams();

await expect(addClientAuth(new Headers(), params, 'https://auth.example.com/token', undefined)).rejects.toThrow(
'crypto is not available, please ensure you add have Web Crypto API support for older Node.js versions'
'crypto is not available, please ensure you have Web Crypto API support for older Node.js versions'
);
} finally {
// Restore original crypto to avoid affecting other tests
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/shared/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export const OAuthErrorResponseSchema = z.object({
});

/**
* Optional version of SafeUrlSchema that allows empty string for retrocompatibility on tos_uri and logo_uri
* Optional version of SafeUrlSchema that allows empty string for backward compatibility on tos_uri and logo_uri
*/
// eslint-disable-next-line unicorn/no-useless-undefined
export const OptionalSafeUrlSchema = SafeUrlSchema.optional().or(z.literal('').transform(() => undefined));
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/shared/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export type ProtocolOptions = {
};

/**
* The default request timeout, in miliseconds.
* The default request timeout, in milliseconds.
*/
export const DEFAULT_REQUEST_TIMEOUT_MSEC = 60_000;

Expand Down Expand Up @@ -1023,7 +1023,7 @@ export abstract class Protocol<ContextT extends BaseContext> {
protected abstract assertTaskCapability(method: string): void;

/**
* A method to check if task handler is supported by the local side, for the given method to be handled.
* A method to check if a task handler is supported by the local side, for the given method to be handled.
*
* This should be implemented by subclasses.
*/
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,7 @@ export const ImageContentSchema = z.object({
});

/**
* An Audio provided to or from an LLM.
* Audio content provided to or from an LLM.
*/
export const AudioContentSchema = z.object({
type: z.literal('audio'),
Expand Down Expand Up @@ -1340,7 +1340,7 @@ export const ToolAnnotationsSchema = z.object({

/**
* If true, calling the tool repeatedly with the same arguments
* will have no additional effect on the its environment.
* will have no additional effect on its environment.
*
* (This property is meaningful only when `readOnlyHint == false`)
*
Expand Down Expand Up @@ -2067,7 +2067,7 @@ export const ElicitResultSchema = ResultSchema.extend({
/**
* The user action in response to the elicitation.
* - "accept": User submitted the form/confirmed the action
* - "decline": User explicitly decline the action
* - "decline": User explicitly declined the action
* - "cancel": User dismissed without making an explicit choice
*/
action: z.enum(['accept', 'decline', 'cancel']),
Expand Down
2 changes: 1 addition & 1 deletion packages/middleware/node/src/streamableHttp.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Node.js HTTP Streamable HTTP Server Transport
* Node.js Streamable HTTP Server Transport
*
* This is a thin wrapper around `WebStandardStreamableHTTPServerTransport` that provides
* compatibility with Node.js HTTP server (IncomingMessage/ServerResponse).
Expand Down
6 changes: 3 additions & 3 deletions packages/server/src/server/mcp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -886,10 +886,10 @@ export class McpServer {

/**
* Sends a logging message to the client, if connected.
* Note: You only need to send the parameters object, not the entire JSON RPC message
* Note: You only need to send the parameters object, not the entire JSON-RPC message.
* @see LoggingMessageNotification
* @param params
* @param sessionId optional for stateless and backward compatibility
* @param sessionId Optional for stateless transports and backward compatibility.
*/
async sendLoggingMessage(params: LoggingMessageNotification['params'], sessionId?: string) {
return this.server.sendLoggingMessage(params, sessionId);
Expand Down Expand Up @@ -943,7 +943,7 @@ export class ResourceTemplate {
uriTemplate: string | UriTemplate,
private _callbacks: {
/**
* A callback to list all resources matching this template. This is required to specified, even if `undefined`, to avoid accidentally forgetting resource listing.
* A callback to list all resources matching this template. This is required to be specified, even if `undefined`, to avoid accidentally forgetting resource listing.
*/
list: ListResourcesCallback | undefined;

Expand Down
4 changes: 2 additions & 2 deletions packages/server/src/server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -631,10 +631,10 @@ export class Server extends Protocol<ServerContext> {

/**
* Sends a logging message to the client, if connected.
* Note: You only need to send the parameters object, not the entire JSON RPC message
* Note: You only need to send the parameters object, not the entire JSON-RPC message.
* @see LoggingMessageNotification
* @param params
* @param sessionId optional for stateless and backward compatibility
* @param sessionId Optional for stateless transports and backward compatibility.
*/
async sendLoggingMessage(params: LoggingMessageNotification['params'], sessionId?: string) {
if (this._capabilities.logging && !this.isMessageIgnored(params.level, sessionId)) {
Expand Down
Loading