Skip to content

Commit 915da61

Browse files
docs: fix grammar, typos, and style in JSDoc comments
Fix article usage ("a OAuth2" → "an OAuth2"), typos (`miliseconds` → `milliseconds`, "add have" → "have"), grammar ("can be associate" → "can be associated", "required to specified" → "required to be specified"), and style consistency ("JSON RPC" → "JSON-RPC", "retrocompatibility" → "backward compatibility"). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 0da5d3f commit 915da61

File tree

10 files changed

+18
-18
lines changed

10 files changed

+18
-18
lines changed

packages/client/src/client/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export interface OAuthClientProvider {
6060
get clientMetadata(): OAuthClientMetadata;
6161

6262
/**
63-
* Returns a OAuth2 state parameter.
63+
* Returns an OAuth2 state parameter.
6464
*/
6565
state?(): string | Promise<string>;
6666

packages/client/src/client/authExtensions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function createPrivateKeyJwtAuth(options: {
3030
// Lazy import to avoid heavy dependency unless used
3131
if (globalThis.crypto === undefined) {
3232
throw new TypeError(
33-
'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)'
33+
'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)'
3434
);
3535
}
3636

packages/client/src/client/streamableHttp.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export interface StartSSEOptions {
4444

4545
/**
4646
* Override Message ID to associate with the replay message
47-
* so that response can be associate with the new resumed request.
47+
* so that the response can be associated with the new resumed request.
4848
*/
4949
replayMessageId?: string | number;
5050
}
@@ -255,7 +255,7 @@ export class StreamableHTTPClientTransport implements Transport {
255255
}
256256

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

465465
if (resumptionToken) {
466-
// If we have at last event ID, we need to reconnect the SSE stream
466+
// If we have a last event ID, we need to reconnect the SSE stream
467467
this._startOrAuthSse({ resumptionToken, replayMessageId: isJSONRPCRequest(message) ? message.id : undefined }).catch(
468468
error => this.onerror?.(error)
469469
);

packages/client/test/client/authExtensions.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ describe('createPrivateKeyJwtAuth', () => {
191191
const params = new URLSearchParams();
192192

193193
await expect(addClientAuth(new Headers(), params, 'https://auth.example.com/token', undefined)).rejects.toThrow(
194-
'crypto is not available, please ensure you add have Web Crypto API support for older Node.js versions'
194+
'crypto is not available, please ensure you have Web Crypto API support for older Node.js versions'
195195
);
196196
} finally {
197197
// Restore original crypto to avoid affecting other tests

packages/core/src/shared/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export const OAuthErrorResponseSchema = z.object({
148148
});
149149

150150
/**
151-
* Optional version of SafeUrlSchema that allows empty string for retrocompatibility on tos_uri and logo_uri
151+
* Optional version of SafeUrlSchema that allows empty string for backward compatibility on tos_uri and logo_uri
152152
*/
153153
// eslint-disable-next-line unicorn/no-useless-undefined
154154
export const OptionalSafeUrlSchema = SafeUrlSchema.optional().or(z.literal('').transform(() => undefined));

packages/core/src/shared/protocol.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export type ProtocolOptions = {
120120
};
121121

122122
/**
123-
* The default request timeout, in miliseconds.
123+
* The default request timeout, in milliseconds.
124124
*/
125125
export const DEFAULT_REQUEST_TIMEOUT_MSEC = 60_000;
126126

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

10251025
/**
1026-
* A method to check if task handler is supported by the local side, for the given method to be handled.
1026+
* A method to check if a task handler is supported by the local side, for the given method to be handled.
10271027
*
10281028
* This should be implemented by subclasses.
10291029
*/

packages/core/src/types/types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,7 @@ export const ImageContentSchema = z.object({
11871187
});
11881188

11891189
/**
1190-
* An Audio provided to or from an LLM.
1190+
* Audio content provided to or from an LLM.
11911191
*/
11921192
export const AudioContentSchema = z.object({
11931193
type: z.literal('audio'),
@@ -1340,7 +1340,7 @@ export const ToolAnnotationsSchema = z.object({
13401340

13411341
/**
13421342
* If true, calling the tool repeatedly with the same arguments
1343-
* will have no additional effect on the its environment.
1343+
* will have no additional effect on its environment.
13441344
*
13451345
* (This property is meaningful only when `readOnlyHint == false`)
13461346
*
@@ -2067,7 +2067,7 @@ export const ElicitResultSchema = ResultSchema.extend({
20672067
/**
20682068
* The user action in response to the elicitation.
20692069
* - "accept": User submitted the form/confirmed the action
2070-
* - "decline": User explicitly decline the action
2070+
* - "decline": User explicitly declined the action
20712071
* - "cancel": User dismissed without making an explicit choice
20722072
*/
20732073
action: z.enum(['accept', 'decline', 'cancel']),

packages/middleware/node/src/streamableHttp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Node.js HTTP Streamable HTTP Server Transport
2+
* Node.js Streamable HTTP Server Transport
33
*
44
* This is a thin wrapper around `WebStandardStreamableHTTPServerTransport` that provides
55
* compatibility with Node.js HTTP server (IncomingMessage/ServerResponse).

packages/server/src/server/mcp.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -886,10 +886,10 @@ export class McpServer {
886886

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

packages/server/src/server/server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,10 +631,10 @@ export class Server extends Protocol<ServerContext> {
631631

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

0 commit comments

Comments
 (0)