@orkestrel/mcp 0.0.19 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@ import { ToolManagerInterface } from '@orkestrel/tool';
8
8
  import { ToolResult } from '@orkestrel/tool';
9
9
 
10
10
  /**
11
- * Pipe an {@link MCPTransportInterface} into an {@link MCPClientInterface} — every
11
+ * Pipes an {@link MCPTransportInterface} into an {@link MCPClientInterface} — every
12
12
  * inbound message is decoded and delivered onto the client's OWN transport
13
13
  * (`client.transport.emitter`'s `message` / `close` events), resolving/rejecting the
14
14
  * client's correlated pending requests exactly as a direct reply would.
@@ -22,7 +22,7 @@ import { ToolResult } from '@orkestrel/tool';
22
22
  * this binder then completes the inbound half by decoding each message and pushing it
23
23
  * onto `client.transport.emitter` (an {@link import('@orkestrel/emitter').EmitterInterface}
24
24
  * exposes `emit`, so no client modification is needed). A malformed / non-JSON-RPC
25
- * inbound message is DROPPED (§14, total — never throws); a delivery fault is routed to
25
+ * inbound message is DROPPED (total — never throws); a delivery fault is routed to
26
26
  * `client.transport.emitter`'s `error` event (never rethrown). The returned unbind
27
27
  * DETACHES this binder (further inbound messages and the transport's `closed` signal are
28
28
  * ignored) WITHOUT closing the transport.
@@ -40,7 +40,7 @@ import { ToolResult } from '@orkestrel/tool';
40
40
  * itself when a caller's `signal` aborts, on a carrier declaring `duplex`. Adding a registry
41
41
  * here would be a second correlation table for ids the client is already correlating, and two
42
42
  * tables for one fact drift. The one obligation this binder does carry is delivery: a
43
- * malformed / non-JSON-RPC inbound message is DROPPED (§14, total — never throws).
43
+ * malformed / non-JSON-RPC inbound message is DROPPED (total — never throws).
44
44
  *
45
45
  * @param client - The transport-agnostic client whose transport to deliver messages onto
46
46
  * @param transport - The duplex channel to pipe the client over
@@ -58,9 +58,9 @@ import { ToolResult } from '@orkestrel/tool';
58
58
  export declare function bindClient(client: MCPClientInterface, transport: MCPTransportInterface): () => void;
59
59
 
60
60
  /**
61
- * Pipe an {@link MCPTransportInterface} into an {@link MCPDispatcherInterface} — every
61
+ * Pipes an {@link MCPTransportInterface} into an {@link MCPDispatcherInterface} — every
62
62
  * inbound message runs through `server.handle`, and a defined reply is written back
63
- * via `transport.send`.
63
+ * through `transport.send`.
64
64
  *
65
65
  * @remarks
66
66
  * `server.handle` already turns a malformed message into a serialized `-32700` /
@@ -81,7 +81,7 @@ export declare function bindClient(client: MCPClientInterface, transport: MCPTra
81
81
  * **This binder OWNS every exchange it starts, and ends each one on every exit.** It holds one
82
82
  * `AbortController` per live request, keyed by the request's id and deleted whenever that
83
83
  * request leaves — normally, by a throw, or by cancellation — and it supplies that signal to
84
- * `handle` as {@link import('./types.js').MCPDispatchOptions}. Three consequences follow.
84
+ * `handle` as {@link import('./types.js').MCPDispatchOptions}. These consequences follow.
85
85
  * An inbound `notifications/cancelled` ABORTS the request it names, which is how the message-
86
86
  * based cancellation path reaches a tool on the carriers that have one (stdio, WebSocket,
87
87
  * `MessagePort`); a cancelled request writes NO response, because a peer that asked for a call
@@ -111,12 +111,12 @@ export declare function bindClient(client: MCPClientInterface, transport: MCPTra
111
111
  export declare function bindServer(server: MCPDispatcherInterface, transport: MCPTransportInterface): () => void;
112
112
 
113
113
  /**
114
- * Narrow one `tools/call` answer to the arm the peer chose.
114
+ * Narrows one `tools/call` answer to the arm the peer chose.
115
115
  *
116
116
  * @remarks
117
- * The three arms {@link matchesResultType} admits are the whole space this sees, because a
117
+ * The arms {@link matchesResultType} admits are the whole space this sees, because a
118
118
  * `resultType` the client cannot name is refused at correlation. What is left is validating
119
- * the two arms the protocol gives a shape to, and deriving the tool's value from the one it
119
+ * the arms the protocol gives a shape to, and deriving the tool's value from the one it
120
120
  * does not:
121
121
  *
122
122
  * - A peer's `structuredContent` is PREFERRED over the content blocks, because it is the
@@ -142,7 +142,7 @@ export declare function bindServer(server: MCPDispatcherInterface, transport: MC
142
142
  export declare function buildCallOutcome(name: string, result: unknown): MCPCallOutcome;
143
143
 
144
144
  /**
145
- * Build one official cancellation notification for a request already sent.
145
+ * Builds one official cancellation notification for a request already sent.
146
146
  *
147
147
  * @remarks
148
148
  * `requestId` and `reason` are WIRE SPELLINGS carried verbatim from the dated schema's
@@ -172,7 +172,7 @@ export declare function buildCallOutcome(name: string, result: unknown): MCPCall
172
172
  export declare function buildCancelledNotification(id: JSONRPCId, reason?: string): JSONRPCNotification;
173
173
 
174
174
  /**
175
- * Build the mandatory modern `server/discover` result.
175
+ * Builds the mandatory modern `server/discover` result.
176
176
  *
177
177
  * @remarks
178
178
  * `capabilities.resources` and `capabilities.prompts` appear only for servers with their
@@ -190,7 +190,7 @@ export declare function buildCancelledNotification(id: JSONRPCId, reason?: strin
190
190
  export declare function buildDiscoverResult(options: MCPServerOptions): MCPDiscoverResult;
191
191
 
192
192
  /**
193
- * Build the MCP `initialize` result — the negotiated protocol version, the
193
+ * Builds the MCP `initialize` result — the negotiated protocol version, the
194
194
  * advertised capabilities, and the server identity.
195
195
  *
196
196
  * @remarks
@@ -208,7 +208,7 @@ export declare function buildDiscoverResult(options: MCPServerOptions): MCPDisco
208
208
  export declare function buildInitializeResult(name: string, version: string, requested?: string): MCPLegacyResult;
209
209
 
210
210
  /**
211
- * Build a JSON-RPC error {@link JSONRPCErrorResponse} — the `id` echoed, the failure
211
+ * Builds a JSON-RPC error {@link JSONRPCErrorResponse} — the `id` echoed, the failure
212
212
  * as an `error` object.
213
213
  *
214
214
  * @remarks
@@ -225,7 +225,7 @@ export declare function buildInitializeResult(name: string, version: string, req
225
225
  export declare function buildJSONRPCError(id: JSONRPCId | undefined, code: number, message: string, data?: unknown): JSONRPCErrorResponse;
226
226
 
227
227
  /**
228
- * Build a JSON-RPC success {@link JSONRPCResultResponse} — the `id` echoed, the
228
+ * Builds a JSON-RPC success {@link JSONRPCResultResponse} — the `id` echoed, the
229
229
  * method's value as `result`.
230
230
  *
231
231
  * @remarks
@@ -239,7 +239,7 @@ export declare function buildJSONRPCError(id: JSONRPCId | undefined, code: numbe
239
239
  export declare function buildJSONRPCResult(id: JSONRPCId, result: MCPResult | MCPLegacyResult): JSONRPCResultResponse;
240
240
 
241
241
  /**
242
- * Resolve the caller-facing dispatch options into the options a dispatched method
242
+ * Resolves the caller-facing dispatch options into the options a dispatched method
243
243
  * receives.
244
244
  *
245
245
  * @remarks
@@ -269,7 +269,7 @@ export declare function buildJSONRPCResult(id: JSONRPCId, result: MCPResult | MC
269
269
  export declare function buildMethodOptions(options: MCPDispatchOptions, lifetime: AbortSignal): MCPMethodOptions;
270
270
 
271
271
  /**
272
- * Stamp a result with the modern complete-result discriminator and server
272
+ * Stamps a result with the modern complete-result discriminator and server
273
273
  * metadata, plus cache fields when the result is cacheable.
274
274
  *
275
275
  * @remarks
@@ -296,7 +296,7 @@ export declare function buildModernResult<T extends object>(result: T, identity:
296
296
  };
297
297
 
298
298
  /**
299
- * Build one official progress notification for the original request stream.
299
+ * Builds one official progress notification for the original request stream.
300
300
  *
301
301
  * @param token - The request's original opaque progress token
302
302
  * @param progress - The finite progress payload
@@ -305,7 +305,7 @@ export declare function buildModernResult<T extends object>(result: T, identity:
305
305
  export declare function buildProgressNotification(token: string | number, progress: MCPProgress): JSONRPCNotification;
306
306
 
307
307
  /**
308
- * Build the first notification carrying a subscription id for a listen request.
308
+ * Builds the first notification carrying a subscription id for a listen request.
309
309
  *
310
310
  * @param notifications - The exact notification filter the server will honour
311
311
  * @param id - The `subscriptions/listen` request id
@@ -314,7 +314,7 @@ export declare function buildProgressNotification(token: string | number, progre
314
314
  export declare function buildSubscriptionAcknowledgement(notifications: MCPSubscriptionFilter, id: JSONRPCId): JSONRPCNotification;
315
315
 
316
316
  /**
317
- * Intersect a requested subscription filter with the notification families a server supports.
317
+ * Intersects a requested subscription filter with the notification families a server supports.
318
318
  *
319
319
  * @param requested - The notification families requested by the client
320
320
  * @param supported - The notification families the server can actually produce
@@ -323,7 +323,7 @@ export declare function buildSubscriptionAcknowledgement(notifications: MCPSubsc
323
323
  export declare function buildSubscriptionFilter(requested: MCPSubscriptionFilter, supported: MCPSubscriptionFilter): MCPSubscriptionFilter;
324
324
 
325
325
  /**
326
- * Build the terminating response for a subscription source that closes gracefully.
326
+ * Builds the terminating response for a subscription source that closes gracefully.
327
327
  *
328
328
  * @param id - The `subscriptions/listen` request id
329
329
  * @param identity - The server identity included by the modern result stamping site
@@ -332,7 +332,7 @@ export declare function buildSubscriptionFilter(requested: MCPSubscriptionFilter
332
332
  export declare function buildSubscriptionResult(id: JSONRPCId, identity: MCPIdentity): JSONRPCResultResponse;
333
333
 
334
334
  /**
335
- * Build the canonical Tool call for one validated MCP `tools/call` request.
335
+ * Builds the canonical Tool call for one validated MCP `tools/call` request.
336
336
  *
337
337
  * @param request - The original MCP request
338
338
  * @param caller - Optional consumer-asserted caller context
@@ -342,7 +342,7 @@ export declare function buildSubscriptionResult(id: JSONRPCId, identity: MCPIden
342
342
  export declare function buildToolCall(request: JSONRPCRequest, caller?: unknown, args?: Readonly<Record<string, unknown>>): ToolCall | undefined;
343
343
 
344
344
  /**
345
- * Map a {@link ToolManagerInterface}'s definitions to MCP `tools/list` descriptors
345
+ * Maps a {@link ToolManagerInterface}'s definitions to MCP `tools/list` descriptors
346
346
  * — renaming `parameters` to the wire's `inputSchema`.
347
347
  *
348
348
  * @remarks
@@ -357,7 +357,7 @@ export declare function buildToolCall(request: JSONRPCRequest, caller?: unknown,
357
357
  export declare function buildToolDescriptors(manager: ToolManagerInterface): readonly MCPToolDescriptor[];
358
358
 
359
359
  /**
360
- * Adapt an {@link MCPTransportInterface} (the environment-agnostic duplex message
360
+ * Adapts an {@link MCPTransportInterface} (the environment-agnostic duplex message
361
361
  * channel) into a {@link MCPClientTransportInterface} — the additive bridge that lets
362
362
  * `createMCPClient` run over the new port without any change to `MCPClient`'s
363
363
  * existing shape.
@@ -365,7 +365,7 @@ export declare function buildToolDescriptors(manager: ToolManagerInterface): rea
365
365
  * @remarks
366
366
  * Hand the RESULT to `createMCPClient({ transport })`, then pass the SAME
367
367
  * `transport` to {@link import('./helpers.js').bindClient} to complete the inbound
368
- * wiring: `send` serializes each outbound {@link JSONRPCMessage} and writes it via
368
+ * wiring: `send` serializes each outbound {@link JSONRPCMessage} and writes it through
369
369
  * `transport.send`; `close` closes the underlying
370
370
  * `transport`; `start` is a no-op (the duplex channel is already open by the time
371
371
  * it is handed in — there is no separate connect step at this layer); `session` is
@@ -393,7 +393,7 @@ export declare function buildToolDescriptors(manager: ToolManagerInterface): rea
393
393
  export declare function createDuplexClientTransport(transport: MCPTransportInterface): MCPClientTransportInterface;
394
394
 
395
395
  /**
396
- * Create a transport-agnostic Model Context Protocol CLIENT — connects to a REMOTE
396
+ * Creates a transport-agnostic Model Context Protocol CLIENT — connects to a REMOTE
397
397
  * MCP server over an injected {@link import('./types.js').MCPClientTransportInterface},
398
398
  * runs the `initialize` handshake, and exposes the server's tools as local
399
399
  * {@link import('@orkestrel/tool').ToolInterface}s an agent can run.
@@ -407,8 +407,7 @@ export declare function createDuplexClientTransport(transport: MCPTransportInter
407
407
  * locally, so an agent's {@link import('@orkestrel/tool').ToolManagerInterface}
408
408
  * isolates it). The transport is injected — a concrete one (the HTTP transport over
409
409
  * `fetch`) lives in the published server environment; the client itself is provider-agnostic. Subscribe
410
- * to `connect` / `disconnect` / `notification` via `client.on(...)` (or
411
- * `client.emitter.on(...)`).
410
+ * to `connect` / `disconnect` / `notification` through `client.emitter.on(...)`.
412
411
  *
413
412
  * @param options - `transport` (the carrier; REQUIRED), an optional `identity`
414
413
  * (the client identity), `timeout` (the per-request deadline), and the reserved `on`
@@ -417,7 +416,7 @@ export declare function createDuplexClientTransport(transport: MCPTransportInter
417
416
  *
418
417
  * @example
419
418
  * ```ts
420
- * import { createMCPClient } from '@src/core'
419
+ * import { createMCPClient } from '@orkestrel/mcp'
421
420
  * import { createHTTPClientTransport } from '@orkestrel/mcp/server'
422
421
  *
423
422
  * const client = createMCPClient({
@@ -431,7 +430,7 @@ export declare function createDuplexClientTransport(transport: MCPTransportInter
431
430
  export declare function createMCPClient(options: MCPClientOptions): MCPClientInterface;
432
431
 
433
432
  /**
434
- * Decorate one MCP server with the fixed legacy method translation.
433
+ * Decorates one MCP server with the fixed legacy method translation.
435
434
  *
436
435
  * @param server - The sole modern dispatcher and handshake identity source
437
436
  * @returns A dispatcher accepting both modern and legacy invocations
@@ -439,7 +438,7 @@ export declare function createMCPClient(options: MCPClientOptions): MCPClientInt
439
438
  export declare function createMCPLegacy(server: MCPServerInterface): MCPDispatcherInterface;
440
439
 
441
440
  /**
442
- * Create a transport-agnostic Model Context Protocol server — exposes a live
441
+ * Creates a transport-agnostic Model Context Protocol server — exposes a live
443
442
  * {@link import('@orkestrel/tool').ToolManagerInterface} and an optional
444
443
  * {@link import('./types.js').MCPResourceManagerInterface},
445
444
  * {@link import('./types.js').MCPPromptManagerInterface}, and
@@ -452,7 +451,7 @@ export declare function createMCPLegacy(server: MCPServerInterface): MCPDispatch
452
451
  * and no model. The {@link import('@orkestrel/tool').ToolManagerInterface} already
453
452
  * isolates a thrown tool into a `success: false` result (surfaced as an MCP
454
453
  * `isError: true` tool result), so a misbehaving tool never crashes a dispatch. Subscribe to the
455
- * `request` event via `server.emitter.on('request', …)` for tracing.
454
+ * `request` event through `server.emitter.on('request', …)` for tracing.
456
455
  *
457
456
  * @param options - `identity` (the server identity), `tools` (the live tool
458
457
  * registry), optional `resources` (the consumer-owned resource registry), optional
@@ -464,7 +463,8 @@ export declare function createMCPLegacy(server: MCPServerInterface): MCPDispatch
464
463
  *
465
464
  * @example
466
465
  * ```ts
467
- * import { createMCPServer, createTool, createToolManager } from '@src/core'
466
+ * import { createMCPServer } from '@orkestrel/mcp'
467
+ * import { createTool, createToolManager } from '@orkestrel/tool'
468
468
  *
469
469
  * const tools = createToolManager()
470
470
  * tools.add(createTool({ name: 'add', execute: (a) => Number(a.x) + Number(a.y) }))
@@ -480,7 +480,7 @@ export declare function createMCPLegacy(server: MCPServerInterface): MCPDispatch
480
480
  export declare function createMCPServer(options: MCPServerOptions): MCPServerInterface;
481
481
 
482
482
  /**
483
- * Decode one raw inbound message within an explicit bound — the decode a binder performs
483
+ * Decodes one raw inbound message within an explicit bound — the decode a binder performs
484
484
  * before it hands the string on.
485
485
  *
486
486
  * @remarks
@@ -488,14 +488,14 @@ export declare function createMCPServer(options: MCPServerOptions): MCPServerInt
488
488
  * `JSON.parse`d at all: a decoder that parses before it measures has already spent the work
489
489
  * the bound exists to refuse. A message over the bound, malformed JSON, and a well-formed
490
490
  * value that is not a JSON-RPC message are one answer — `undefined` — because a binder does
491
- * exactly the same thing with all three: nothing, and let
491
+ * exactly the same thing with each of them: nothing, and let
492
492
  * {@link import('./types.js').MCPServerInterface.handle} produce the wire refusal from the
493
493
  * same bound.
494
494
  *
495
- * Total (§14) — never throws, whatever the input.
495
+ * Total — never throws, whatever the input.
496
496
  *
497
497
  * @param message - The raw inbound JSON-RPC message string
498
- * @param limits - The byte and depth bounds to decode within (the server's own, via `limit`)
498
+ * @param limits - The byte and depth bounds to decode within (the server's own, from `limit`)
499
499
  * @returns The decoded message, or `undefined` when it is over the bound or is not one
500
500
  *
501
501
  * @example
@@ -542,9 +542,6 @@ export declare const DEFAULT_MCP_LIMITS: Readonly<{
542
542
  depth: 32;
543
543
  }>;
544
544
 
545
- /** The maximum discovery-probe deadline used when a client deadline is configured. */
546
- export declare const DEFAULT_MCP_PROBE_TIMEOUT = 50;
547
-
548
545
  /**
549
546
  * The default per-request deadline (ms) an `MCPClient` applies when `options.timeout`
550
547
  * is unset — a request the remote server does not answer within it rejects.
@@ -552,7 +549,7 @@ export declare const DEFAULT_MCP_PROBE_TIMEOUT = 50;
552
549
  export declare const DEFAULT_MCP_REQUEST_TIMEOUT = 30000;
553
550
 
554
551
  /**
555
- * Compute a lowercase host-neutral SHA-256 digest of one bounded canonical JSON value.
552
+ * Computes a lowercase host-neutral SHA-256 digest of one bounded canonical JSON value.
556
553
  *
557
554
  * @param value - The unknown value to validate and digest
558
555
  * @param limits - Serialized byte, key, and depth limits
@@ -577,7 +574,7 @@ export declare function digestJSON(value: unknown, limits: MCPJSONLimitOptions):
577
574
  export declare const EMPTY_MCP_ARGUMENTS: Readonly<Record<string, unknown>>;
578
575
 
579
576
  /**
580
- * Concatenate an MCP tool-call result's text content blocks into one string.
577
+ * Concatenates an MCP tool-call result's text content blocks into one string.
581
578
  *
582
579
  * @remarks
583
580
  * The inverse of a server splitting a value into text block(s), and TOTAL: a non-record
@@ -597,7 +594,7 @@ export declare const EMPTY_MCP_ARGUMENTS: Readonly<Record<string, unknown>>;
597
594
  export declare function extractContentText(result: unknown): string;
598
595
 
599
596
  /**
600
- * Infer the wire era for an MCP protocol revision.
597
+ * Infers the wire era for an MCP protocol revision.
601
598
  *
602
599
  * @param version - The protocol revision to classify
603
600
  * @returns `'modern'` for `2026-07-28`, `'legacy'` for either supported legacy
@@ -606,12 +603,12 @@ export declare function extractContentText(result: unknown): string;
606
603
  export declare function inferEra(version: string): MCPEra | undefined;
607
604
 
608
605
  /**
609
- * Infer the protocol version an outbound message announces itself with — the ONE
606
+ * Infers the protocol version an outbound message announces itself with — the ONE
610
607
  * projection every HTTP client transport stamps `mcp-protocol-version` from.
611
608
  *
612
609
  * @remarks
613
610
  * This is deliberately the SAME read the server's own expectation performs
614
- * ({@link import('@src/server').inferHeaderIssue}): a modern request's reserved
611
+ * ({@link import('@orkestrel/mcp/server').inferHeaderIssue}): a modern request's reserved
615
612
  * `_meta` version, accepted whenever it is a string. It is NOT
616
613
  * {@link import('./parsers.js').parseRequestContext}, and the difference is the whole
617
614
  * point. That parser answers a different question — is the modern metadata WELL FORMED —
@@ -624,7 +621,7 @@ export declare function inferEra(version: string): MCPEra | undefined;
624
621
  * `initialize` handshake the transport captured, not from the message.
625
622
  *
626
623
  * Header NAMES stay with the transports that own the wire (see `constants.ts`); core owns
627
- * the value this projection derives, which is the part the two faces disagreed about.
624
+ * the value this projection derives, which is the part the browser and Node faces disagreed about.
628
625
  *
629
626
  * @param message - The outbound message about to be written
630
627
  * @returns The version to announce, or `undefined` when the message announces none
@@ -637,7 +634,7 @@ export declare function inferEra(version: string): MCPEra | undefined;
637
634
  export declare function inferRequestVersion(message: JSONRPCMessage): string | undefined;
638
635
 
639
636
  /**
640
- * Infer the newest supported protocol revision present in a peer's offer.
637
+ * Infers the newest supported protocol revision present in a peer's offer.
641
638
  *
642
639
  * @param offered - The protocol revisions offered by the peer
643
640
  * @returns The newest locally supported offered revision, or `undefined`
@@ -645,7 +642,7 @@ export declare function inferRequestVersion(message: JSONRPCMessage): string | u
645
642
  export declare function inferVersion(offered: readonly string[]): MCPVersion | undefined;
646
643
 
647
644
  /**
648
- * Determine whether a value is one absolute URI under RFC 3986 syntax.
645
+ * Determines whether a value is one absolute URI under RFC 3986 syntax.
649
646
  *
650
647
  * @remarks
651
648
  * This host-neutral syntax guard does not resolve, normalize, decode, fetch, or apply a
@@ -657,7 +654,7 @@ export declare function inferVersion(offered: readonly string[]): MCPVersion | u
657
654
  export declare function isAbsoluteURI(value: unknown): value is string;
658
655
 
659
656
  /**
660
- * Determine whether a value is bounded, cycle-free exact JSON.
657
+ * Determines whether a value is bounded, cycle-free exact JSON.
661
658
  *
662
659
  * @remarks
663
660
  * Traversal is iterative, ancestor-aware, and contained by {@link attempt}; deep input,
@@ -676,7 +673,7 @@ export declare function isAbsoluteURI(value: unknown): value is string;
676
673
  export declare function isBoundedJSON<T>(value: T, limits: MCPJSONLimitOptions): value is T & JSONValue;
677
674
 
678
675
  /**
679
- * Determine whether a value is a string within a UTF-8 byte bound.
676
+ * Determines whether a value is a string within a UTF-8 byte bound.
680
677
  *
681
678
  * @param value - The unknown value to inspect
682
679
  * @param bytes - The maximum accepted encoded bytes
@@ -691,7 +688,7 @@ export declare function isBoundedJSON<T>(value: T, limits: MCPJSONLimitOptions):
691
688
  export declare function isBoundedString(value: unknown, bytes: number): value is string;
692
689
 
693
690
  /**
694
- * Determine whether accepted elicitation content satisfies the exact schema that was issued.
691
+ * Determines whether accepted elicitation content satisfies the exact schema that was issued.
695
692
  *
696
693
  * @remarks
697
694
  * {@link isMCPElicitResult} says a response has the SHAPE of a response; this says the
@@ -713,7 +710,7 @@ export declare function isBoundedString(value: unknown, bytes: number): value is
713
710
  * that answers more than it was asked is not refused for it. A `schema` that is not itself a
714
711
  * valid {@link MCPElicitSchema} admits NOTHING — an unenforceable schema is never a permissive
715
712
  * one — which is why `schema` is accepted as `unknown` and checked rather than trusted. Total
716
- * (§14) over hostile content and hostile schemas alike.
713
+ * over hostile content and hostile schemas alike.
717
714
  *
718
715
  * @param value - The accepted response content to check
719
716
  * @param schema - The exact {@link MCPElicitSchema} that was issued with the elicitation
@@ -734,7 +731,7 @@ export declare function isBoundedString(value: unknown, bytes: number): value is
734
731
  export declare function isElicitContent(value: unknown, schema: unknown): value is Readonly<Record<string, MCPElicitValue>>;
735
732
 
736
733
  /**
737
- * Determine whether a client capability record declares form-mode elicitation.
734
+ * Determines whether a client capability record declares form-mode elicitation.
738
735
  *
739
736
  * @remarks
740
737
  * The protocol's empty `elicitation` object is the implicit form-only declaration.
@@ -753,7 +750,7 @@ export declare function isElicitContent(value: unknown, schema: unknown): value
753
750
  export declare function isFormElicitationSupported(value: unknown): boolean;
754
751
 
755
752
  /**
756
- * Determine whether a parsed value is an MCP `initialize` invocation.
753
+ * Determines whether a parsed value is an MCP `initialize` invocation.
757
754
  *
758
755
  * @param value - The already-parsed value to test
759
756
  * @returns `true` when `value` is a valid `initialize` request or notification
@@ -766,26 +763,26 @@ export declare function isFormElicitationSupported(value: unknown): boolean;
766
763
  */
767
764
  export declare function isInitializeRequest(value: unknown): value is JSONRPCInvocation;
768
765
 
769
- /** Determine whether a value is an exact finite JSON object. */
766
+ /** Determines whether a value is an exact finite JSON object. */
770
767
  export declare function isJSONObject(value: unknown): value is Readonly<Record<string, JSONValue>>;
771
768
 
772
769
  /**
773
- * Determine whether a value is one JSON-RPC `error` member.
770
+ * Determines whether a value is one JSON-RPC `error` member.
774
771
  *
775
772
  * @remarks
776
773
  * The failure OBJECT, not the envelope carrying it — the shape a failed response owns
777
774
  * under `error`, and the shape a `failed` {@link MCPTaskDetail} owns under the same name,
778
- * which is why it is one guard rather than the same three checks written twice.
775
+ * which is why it is one guard rather than the same checks written twice.
779
776
  *
780
777
  * It is deliberately STRUCTURAL rather than exact-JSON: `data` is declared `unknown`, so
781
778
  * requiring the whole object to survive a JSON clone would refuse a legal error that
782
779
  * carried a non-JSON payload. Both callers here hand it an already-owned value.
783
780
  *
784
- * That choice is why the two key reads are guarded. Every sibling guard clones first, and a
781
+ * That choice is why the key reads are guarded. Every sibling guard clones first, and a
785
782
  * clone reads each key once behind a boundary that already owns totality; this one is the
786
783
  * family's only DIRECT reader, so it meets `code` and `message` exactly as the value defines
787
784
  * them — including as accessors that throw. Reading a named key off an unowned value is
788
- * itself the hostile step, and it is bounded here rather than allowed to escape. Total (§14).
785
+ * itself the hostile step, and it is bounded here rather than allowed to escape. Total.
789
786
  *
790
787
  * @param value - The already-parsed value to test
791
788
  * @returns `true` when `value` carries an integer `code` and a string `message`
@@ -799,14 +796,14 @@ export declare function isJSONObject(value: unknown): value is Readonly<Record<s
799
796
  export declare function isJSONRPCError(value: unknown): value is JSONRPCError;
800
797
 
801
798
  /**
802
- * Determine whether a parsed value is a {@link JSONRPCErrorResponse} — the failure
799
+ * Determines whether a parsed value is a {@link JSONRPCErrorResponse} — the failure
803
800
  * arm of a response.
804
801
  *
805
802
  * @remarks
806
803
  * `id` is OPTIONAL here and only here: a peer that could not read the failed
807
804
  * request's id OMITS the member rather than sending `null`, so an absent `id` is
808
805
  * valid and a `null` one is not. The envelope must own an `error` and must NOT own a
809
- * `result`. `error` carries an integer `code` and a string `message`. Total (§14).
806
+ * `result`. `error` carries an integer `code` and a string `message`. Total.
810
807
  *
811
808
  * @param value - The already-parsed value to test
812
809
  * @returns `true` when `value` is a valid JSON-RPC error response
@@ -820,7 +817,7 @@ export declare function isJSONRPCError(value: unknown): value is JSONRPCError;
820
817
  export declare function isJSONRPCErrorResponse(value: unknown): value is JSONRPCErrorResponse;
821
818
 
822
819
  /**
823
- * Determine whether a value is a valid JSON-RPC correlation id — a string or a
820
+ * Determines whether a value is a valid JSON-RPC correlation id — a string or a
824
821
  * finite integer.
825
822
  *
826
823
  * @remarks
@@ -828,7 +825,7 @@ export declare function isJSONRPCErrorResponse(value: unknown): value is JSONRPC
828
825
  * absence is what makes a call a notification) and `null` is not one either (MCP
829
826
  * omits an unreadable id rather than nulling it). A runtime numeric id must be a
830
827
  * finite integer; an empty string is a legal id, because the dated schema imposes
831
- * no minimum length. Total (§14): any other input returns `false`.
828
+ * no minimum length. Total: any other input returns `false`.
832
829
  *
833
830
  * @param value - The already-parsed value to test
834
831
  * @returns `true` when `value` is a string or a finite integer
@@ -845,12 +842,12 @@ export declare function isJSONRPCErrorResponse(value: unknown): value is JSONRPC
845
842
  export declare function isJSONRPCId(value: unknown): value is JSONRPCId;
846
843
 
847
844
  /**
848
- * Determine whether a parsed value is a {@link JSONRPCInvocation} — a request or a
845
+ * Determines whether a parsed value is a {@link JSONRPCInvocation} — a request or a
849
846
  * notification.
850
847
  *
851
848
  * @remarks
852
849
  * The union of {@link isJSONRPCRequest} and {@link isJSONRPCNotification}, which are
853
- * mutually exclusive, so a positive answer names exactly one arm. Total (§14).
850
+ * mutually exclusive, so a positive answer names exactly one arm. Total.
854
851
  *
855
852
  * @param value - The already-parsed value to test
856
853
  * @returns `true` when `value` is a valid JSON-RPC request or notification
@@ -858,11 +855,11 @@ export declare function isJSONRPCId(value: unknown): value is JSONRPCId;
858
855
  export declare function isJSONRPCInvocation(value: unknown): value is JSONRPCInvocation;
859
856
 
860
857
  /**
861
- * Determine whether a parsed value is a {@link JSONRPCMessage} — an invocation or a
858
+ * Determines whether a parsed value is a {@link JSONRPCMessage} — an invocation or a
862
859
  * response.
863
860
  *
864
861
  * @remarks
865
- * The union of {@link isJSONRPCInvocation} and {@link isJSONRPCResponse}. Total (§14).
862
+ * The union of {@link isJSONRPCInvocation} and {@link isJSONRPCResponse}. Total.
866
863
  *
867
864
  * @param value - The already-parsed value to test
868
865
  * @returns `true` when `value` is a valid JSON-RPC message
@@ -870,12 +867,12 @@ export declare function isJSONRPCInvocation(value: unknown): value is JSONRPCInv
870
867
  export declare function isJSONRPCMessage(value: unknown): value is JSONRPCMessage;
871
868
 
872
869
  /**
873
- * Determine whether a parsed value is a {@link JSONRPCNotification}.
870
+ * Determines whether a parsed value is a {@link JSONRPCNotification}.
874
871
  *
875
872
  * @remarks
876
873
  * A notification is a request-shaped call carrying NO `id` member — the protocol
877
874
  * forbids one, because nothing answers a notification. `params`, when present, must
878
- * be a record. Total (§14): any other input returns `false`.
875
+ * be a record. Total: any other input returns `false`.
879
876
  *
880
877
  * @param value - The already-parsed value to test
881
878
  * @returns `true` when `value` is a valid JSON-RPC notification
@@ -889,15 +886,15 @@ export declare function isJSONRPCMessage(value: unknown): value is JSONRPCMessag
889
886
  export declare function isJSONRPCNotification(value: unknown): value is JSONRPCNotification;
890
887
 
891
888
  /**
892
- * Determine whether a parsed value is a {@link JSONRPCRequest}.
889
+ * Determines whether a parsed value is a {@link JSONRPCRequest}.
893
890
  *
894
891
  * @remarks
895
892
  * A request is a record with `jsonrpc === '2.0'`, a string `method`, and an `id`
896
893
  * that {@link isJSONRPCId} accepts. An id-less call is NOT a request — it is a
897
894
  * {@link JSONRPCNotification}, which {@link isJSONRPCNotification} answers for. The
898
- * two guards are mutually exclusive on every input: this one requires a valid `id`
895
+ * guards are mutually exclusive on every input: this one requires a valid `id`
899
896
  * value, that one requires no own `id` member at all. `params`, when present, must
900
- * be a record. Total (§14): any other input returns `false`.
897
+ * be a record. Total: any other input returns `false`.
901
898
  *
902
899
  * @param value - The already-parsed value to test
903
900
  * @returns `true` when `value` is a valid JSON-RPC request
@@ -912,10 +909,10 @@ export declare function isJSONRPCNotification(value: unknown): value is JSONRPCN
912
909
  export declare function isJSONRPCRequest(value: unknown): value is JSONRPCRequest;
913
910
 
914
911
  /**
915
- * Determine whether a parsed value is a {@link JSONRPCResponse}.
912
+ * Determines whether a parsed value is a {@link JSONRPCResponse}.
916
913
  *
917
914
  * @remarks
918
- * The union of the two mutually exclusive arms. Total (§14).
915
+ * The union of the mutually exclusive arms. Total.
919
916
  *
920
917
  * @param value - The already-parsed value to test
921
918
  * @returns `true` when `value` is a valid JSON-RPC response
@@ -923,7 +920,7 @@ export declare function isJSONRPCRequest(value: unknown): value is JSONRPCReques
923
920
  export declare function isJSONRPCResponse(value: unknown): value is JSONRPCResponse;
924
921
 
925
922
  /**
926
- * Determine whether a parsed value is a {@link JSONRPCResultResponse} — the success
923
+ * Determines whether a parsed value is a {@link JSONRPCResultResponse} — the success
927
924
  * arm of a response.
928
925
  *
929
926
  * @remarks
@@ -932,7 +929,7 @@ export declare function isJSONRPCResponse(value: unknown): value is JSONRPCRespo
932
929
  * which is what makes this guard and {@link isJSONRPCErrorResponse} mutually
933
930
  * exclusive on every input. `result` itself must be an object: either a modern
934
931
  * {@link isMCPResult} or a legacy {@link isMCPLegacyResult}, never a bare primitive.
935
- * Total (§14).
932
+ * Total.
936
933
  *
937
934
  * @param value - The already-parsed value to test
938
935
  * @returns `true` when `value` is a valid JSON-RPC result response
@@ -946,7 +943,7 @@ export declare function isJSONRPCResponse(value: unknown): value is JSONRPCRespo
946
943
  export declare function isJSONRPCResultResponse(value: unknown): value is JSONRPCResultResponse;
947
944
 
948
945
  /**
949
- * Determine whether a value carries valid dated-schema MCP content annotations.
946
+ * Determines whether a value carries valid dated-schema MCP content annotations.
950
947
  *
951
948
  * @param value - The unknown value to inspect
952
949
  * @returns Whether the value is valid MCP annotations
@@ -954,7 +951,7 @@ export declare function isJSONRPCResultResponse(value: unknown): value is JSONRP
954
951
  export declare function isMCPAnnotations(value: unknown): value is MCPAnnotations;
955
952
 
956
953
  /**
957
- * Determine whether a value is embedded blob MCP resource contents.
954
+ * Determines whether a value is embedded blob MCP resource contents.
958
955
  *
959
956
  * @param value - The unknown value to inspect
960
957
  * @returns Whether the value is embedded blob resource contents
@@ -962,18 +959,18 @@ export declare function isMCPAnnotations(value: unknown): value is MCPAnnotation
962
959
  export declare function isMCPBlobResource(value: unknown): value is MCPBlobResource;
963
960
 
964
961
  /**
965
- * Determine whether a value is a complete modern MCP tool result.
962
+ * Determines whether a value is a complete modern MCP tool result.
966
963
  *
967
964
  * @param value - The unknown value to inspect
968
965
  * @returns Whether the value is a complete MCP call result
969
966
  */
970
967
  export declare function isMCPCallResult(value: unknown): value is MCPCallResult;
971
968
 
972
- /** Determine whether a value is one exact open dated client-capability declaration. */
969
+ /** Determines whether a value is one exact open dated client-capability declaration. */
973
970
  export declare function isMCPClientCapabilities(value: unknown): value is MCPClientCapabilities;
974
971
 
975
972
  /**
976
- * Determine whether a value is one host-produced completion candidate set.
973
+ * Determines whether a value is one host-produced completion candidate set.
977
974
  *
978
975
  * @param value - The unknown value to inspect
979
976
  * @returns Whether its candidates and optional result facts are valid
@@ -981,7 +978,7 @@ export declare function isMCPClientCapabilities(value: unknown): value is MCPCli
981
978
  export declare function isMCPCompletion(value: unknown): value is MCPCompletion;
982
979
 
983
980
  /**
984
- * Determine whether a value is one `completion/complete` parameter object.
981
+ * Determines whether a value is one `completion/complete` parameter object.
985
982
  *
986
983
  * @param value - The unknown value to inspect
987
984
  * @returns Whether its reference, fragment, and optional string context are valid
@@ -989,7 +986,7 @@ export declare function isMCPCompletion(value: unknown): value is MCPCompletion;
989
986
  export declare function isMCPCompletionParams(value: unknown): value is MCPCompletionParams;
990
987
 
991
988
  /**
992
- * Determine whether a value is a prompt or resource-template completion reference.
989
+ * Determines whether a value is a prompt or resource-template completion reference.
993
990
  *
994
991
  * @param value - The unknown value to inspect
995
992
  * @returns Whether the discriminated reference is valid
@@ -997,7 +994,7 @@ export declare function isMCPCompletionParams(value: unknown): value is MCPCompl
997
994
  export declare function isMCPCompletionReference(value: unknown): value is MCPCompletionReference;
998
995
 
999
996
  /**
1000
- * Determine whether a value is one complete, capped `completion/complete` result.
997
+ * Determines whether a value is one complete, capped `completion/complete` result.
1001
998
  *
1002
999
  * @param value - The unknown value to inspect
1003
1000
  * @returns Whether the result is complete and carries at most 100 candidates
@@ -1005,7 +1002,7 @@ export declare function isMCPCompletionReference(value: unknown): value is MCPCo
1005
1002
  export declare function isMCPCompletionResult(value: unknown): value is MCPCompletionResult;
1006
1003
 
1007
1004
  /**
1008
- * Determine whether a value is one exact dated-schema MCP tool content block.
1005
+ * Determines whether a value is one exact dated-schema MCP tool content block.
1009
1006
  *
1010
1007
  * @param value - The unknown value to inspect
1011
1008
  * @returns Whether the value is valid MCP content
@@ -1013,7 +1010,7 @@ export declare function isMCPCompletionResult(value: unknown): value is MCPCompl
1013
1010
  export declare function isMCPContent(value: unknown): value is MCPContent;
1014
1011
 
1015
1012
  /**
1016
- * Determine whether a value is one restricted primitive form-elicitation schema.
1013
+ * Determines whether a value is one restricted primitive form-elicitation schema.
1017
1014
  *
1018
1015
  * @param value - The unknown value to inspect
1019
1016
  * @returns `true` for a supported boolean, numeric, string, or string-array schema
@@ -1027,7 +1024,7 @@ export declare function isMCPContent(value: unknown): value is MCPContent;
1027
1024
  export declare function isMCPElicitFieldSchema(value: unknown): value is MCPElicitFieldSchema;
1028
1025
 
1029
1026
  /**
1030
- * Determine whether a value is a form-mode elicitation parameter object.
1027
+ * Determines whether a value is a form-mode elicitation parameter object.
1031
1028
  *
1032
1029
  * @param value - The unknown value to inspect
1033
1030
  * @returns `true` when `value` has the restricted form elicitation shape
@@ -1043,7 +1040,7 @@ export declare function isMCPElicitFieldSchema(value: unknown): value is MCPElic
1043
1040
  export declare function isMCPElicitForm(value: unknown): value is MCPElicitForm;
1044
1041
 
1045
1042
  /**
1046
- * Determine whether a value is an embedded `elicitation/create` request.
1043
+ * Determines whether a value is an embedded `elicitation/create` request.
1047
1044
  *
1048
1045
  * @param value - The unknown value to inspect
1049
1046
  * @returns `true` when `value` is a form- or URL-mode elicitation request
@@ -1059,7 +1056,7 @@ export declare function isMCPElicitForm(value: unknown): value is MCPElicitForm;
1059
1056
  export declare function isMCPElicitRequest(value: unknown): value is MCPElicitRequest;
1060
1057
 
1061
1058
  /**
1062
- * Determine whether a value is one elicitation response.
1059
+ * Determines whether a value is one elicitation response.
1063
1060
  *
1064
1061
  * @param value - The unknown value to inspect
1065
1062
  * @returns `true` when action/content have the protocol shape
@@ -1072,7 +1069,7 @@ export declare function isMCPElicitRequest(value: unknown): value is MCPElicitRe
1072
1069
  export declare function isMCPElicitResult(value: unknown): value is MCPElicitResult;
1073
1070
 
1074
1071
  /**
1075
- * Determine whether a value is the restricted top-level object schema a form elicitation issues.
1072
+ * Determines whether a value is the restricted top-level object schema a form elicitation issues.
1076
1073
  *
1077
1074
  * @remarks
1078
1075
  * The schema half of {@link isMCPElicitForm}, exported on its own because the issued schema
@@ -1093,7 +1090,7 @@ export declare function isMCPElicitResult(value: unknown): value is MCPElicitRes
1093
1090
  export declare function isMCPElicitSchema(value: unknown): value is MCPElicitSchema;
1094
1091
 
1095
1092
  /**
1096
- * Determine whether a value is a URL-mode elicitation parameter object.
1093
+ * Determines whether a value is a URL-mode elicitation parameter object.
1097
1094
  *
1098
1095
  * @param value - The unknown value to inspect
1099
1096
  * @returns `true` when `value` has the URL elicitation shape
@@ -1106,7 +1103,7 @@ export declare function isMCPElicitSchema(value: unknown): value is MCPElicitSch
1106
1103
  export declare function isMCPElicitURL(value: unknown): value is MCPElicitURL;
1107
1104
 
1108
1105
  /**
1109
- * Determine whether an unknown value is an {@link MCPError}.
1106
+ * Determines whether an unknown value is an {@link MCPError}.
1110
1107
  *
1111
1108
  * @param value - The unknown value to inspect
1112
1109
  * @returns `true` only when the value is an `MCPError`
@@ -1120,18 +1117,18 @@ export declare function isMCPElicitURL(value: unknown): value is MCPElicitURL;
1120
1117
  export declare function isMCPError(value: unknown): value is MCPError;
1121
1118
 
1122
1119
  /**
1123
- * Determine whether a value is one exact dated-schema MCP icon.
1120
+ * Determines whether a value is one exact dated-schema MCP icon.
1124
1121
  *
1125
1122
  * @param value - The unknown value to inspect
1126
1123
  * @returns Whether the value is a valid MCP icon
1127
1124
  */
1128
1125
  export declare function isMCPIcon(value: unknown): value is MCPIcon;
1129
1126
 
1130
- /** Determine whether a value is one complete dated MCP implementation identity. */
1127
+ /** Determines whether a value is one complete dated MCP implementation identity. */
1131
1128
  export declare function isMCPIdentity(value: unknown): value is MCPIdentity;
1132
1129
 
1133
1130
  /**
1134
- * Determine whether a value is one legal embedded multi-round-trip request.
1131
+ * Determines whether a value is one legal embedded multi-round-trip request.
1135
1132
  *
1136
1133
  * @param value - The unknown value to inspect
1137
1134
  * @returns `true` for elicitation, deprecated sampling, or deprecated roots requests
@@ -1144,7 +1141,7 @@ export declare function isMCPIdentity(value: unknown): value is MCPIdentity;
1144
1141
  export declare function isMCPInputRequest(value: unknown): value is MCPInputRequest;
1145
1142
 
1146
1143
  /**
1147
- * Determine whether a value is a server-keyed map of embedded input requests.
1144
+ * Determines whether a value is a server-keyed map of embedded input requests.
1148
1145
  *
1149
1146
  * @param value - The unknown value to inspect
1150
1147
  * @returns `true` when every own value is a legal {@link MCPInputRequest}
@@ -1157,7 +1154,7 @@ export declare function isMCPInputRequest(value: unknown): value is MCPInputRequ
1157
1154
  export declare function isMCPInputRequestMap(value: unknown): value is MCPInputRequestMap;
1158
1155
 
1159
1156
  /**
1160
- * Determine whether a value is an MCP input-required result.
1157
+ * Determines whether a value is an MCP input-required result.
1161
1158
  *
1162
1159
  * @remarks
1163
1160
  * Enforces the at-least-one-of rule at runtime: `inputRequests`, `requestState`, or
@@ -1175,7 +1172,7 @@ export declare function isMCPInputRequestMap(value: unknown): value is MCPInputR
1175
1172
  export declare function isMCPInputResult(value: unknown): value is MCPInputResult;
1176
1173
 
1177
1174
  /**
1178
- * Determine whether a value is one legacy-era MCP result.
1175
+ * Determines whether a value is one legacy-era MCP result.
1179
1176
  *
1180
1177
  * @remarks
1181
1178
  * The legacy revision has no result discriminator, so the absence of `resultType` is
@@ -1193,17 +1190,17 @@ export declare function isMCPInputResult(value: unknown): value is MCPInputResul
1193
1190
  */
1194
1191
  export declare function isMCPLegacyResult(value: unknown): value is MCPLegacyResult;
1195
1192
 
1196
- /** Determine whether a value is one dated MCP logging level. */
1193
+ /** Determines whether a value is one dated MCP logging level. */
1197
1194
  export declare function isMCPLoggingLevel(value: unknown): value is MCPLoggingLevel;
1198
1195
 
1199
- /** Determine whether a string follows the dated MCP `_meta` key grammar. */
1196
+ /** Determines whether a string follows the dated MCP `_meta` key grammar. */
1200
1197
  export declare function isMCPMetaKey(value: unknown): value is string;
1201
1198
 
1202
- /** Determine whether a value is exact finite MCP metadata with valid keys. */
1199
+ /** Determines whether a value is exact finite MCP metadata with valid keys. */
1203
1200
  export declare function isMCPMetaObject(value: unknown): value is MCPMetaObject;
1204
1201
 
1205
1202
  /**
1206
- * Determine whether a value carries the shared optional pagination cursor.
1203
+ * Determines whether a value carries the shared optional pagination cursor.
1207
1204
  *
1208
1205
  * @param value - The unknown value to inspect
1209
1206
  * @returns Whether a present `cursor` is a string
@@ -1211,7 +1208,7 @@ export declare function isMCPMetaObject(value: unknown): value is MCPMetaObject;
1211
1208
  export declare function isMCPPaginationParams(value: unknown): value is MCPPaginationParams;
1212
1209
 
1213
1210
  /**
1214
- * Determine whether a value is one exact finite MCP progress payload.
1211
+ * Determines whether a value is one exact finite MCP progress payload.
1215
1212
  *
1216
1213
  * @param value - The unknown value to inspect
1217
1214
  * @returns Whether required progress and optional total/message fields match the dated schema
@@ -1219,7 +1216,7 @@ export declare function isMCPPaginationParams(value: unknown): value is MCPPagin
1219
1216
  export declare function isMCPProgress(value: unknown): value is MCPProgress;
1220
1217
 
1221
1218
  /**
1222
- * Determine whether a value is one `prompts/list` descriptor.
1219
+ * Determines whether a value is one `prompts/list` descriptor.
1223
1220
  *
1224
1221
  * @param value - The unknown value to inspect
1225
1222
  * @returns Whether the prompt descriptor is valid
@@ -1227,7 +1224,7 @@ export declare function isMCPProgress(value: unknown): value is MCPProgress;
1227
1224
  export declare function isMCPPrompt(value: unknown): value is MCPPrompt;
1228
1225
 
1229
1226
  /**
1230
- * Determine whether a value is one prompt argument descriptor.
1227
+ * Determines whether a value is one prompt argument descriptor.
1231
1228
  *
1232
1229
  * @param value - The unknown value to inspect
1233
1230
  * @returns Whether the prompt argument descriptor is valid
@@ -1235,7 +1232,7 @@ export declare function isMCPPrompt(value: unknown): value is MCPPrompt;
1235
1232
  export declare function isMCPPromptArgument(value: unknown): value is MCPPromptArgument;
1236
1233
 
1237
1234
  /**
1238
- * Determine whether a value is one complete `prompts/get` result.
1235
+ * Determines whether a value is one complete `prompts/get` result.
1239
1236
  *
1240
1237
  * @param value - The unknown value to inspect
1241
1238
  * @returns Whether the prompt result and all messages are valid
@@ -1243,7 +1240,7 @@ export declare function isMCPPromptArgument(value: unknown): value is MCPPromptA
1243
1240
  export declare function isMCPPromptGetResult(value: unknown): value is MCPPromptGetResult;
1244
1241
 
1245
1242
  /**
1246
- * Determine whether a value is one prompt message with existing rich content.
1243
+ * Determines whether a value is one prompt message with existing rich content.
1247
1244
  *
1248
1245
  * @param value - The unknown value to inspect
1249
1246
  * @returns Whether the role and content are valid
@@ -1251,7 +1248,7 @@ export declare function isMCPPromptGetResult(value: unknown): value is MCPPrompt
1251
1248
  export declare function isMCPPromptMessage(value: unknown): value is MCPPromptMessage;
1252
1249
 
1253
1250
  /**
1254
- * Determine whether a value is one consumer-owned prompt page.
1251
+ * Determines whether a value is one consumer-owned prompt page.
1255
1252
  *
1256
1253
  * @param value - The unknown value to inspect
1257
1254
  * @returns Whether the prompts and optional following cursor are valid
@@ -1259,7 +1256,7 @@ export declare function isMCPPromptMessage(value: unknown): value is MCPPromptMe
1259
1256
  export declare function isMCPPromptPage(value: unknown): value is MCPPromptPage;
1260
1257
 
1261
1258
  /**
1262
- * Determine whether a value is one `resources/list` descriptor.
1259
+ * Determines whether a value is one `resources/list` descriptor.
1263
1260
  *
1264
1261
  * @param value - The unknown value to inspect
1265
1262
  * @returns Whether the value is a valid resource descriptor
@@ -1267,7 +1264,7 @@ export declare function isMCPPromptPage(value: unknown): value is MCPPromptPage;
1267
1264
  export declare function isMCPResource(value: unknown): value is MCPResource;
1268
1265
 
1269
1266
  /**
1270
- * Determine whether a value is structurally discriminated resource contents.
1267
+ * Determines whether a value is structurally discriminated resource contents.
1271
1268
  *
1272
1269
  * @param value - The unknown value to inspect
1273
1270
  * @returns Whether exactly one of `text` and `blob` is present and valid
@@ -1275,7 +1272,7 @@ export declare function isMCPResource(value: unknown): value is MCPResource;
1275
1272
  export declare function isMCPResourceContents(value: unknown): value is MCPResourceContents;
1276
1273
 
1277
1274
  /**
1278
- * Determine whether a value is one consumer-owned resource page.
1275
+ * Determines whether a value is one consumer-owned resource page.
1279
1276
  *
1280
1277
  * @param value - The unknown value to inspect
1281
1278
  * @returns Whether the resources and optional following cursor are valid
@@ -1283,7 +1280,7 @@ export declare function isMCPResourceContents(value: unknown): value is MCPResou
1283
1280
  export declare function isMCPResourcePage(value: unknown): value is MCPResourcePage;
1284
1281
 
1285
1282
  /**
1286
- * Determine whether a value is one resource-template descriptor.
1283
+ * Determines whether a value is one resource-template descriptor.
1287
1284
  *
1288
1285
  * @remarks
1289
1286
  * This guard validates the descriptor shape. Template expansion and the RFC 6570 feature
@@ -1295,7 +1292,7 @@ export declare function isMCPResourcePage(value: unknown): value is MCPResourceP
1295
1292
  export declare function isMCPResourceTemplate(value: unknown): value is MCPResourceTemplate;
1296
1293
 
1297
1294
  /**
1298
- * Determine whether a value is one consumer-owned resource-template page.
1295
+ * Determines whether a value is one consumer-owned resource-template page.
1299
1296
  *
1300
1297
  * @param value - The unknown value to inspect
1301
1298
  * @returns Whether the templates and optional following cursor are valid
@@ -1303,7 +1300,7 @@ export declare function isMCPResourceTemplate(value: unknown): value is MCPResou
1303
1300
  export declare function isMCPResourceTemplatePage(value: unknown): value is MCPResourceTemplatePage;
1304
1301
 
1305
1302
  /**
1306
- * Determine whether a value is one modern MCP result.
1303
+ * Determines whether a value is one modern MCP result.
1307
1304
  *
1308
1305
  * @remarks
1309
1306
  * The open contract's guard: a record carrying a string `resultType` and, when
@@ -1326,14 +1323,14 @@ export declare function isMCPResourceTemplatePage(value: unknown): value is MCPR
1326
1323
  */
1327
1324
  export declare function isMCPResult(value: unknown): value is MCPResult;
1328
1325
 
1329
- /** Determine whether a value is exact result metadata with a valid reserved server identity. */
1326
+ /** Determines whether a value is exact result metadata with a valid reserved server identity. */
1330
1327
  export declare function isMCPResultMetaObject(value: unknown): value is MCPResultMetaObject;
1331
1328
 
1332
- /** Determine whether a value is one exact open dated server-capability declaration. */
1329
+ /** Determines whether a value is one exact open dated server-capability declaration. */
1333
1330
  export declare function isMCPServerCapabilities(value: unknown): value is MCPServerCapabilities;
1334
1331
 
1335
1332
  /**
1336
- * Determine whether a value is a string-valued MCP argument record.
1333
+ * Determines whether a value is a string-valued MCP argument record.
1337
1334
  *
1338
1335
  * @param value - The unknown value to inspect
1339
1336
  * @returns Whether every own argument value is a string
@@ -1341,7 +1338,7 @@ export declare function isMCPServerCapabilities(value: unknown): value is MCPSer
1341
1338
  export declare function isMCPStringArguments(value: unknown): value is Readonly<Record<string, string>>;
1342
1339
 
1343
1340
  /**
1344
- * Determine whether a value is an MCP {@link MCPSubscriptionFilter}.
1341
+ * Determines whether a value is an MCP {@link MCPSubscriptionFilter}.
1345
1342
  *
1346
1343
  * @remarks
1347
1344
  * Every filter field is optional. Boolean notification families accept only booleans, and
@@ -1355,7 +1352,7 @@ export declare function isMCPStringArguments(value: unknown): value is Readonly<
1355
1352
  export declare function isMCPSubscriptionFilter(value: unknown): value is MCPSubscriptionFilter;
1356
1353
 
1357
1354
  /**
1358
- * Determine whether a value is one durable task's full snapshot.
1355
+ * Determines whether a value is one durable task's full snapshot.
1359
1356
  *
1360
1357
  * @remarks
1361
1358
  * The runtime enforcement of {@link MCPTaskManagerInterface.task}'s declared return shape,
@@ -1382,7 +1379,7 @@ export declare function isMCPSubscriptionFilter(value: unknown): value is MCPSub
1382
1379
  export declare function isMCPTaskDetail(value: unknown): value is MCPTaskDetail;
1383
1380
 
1384
1381
  /**
1385
- * Determine whether a value is a modern MCP task-creation result.
1382
+ * Determines whether a value is a modern MCP task-creation result.
1386
1383
  *
1387
1384
  * @remarks
1388
1385
  * The runtime enforcement of {@link MCPTaskManagerInterface.start}'s declared return
@@ -1403,7 +1400,7 @@ export declare function isMCPTaskDetail(value: unknown): value is MCPTaskDetail;
1403
1400
  export declare function isMCPTaskResult(value: unknown): value is MCPTaskResult;
1404
1401
 
1405
1402
  /**
1406
- * Determine whether a value is one of the extension's five task lifecycle states.
1403
+ * Determines whether a value is one of the extension's task lifecycle states.
1407
1404
  *
1408
1405
  * @param value - The unknown value to inspect
1409
1406
  * @returns Whether the value is an {@link MCPTaskStatus}
@@ -1417,7 +1414,7 @@ export declare function isMCPTaskResult(value: unknown): value is MCPTaskResult;
1417
1414
  export declare function isMCPTaskStatus(value: unknown): value is MCPTaskStatus;
1418
1415
 
1419
1416
  /**
1420
- * Determine whether a value is embedded textual MCP resource contents.
1417
+ * Determines whether a value is embedded textual MCP resource contents.
1421
1418
  *
1422
1419
  * @param value - The unknown value to inspect
1423
1420
  * @returns Whether the value is embedded textual resource contents
@@ -1425,7 +1422,7 @@ export declare function isMCPTaskStatus(value: unknown): value is MCPTaskStatus;
1425
1422
  export declare function isMCPTextResource(value: unknown): value is MCPTextResource;
1426
1423
 
1427
1424
  /**
1428
- * Determine whether a value is a supported {@link MCPVersion}.
1425
+ * Determines whether a value is a supported {@link MCPVersion}.
1429
1426
  *
1430
1427
  * @param value - The unknown value to inspect
1431
1428
  * @returns `true` when the value is one of {@link SUPPORTED_PROTOCOL_VERSIONS}
@@ -1433,7 +1430,7 @@ export declare function isMCPTextResource(value: unknown): value is MCPTextResou
1433
1430
  export declare function isMCPVersion(value: unknown): value is MCPVersion;
1434
1431
 
1435
1432
  /**
1436
- * Determine whether a JSON-RPC invocation uses the modern per-request MCP wire shape.
1433
+ * Determines whether a JSON-RPC invocation uses the modern per-request MCP wire shape.
1437
1434
  *
1438
1435
  * @remarks
1439
1436
  * Presence routes and validity answers: this guard checks only that
@@ -1448,7 +1445,7 @@ export declare function isMCPVersion(value: unknown): value is MCPVersion;
1448
1445
  export declare function isModernRequest(value: unknown): value is JSONRPCInvocation;
1449
1446
 
1450
1447
  /**
1451
- * Determine whether a value is one RFC 3339 `full-date` naming a real calendar day.
1448
+ * Determines whether a value is one RFC 3339 `full-date` naming a real calendar day.
1452
1449
  *
1453
1450
  * @remarks
1454
1451
  * RFC 3339 §5.6 defines `date-mday` as `01-28`, `29`, `30`, or `31` BASED ON the month and
@@ -1474,7 +1471,7 @@ export declare function isModernRequest(value: unknown): value is JSONRPCInvocat
1474
1471
  export declare function isRFC3339Date(value: unknown): value is string;
1475
1472
 
1476
1473
  /**
1477
- * Determine whether a value is one RFC 3339 `date-time` naming a real calendar day.
1474
+ * Determines whether a value is one RFC 3339 `date-time` naming a real calendar day.
1478
1475
  *
1479
1476
  * @remarks
1480
1477
  * The `full-date` half is {@link isRFC3339Date}, so an impossible day is refused here for
@@ -1498,7 +1495,7 @@ export declare function isRFC3339Date(value: unknown): value is string;
1498
1495
  export declare function isRFC3339DateTime(value: unknown): value is string;
1499
1496
 
1500
1497
  /**
1501
- * Determine whether a value is standard padded base64 as required by JSON Schema `byte` format.
1498
+ * Determines whether a value is standard padded base64 as required by JSON Schema `byte` format.
1502
1499
  *
1503
1500
  * @param value - The unknown value to inspect
1504
1501
  * @returns Whether the value is an empty or completely padded standard base64 encoding
@@ -1506,7 +1503,7 @@ export declare function isRFC3339DateTime(value: unknown): value is string;
1506
1503
  export declare function isStandardBase64(value: unknown): value is string;
1507
1504
 
1508
1505
  /**
1509
- * Determine whether a client capability record declares the draft Tasks extension.
1506
+ * Determines whether a client capability record declares the draft Tasks extension.
1510
1507
  *
1511
1508
  * @remarks
1512
1509
  * The declaration lives at `extensions['io.modelcontextprotocol/tasks']` and its value is
@@ -1603,7 +1600,7 @@ export declare type JSONRPCId = string | number;
1603
1600
  * One inbound JSON-RPC call — the common dispatch input.
1604
1601
  *
1605
1602
  * @remarks
1606
- * Narrow the two apart on the id: `invocation.id === undefined` is the notification
1603
+ * Narrow the arms apart on the id: `invocation.id === undefined` is the notification
1607
1604
  * arm, and anything else is a {@link JSONRPCRequest}.
1608
1605
  */
1609
1606
  export declare type JSONRPCInvocation = JSONRPCRequest | JSONRPCNotification;
@@ -1620,7 +1617,7 @@ export declare type JSONRPCMessage = JSONRPCInvocation | JSONRPCResponse;
1620
1617
 
1621
1618
  /**
1622
1619
  * A JSON-RPC 2.0 notification — a fire-and-forget `method` call that is answered by
1623
- * nothing (e.g. `notifications/initialized`).
1620
+ * nothing (for example, `notifications/initialized`).
1624
1621
  *
1625
1622
  * @remarks
1626
1623
  * A notification MUST NOT carry an `id`, so `id` is declared `never`: a
@@ -1658,7 +1655,7 @@ export declare interface JSONRPCRequest {
1658
1655
  * A JSON-RPC 2.0 response — the answer to one {@link JSONRPCRequest}.
1659
1656
  *
1660
1657
  * @remarks
1661
- * The two arms are mutually exclusive in the type and in their guards. Narrow them
1658
+ * The arms are mutually exclusive in the type and in their guards. Narrow them
1662
1659
  * apart with `response.error === undefined`.
1663
1660
  */
1664
1661
  export declare type JSONRPCResponse = JSONRPCResultResponse | JSONRPCErrorResponse;
@@ -1681,15 +1678,15 @@ export declare interface JSONRPCResultResponse {
1681
1678
  }
1682
1679
 
1683
1680
  /**
1684
- * Determine whether one method may answer with a given modern `resultType`.
1681
+ * Determines whether one method may answer with a given modern `resultType`.
1685
1682
  *
1686
1683
  * @remarks
1687
- * The dated protocol lets a `tools/call` answer three ways — it COMPLETED, it became a
1684
+ * The dated protocol lets a `tools/call` answer in more than one way — it COMPLETED, it became a
1688
1685
  * durable task, or it needs another round trip — while every other method this client
1689
1686
  * issues has exactly one legal answer. So the arm a peer chose is only meaningful beside
1690
1687
  * the method it answers, and this is the one place that pairing is decided.
1691
1688
  *
1692
- * The rule is deliberately a WHITELIST: an unrecognized `resultType` is refused for every
1689
+ * The rule is deliberately closed: an unrecognized `resultType` is refused for every
1693
1690
  * method, including `tools/call`. A client that carried an arm it cannot name would hand
1694
1691
  * its caller a value whose meaning it invented.
1695
1692
  *
@@ -1707,7 +1704,7 @@ export declare interface JSONRPCResultResponse {
1707
1704
  export declare function matchesResultType(method: string, resultType: unknown): boolean;
1708
1705
 
1709
1706
  /**
1710
- * Determine whether a produced notification belongs to an honoured subscription filter.
1707
+ * Determines whether a produced notification belongs to an honoured subscription filter.
1711
1708
  *
1712
1709
  * @param notification - The server notification offered by the configured producer
1713
1710
  * @param filter - The filter acknowledged to the client
@@ -1752,11 +1749,11 @@ export declare const MCP_META_VERSION = "io.modelcontextprotocol/protocolVersion
1752
1749
  *
1753
1750
  * @remarks
1754
1751
  * The GENERIC code for the whole condition, not one capability's code. This server answers
1755
- * it in two places — a `tools/call` that needs `elicitation`, and a `tasks/*` request whose
1756
- * client never declared `io.modelcontextprotocol/tasks` — and the two are told apart by
1752
+ * it in more than one place — a `tools/call` that needs `elicitation`, and a `tasks/*` request
1753
+ * whose client never declared `io.modelcontextprotocol/tasks` — and they are told apart by
1757
1754
  * `error.data.requiredCapabilities` alone (`{ elicitation: {} }` against
1758
- * `{ extensions: { 'io.modelcontextprotocol/tasks': {} } }`). They are two instances of one
1759
- * condition, so a second numeral would describe the same fact twice. The Tasks extension's
1755
+ * `{ extensions: { 'io.modelcontextprotocol/tasks': {} } }`). They are instances of the same
1756
+ * condition, so a separate numeral would describe the same fact twice. The Tasks extension's
1760
1757
  * own draft prose still shows `-32003` in examples; the dated core schema fixes this code,
1761
1758
  * and the dated schema is what a peer implements against.
1762
1759
  */
@@ -1823,14 +1820,14 @@ export declare interface MCPBlobResource {
1823
1820
  * handler is dropped in the same step.
1824
1821
  */
1825
1822
  export declare interface MCPCallOptions {
1826
- /** Cancel this one in-flight request; an already-aborted signal refuses it unsent. */
1823
+ /** Cancels this one in-flight request; an already-aborted signal refuses it unsent. */
1827
1824
  readonly signal?: AbortSignal;
1828
- /** Receive this request's progress frames; supplying it stamps the progress token. */
1825
+ /** Receives this request's progress frames; supplying it stamps the progress token. */
1829
1826
  readonly progress?: MCPProgressHandler;
1830
1827
  }
1831
1828
 
1832
1829
  /**
1833
- * What one remote `tools/call` answered — the three arms the dated protocol permits.
1830
+ * What one remote `tools/call` answered — the arms the dated protocol permits.
1834
1831
  *
1835
1832
  * @remarks
1836
1833
  * The peer chooses the arm, so the caller narrows on `resultType`:
@@ -1844,7 +1841,7 @@ export declare interface MCPCallOptions {
1844
1841
  * is over and the work is not; the outcome arrives later through the task's own methods.
1845
1842
  * - {@link MCPInputResult} — the call needs another round trip before it can finish.
1846
1843
  *
1847
- * A fourth `resultType` is refused rather than surfaced: this union is what the client
1844
+ * An unknown `resultType` is refused rather than surfaced: this union is what the client
1848
1845
  * can carry, and an arm it cannot name is one it cannot hand a caller safely.
1849
1846
  */
1850
1847
  export declare type MCPCallOutcome = {
@@ -1896,16 +1893,16 @@ export declare type MCPCallResult = MCPUnstampedCallResult & {
1896
1893
  * exit — the deadline, an abort, a rejecting `send`, the answer itself, and the
1897
1894
  * teardown's drain — without any of those paths knowing they exist.
1898
1895
  * - **Per-request deadline.** An ordinary `#request` carries `this.#timeout`. The initial
1899
- * discovery probe uses that same 30-second default, or the shorter probe deadline where
1900
- * `timeout` was configured, so a silent peer cannot hold negotiation indefinitely.
1896
+ * discovery probe uses that same configured deadline, so a silent peer cannot hold
1897
+ * negotiation indefinitely.
1901
1898
  * `AbortSignal.timeout` (never a raw `setTimeout`) rejects only that pending request, and the
1902
1899
  * same deadline bounds the WAIT on the transport's `close`, the one wait no drain and no signal
1903
1900
  * can reach. It bounds the wait rather than the close, which keeps running, so a retry joins it
1904
1901
  * instead of shutting one connection down twice.
1905
1902
  * - **Transport-agnostic.** Imports only core siblings (JSON-RPC + the tool vocabulary);
1906
- * the concrete transport is injected. Wire fields are narrowed via the contracts
1903
+ * the concrete transport is injected. Wire fields are narrowed with the contract
1907
1904
  * guards (no `as`).
1908
- * - **Observable (§13).** The owned `emitter` fires `connect` / `disconnect` /
1905
+ * - **Observable.** The owned `emitter` fires `connect` / `disconnect` /
1909
1906
  * `notification` / `error`; the emitter isolates a listener throw and routes it to its
1910
1907
  * `error` handler (the `error` option), so a listener throw can never escape.
1911
1908
  *
@@ -1927,7 +1924,6 @@ export declare class MCPClient implements MCPClientInterface {
1927
1924
  get version(): MCPVersion | undefined;
1928
1925
  get transport(): MCPClientTransportInterface;
1929
1926
  get tasks(): MCPTaskClientInterface;
1930
- on<K extends keyof MCPClientEventMap>(event: K, handler: (...args: MCPClientEventMap[K]) => void): void;
1931
1927
  connect(): Promise<void>;
1932
1928
  discover(): Promise<MCPDiscoverResult>;
1933
1929
  disconnect(): Promise<void>;
@@ -1951,8 +1947,8 @@ export declare type MCPClientCapabilities = Readonly<Record<string, MCPMetaObjec
1951
1947
  };
1952
1948
 
1953
1949
  /**
1954
- * The push observation surface (§13) of an {@link MCPClientInterface} — the moments a
1955
- * fire-and-forget observer (logging, tracing) subscribes to via `client.emitter.on`.
1950
+ * The push observation surface of an {@link MCPClientInterface} — the moments a
1951
+ * fire-and-forget observer (logging, tracing) subscribes to through `client.emitter.on`.
1956
1952
  *
1957
1953
  * @remarks
1958
1954
  * - `connect` — era negotiation completed and the client is connected: modern after
@@ -1961,14 +1957,14 @@ export declare type MCPClientCapabilities = Readonly<Record<string, MCPMetaObjec
1961
1957
  * rejected, and the connection it owned on the transport closed — or that close faulted or
1962
1958
  * timed out, which rejects the `disconnect` caller rather than withholding this event).
1963
1959
  * - `notification` — a server-initiated JSON-RPC NOTIFICATION arrived — forwarded for the
1964
- * consumer to react to (e.g. a `notifications/tools/list_changed`). A
1960
+ * consumer to react to (for example, a `notifications/tools/list_changed`). A
1965
1961
  * `notifications/progress` frame claimed by an in-flight request's progress handler is
1966
1962
  * delivered there instead, and a RESPONSE correlating to nothing pending is discarded
1967
1963
  * rather than forwarded here, because it answers a request that has already settled.
1968
- * - `error` — a client-level fault surfaced for observation (typed `unknown`, §13). This is
1964
+ * - `error` — a client-level fault surfaced for observation (typed `unknown`). This is
1969
1965
  * a DOMAIN event, distinct from the emitter's own listener-error channel: a listener throw
1970
1966
  * is routed to the emitter's `error` handler (the `error` option), never onto this map.
1971
- * Declared as a `type` alias (§4.5) so the literal satisfies `EventMap`.
1967
+ * Declared as a `type` alias so the literal satisfies `EventMap`.
1972
1968
  */
1973
1969
  export declare type MCPClientEventMap = {
1974
1970
  /** Era negotiation completed — the client is connected. */
@@ -1977,7 +1973,7 @@ export declare type MCPClientEventMap = {
1977
1973
  readonly disconnect: readonly [];
1978
1974
  /** A server-initiated notification arrived (not a response to a pending request). */
1979
1975
  readonly notification: readonly [message: JSONRPCMessage];
1980
- /** A client-level fault surfaced for observation (typed `unknown`, §13). */
1976
+ /** A client-level fault surfaced for observation (typed `unknown`). */
1981
1977
  readonly error: readonly [error: unknown];
1982
1978
  };
1983
1979
 
@@ -2020,18 +2016,18 @@ export declare type MCPClientEventMap = {
2020
2016
  * says to ignore it rather than surface it as something a caller might act on.
2021
2017
  * - **Per-request deadline.** A request carrying a deadline races an
2022
2018
  * `AbortSignal.timeout(timeout)`: a server that never replies REJECTS that pending
2023
- * request once the deadline fires. The initial discovery probe carries one only where
2024
- * `timeout` was configured, so a default client's probe — and a public `discover` call on such a
2025
- * client waits for its peer indefinitely. The client's
2019
+ * request once the deadline fires. The initial discovery probe and every public request use a
2020
+ * deadline. An omitted `timeout` selects {@link DEFAULT_MCP_REQUEST_TIMEOUT}; an explicit
2021
+ * timeout applies that deadline to the probe. The client's
2026
2022
  * wait on the transport's `close` carries that same deadline, because it is the one wait neither
2027
2023
  * the pending-request drain nor the supersession signal can reach; the deadline ends the wait,
2028
2024
  * not the close, so a retry joins that close rather than issuing a second one.
2029
2025
  * - **Transport-agnostic.** Imports only core siblings — JSON-RPC + the tool vocabulary
2030
2026
  * + the timeout primitive — with no HTTP and no model; the concrete transport is
2031
- * injected. Wire fields are narrowed via the contracts guards (no `as`).
2032
- * - **Observable (§13).** The owned `emitter` fires `connect` / `disconnect` /
2027
+ * injected. Wire fields are narrowed with the contract guards (no `as`).
2028
+ * - **Observable.** The owned `emitter` fires `connect` / `disconnect` /
2033
2029
  * `notification` / `error`; the emitter isolates a listener throw and routes it to its
2034
- * `error` handler (the `error` option, §13), never the client.
2030
+ * `error` handler (the `error` option), never the client.
2035
2031
  */
2036
2032
  export declare interface MCPClientInterface {
2037
2033
  readonly emitter: EmitterInterface<MCPClientEventMap>;
@@ -2045,22 +2041,14 @@ export declare interface MCPClientInterface {
2045
2041
  * The draft Tasks extension's client half — reading, answering, and stopping a durable task.
2046
2042
  *
2047
2043
  * @remarks
2048
- * Always present, because the three `tasks/*` methods are ordinary requests a client may
2044
+ * Always present, because the `tasks/*` methods are ordinary requests a client may
2049
2045
  * issue at any time; whether they SUCCEED is the peer's decision, and a server that did not
2050
- * configure the extension answers all three `-32601`. Nothing here is advertised, cached, or
2046
+ * configure the extension answers each of them `-32601`. Nothing here is advertised, cached, or
2051
2047
  * polled — see {@link MCPTaskClientInterface} for why the schedule stays the consumer's.
2052
2048
  */
2053
2049
  readonly tasks: MCPTaskClientInterface;
2054
2050
  /**
2055
- * Subscribe a listener to one of the client's {@link MCPClientEventMap} events —
2056
- * the convenience forward to `emitter.on` (§13).
2057
- *
2058
- * @param event - The event name to subscribe to
2059
- * @param handler - The listener for that event's argument tuple
2060
- */
2061
- on<K extends keyof MCPClientEventMap>(event: K, handler: (...args: MCPClientEventMap[K]) => void): void;
2062
- /**
2063
- * Connect to the remote server — open a connection on the transport and negotiate the
2051
+ * Connects to the remote server opens a connection on the transport and negotiates the
2064
2052
  * modern or legacy wire era without exposing that choice to the caller.
2065
2053
  *
2066
2054
  * @remarks
@@ -2090,21 +2078,19 @@ export declare interface MCPClientInterface {
2090
2078
  */
2091
2079
  connect(): Promise<void>;
2092
2080
  /**
2093
- * Discover a modern server's supported revisions and capabilities.
2081
+ * Discovers a modern server's supported revisions and capabilities.
2094
2082
  *
2095
2083
  * @remarks
2096
2084
  * The request carries the modern per-request metadata stamp. Unknown revisions in
2097
2085
  * the peer's advertisement are ignored because {@link MCPDiscoverResult} exposes
2098
- * only revisions this client can negotiate. It carries the same short probe deadline
2099
- * {@link connect}'s own discovery does, which exists only where a `timeout` was configured — so
2100
- * on a default client `discover` is UNBOUNDED and waits on a silent peer indefinitely. Configure
2101
- * `timeout` to bound it.
2086
+ * only revisions this client can negotiate. It carries the configured request deadline;
2087
+ * omitting `timeout` selects {@link DEFAULT_MCP_REQUEST_TIMEOUT}.
2102
2088
  *
2103
2089
  * @returns The validated modern discovery result
2104
2090
  */
2105
2091
  discover(): Promise<MCPDiscoverResult>;
2106
2092
  /**
2107
- * Disconnect from the remote server — reject every pending request and close the
2093
+ * Disconnects from the remote server — rejects every pending request and closes the
2108
2094
  * connection this client opened on its transport.
2109
2095
  *
2110
2096
  * @remarks
@@ -2121,7 +2107,7 @@ export declare interface MCPClientInterface {
2121
2107
  * `start` — that attempt owns nothing yet and closes what it opens itself. The transport's
2122
2108
  * `close` carries the per-request deadline on the WAIT, so a shutdown the transport accepts and
2123
2109
  * never answers rejects instead of holding this caller and every later {@link connect} — while
2124
- * that close itself keeps running, since the deadline only ends this client's waiting. A `close`
2110
+ * that close itself keeps running, because the deadline only ends this client's waiting. A `close`
2125
2111
  * that faults or goes unanswered rejects this call and leaves the connection owned, so the next
2126
2112
  * `disconnect` — or the next {@link connect}, which refuses to open while a close is owed —
2127
2113
  * settles it again: joining the close still running when there is one, issuing a fresh `close`
@@ -2137,8 +2123,8 @@ export declare interface MCPClientInterface {
2137
2123
  */
2138
2124
  disconnect(): Promise<void>;
2139
2125
  /**
2140
- * List the remote server's tools, each wrapped as a local {@link ToolInterface}
2141
- * whose `execute` runs the remote `tools/call` via {@link call}.
2126
+ * Lists the remote server's tools, each wrapped as a local {@link ToolInterface}
2127
+ * whose `execute` runs the remote `tools/call` through {@link call}.
2142
2128
  *
2143
2129
  * @remarks
2144
2130
  * Runs `tools/list` and maps each descriptor: `name` (narrowed to a string),
@@ -2150,8 +2136,8 @@ export declare interface MCPClientInterface {
2150
2136
  */
2151
2137
  tools(): Promise<readonly ToolInterface[]>;
2152
2138
  /**
2153
- * Call a remote tool by name — runs `tools/call` and reports which of the three
2154
- * permitted arms the peer answered with.
2139
+ * Calls a remote tool by name — runs `tools/call` and reports which permitted arm
2140
+ * the peer answered with.
2155
2141
  *
2156
2142
  * @remarks
2157
2143
  * The answer is an {@link MCPCallOutcome} because the peer, not the caller, decides
@@ -2181,7 +2167,7 @@ export declare interface MCPClientInterface {
2181
2167
  /**
2182
2168
  * Options for `createMCPClient` — the {@link MCPClientTransportInterface} to drive, the
2183
2169
  * optional client {@link MCPIdentity}, the per-request `timeout`, and the reserved
2184
- * `on` hooks (§8).
2170
+ * `on` hooks.
2185
2171
  *
2186
2172
  * @remarks
2187
2173
  * - `transport` — the carrier the client drives a remote MCP server over (REQUIRED;
@@ -2199,26 +2185,30 @@ export declare interface MCPClientInterface {
2199
2185
  * shutdown the transport accepts and never answers rejects its caller instead of wedging the
2200
2186
  * client — which makes a short `timeout` a short shutdown grace as well as a short request
2201
2187
  * deadline. Defaults to {@link import('./constants.js').DEFAULT_MCP_REQUEST_TIMEOUT}.
2202
- * - `on` — the §8 reserved key: initial listeners for the client's
2188
+ * - `on` — the reserved `on` key: initial listeners for the client's
2203
2189
  * {@link MCPClientEventMap}, wired at construction.
2204
2190
  */
2205
2191
  export declare interface MCPClientOptions {
2206
2192
  readonly on?: EmitterHooks<MCPClientEventMap>;
2207
- /** The emitter's listener-error handler (AGENTS §13) — a listener throw routes here, not to a domain event. */
2193
+ /** The emitter's listener-error handler — a listener throw routes here, not to a domain event. */
2208
2194
  readonly error?: EmitterErrorHandler;
2209
2195
  readonly transport: MCPClientTransportInterface;
2210
2196
  readonly identity?: MCPIdentity;
2211
2197
  /** The open client-capability record carried by modern requests. */
2212
2198
  readonly capabilities?: MCPClientCapabilities;
2213
- /** An optional protocol revision pin; absence permits negotiation. */
2199
+ /**
2200
+ * An optional exact protocol revision pin; absence permits negotiation. A defined pin must
2201
+ * match the peer's negotiated revision. An unsupported runtime value throws an
2202
+ * {@link MCPError} synchronously during construction.
2203
+ */
2214
2204
  readonly version?: MCPVersion;
2215
2205
  /** The per-request deadline in milliseconds (default {@link import('./constants.js').DEFAULT_MCP_REQUEST_TIMEOUT}). */
2216
2206
  readonly timeout?: number;
2217
2207
  }
2218
2208
 
2219
2209
  /**
2220
- * The observable events of a {@link MCPClientTransportInterface} (§13) — the moments the
2221
- * {@link MCPClientInterface} (and any tracer) subscribes to via `transport.emitter.on`.
2210
+ * The observable events of a {@link MCPClientTransportInterface} — the moments the
2211
+ * {@link MCPClientInterface} (and any tracer) subscribes to through `transport.emitter.on`.
2222
2212
  *
2223
2213
  * @remarks
2224
2214
  * - `message` — a JSON-RPC message ARRIVED from the remote server (a response the
@@ -2227,9 +2217,9 @@ export declare interface MCPClientOptions {
2227
2217
  * `data:` event) and emits the parsed {@link JSONRPCMessage}.
2228
2218
  * - `close` — the transport's connection ended (a stream closed, `close()` ran).
2229
2219
  * - `error` — a transport-level fault (a malformed message, a network error); the
2230
- * payload is typed `unknown` (§13). This is a DOMAIN event, distinct from the emitter's
2220
+ * payload is typed `unknown`. This is a DOMAIN event, distinct from the emitter's
2231
2221
  * own listener-error channel: a listener throw is routed to the emitter's `error` handler
2232
- * (the `error` option), never onto this map. Declared as a `type` alias (§4.5) so the
2222
+ * (the `error` option), never onto this map. Declared as a `type` alias so the
2233
2223
  * type-literal satisfies `EventMap` structurally.
2234
2224
  */
2235
2225
  export declare type MCPClientTransportEventMap = {
@@ -2237,26 +2227,24 @@ export declare type MCPClientTransportEventMap = {
2237
2227
  readonly message: readonly [message: JSONRPCMessage];
2238
2228
  /** The transport's connection ended. */
2239
2229
  readonly close: readonly [];
2240
- /** A transport-level fault — the caught error (typed `unknown`, §13). */
2230
+ /** A transport-level fault — the caught error (typed `unknown`). */
2241
2231
  readonly error: readonly [error: unknown];
2242
2232
  };
2243
2233
 
2244
2234
  /**
2245
- * A transport-agnostic carrier for the MCP CLIENT — pumps JSON-RPC messages to a
2246
- * remote server and surfaces the server's replies on its `emitter`'s `message`
2247
- * event, with NO knowledge of the protocol it carries.
2235
+ * A transport-agnostic MCP message carrier — pumps JSON-RPC messages to a peer and
2236
+ * surfaces received messages on its `emitter`'s `message` event, with no knowledge
2237
+ * of the protocol role on either side.
2248
2238
  *
2249
2239
  * @remarks
2250
- * The mirror of the server's "a transport pumps strings through `handle`": here the
2251
- * {@link MCPClientInterface} hands the transport one {@link JSONRPCMessage} via
2252
- * `send`, and the transport delivers each decoded reply back through the
2253
- * `message` event the client subscribed to. The minimal carrier surface (§21): a
2240
+ * A client hands the transport one {@link JSONRPCMessage} through `send`, and the
2241
+ * transport delivers each decoded reply through the `message` event. Server bridges
2242
+ * use the same carrier for bidirectional WebSocket and stdio channels. The minimal surface is a
2254
2243
  * `start` (open the connection / arm any reader), `send` (write one message),
2255
2244
  * and `close` (tear down). `session` exposes a server-assigned session id once a
2256
2245
  * stateful transport has one (`undefined` for the stateless v1) — reserved for the
2257
- * later sessions tier. Concrete transports (the HTTP transport over `fetch`, a future
2258
- * WebSocket one) live in `src/server/mcp`; the in-process loopback transport in the
2259
- * tests is one too.
2246
+ * later sessions tier. Concrete transports live in the browser and server environments;
2247
+ * the in-process loopback transport in the tests implements the same contract.
2260
2248
  */
2261
2249
  export declare interface MCPClientTransportInterface {
2262
2250
  readonly emitter: EmitterInterface<MCPClientTransportEventMap>;
@@ -2281,7 +2269,7 @@ export declare interface MCPClientTransportInterface {
2281
2269
  */
2282
2270
  readonly duplex: boolean;
2283
2271
  /**
2284
- * Open the transport — establish the connection and arm any reply reader.
2272
+ * Opens the transport — establishes the connection and arms any reply reader.
2285
2273
  *
2286
2274
  * @remarks
2287
2275
  * A `start` that REJECTS must first release whatever it had already acquired. The
@@ -2294,7 +2282,7 @@ export declare interface MCPClientTransportInterface {
2294
2282
  */
2295
2283
  start(): Promise<void>;
2296
2284
  /**
2297
- * Send one JSON-RPC message to the remote server.
2285
+ * Sends one JSON-RPC message to the remote server.
2298
2286
  *
2299
2287
  * @remarks
2300
2288
  * Each decoded reply is surfaced on the `emitter`'s `message` event — `send`
@@ -2318,10 +2306,10 @@ export declare interface MCPClientTransportInterface {
2318
2306
  */
2319
2307
  send(message: JSONRPCMessage): Promise<void>;
2320
2308
  /**
2321
- * Close the transport — end the connection and release resources.
2309
+ * Closes the transport — ends the connection and releases resources.
2322
2310
  *
2323
2311
  * @remarks
2324
- * A `close` must SETTLE, and its two settlements mean different things to its caller: resolving
2312
+ * A `close` must SETTLE, and its settlements mean different things to its caller: resolving
2325
2313
  * says the connection ended, rejecting says it did not. The
2326
2314
  * {@link MCPClientInterface}'s only other bound is a deadline, which reports that the shutdown
2327
2315
  * did not ANSWER and never that it did not happen — so a `close` that resolves or rejects hours
@@ -2330,6 +2318,11 @@ export declare interface MCPClientTransportInterface {
2330
2318
  * gave up waiting JOINS the `close` still running rather than issuing another. It IS called
2331
2319
  * again after an earlier `close` REJECTED, because a rejected close ended nothing.
2332
2320
  *
2321
+ * `close` is IDEMPOTENT: a call on a transport an earlier `close` already ended resolves
2322
+ * without emitting `close` again and without releasing anything a second time. Idempotence
2323
+ * bounds ONE closed lifetime rather than the object — a transport that reopens on `start`
2324
+ * arms itself there, and its next `close` ends that connection and emits once for it.
2325
+ *
2333
2326
  * @returns Resolves once the transport is closed
2334
2327
  */
2335
2328
  close(): Promise<void>;
@@ -2363,7 +2356,7 @@ export declare interface MCPCompletionContext {
2363
2356
  */
2364
2357
  export declare interface MCPCompletionManagerInterface {
2365
2358
  /**
2366
- * Complete one argument against its host-owned reference.
2359
+ * Completes one argument against its host-owned reference.
2367
2360
  *
2368
2361
  * @param params - The reference, argument fragment, and optional resolved context
2369
2362
  * @param options - The resolved per-request options
@@ -2394,9 +2387,9 @@ export declare type MCPContent = MCPTextContent | MCPImageContent | MCPAudioCont
2394
2387
 
2395
2388
  /** Host-neutral integrity and storage port for opaque MRTR continuation state. */
2396
2389
  export declare interface MCPContinuationInterface {
2397
- /** Protect a canonical state string and return the opaque client carrier. */
2390
+ /** Protects a canonical state string and returns the opaque client carrier. */
2398
2391
  seal(value: string): Promise<string>;
2399
- /** Recover a protected canonical state string, or `undefined` when invalid. */
2392
+ /** Recovers a protected canonical state string, or `undefined` when invalid. */
2400
2393
  open(value: string): Promise<string | undefined>;
2401
2394
  }
2402
2395
 
@@ -2415,8 +2408,8 @@ export declare type MCPDiscoverResult = {
2415
2408
  * The minimal transport-facing MCP dispatch surface.
2416
2409
  *
2417
2410
  * @remarks
2418
- * A transport-facing dispatcher needs the resolved message limit and the two dispatch
2419
- * doors. It also shares the server emitter because a binder that owns a message pump has
2411
+ * A transport-facing dispatcher needs the resolved message limit and the `dispatch` and
2412
+ * `handle` doors. It also shares the server emitter because a binder that owns a message pump has
2420
2413
  * no response channel for a contained transport fault and must report that fault as an event.
2421
2414
  */
2422
2415
  export declare interface MCPDispatcherInterface {
@@ -2425,7 +2418,7 @@ export declare interface MCPDispatcherInterface {
2425
2418
  /** The resolved bounds the dispatcher enforces. */
2426
2419
  readonly limit: Required<MCPLimitOptions>;
2427
2420
  /**
2428
- * Dispatch a parsed JSON-RPC request.
2421
+ * Dispatches a parsed JSON-RPC request.
2429
2422
  *
2430
2423
  * @param request - The parsed request
2431
2424
  * @param options - Optional execution context
@@ -2433,7 +2426,7 @@ export declare interface MCPDispatcherInterface {
2433
2426
  */
2434
2427
  dispatch(request: JSONRPCRequest, options?: MCPDispatchOptions): Promise<JSONRPCResponse | MCPStreamControllerInterface>;
2435
2428
  /**
2436
- * Dispatch a parsed JSON-RPC notification.
2429
+ * Dispatches a parsed JSON-RPC notification.
2437
2430
  *
2438
2431
  * @param notification - The parsed notification
2439
2432
  * @param options - Optional execution context
@@ -2441,7 +2434,7 @@ export declare interface MCPDispatcherInterface {
2441
2434
  */
2442
2435
  dispatch(notification: JSONRPCNotification, options?: MCPDispatchOptions): Promise<undefined>;
2443
2436
  /**
2444
- * Dispatch an invocation whose arm is not statically known.
2437
+ * Dispatches an invocation whose arm is not statically known.
2445
2438
  *
2446
2439
  * @param invocation - The parsed invocation
2447
2440
  * @param options - Optional execution context
@@ -2449,7 +2442,7 @@ export declare interface MCPDispatcherInterface {
2449
2442
  */
2450
2443
  dispatch(invocation: JSONRPCInvocation, options?: MCPDispatchOptions): Promise<JSONRPCResponse | MCPStreamControllerInterface | undefined>;
2451
2444
  /**
2452
- * Handle a raw JSON-RPC string.
2445
+ * Handles a raw JSON-RPC string.
2453
2446
  *
2454
2447
  * @param message - The raw message
2455
2448
  * @param options - Optional execution context
@@ -2593,25 +2586,25 @@ export declare interface MCPEmbeddedResource {
2593
2586
  * The wire era selected by an MCP request's structure.
2594
2587
  *
2595
2588
  * @remarks
2596
- * Two literals, and NOT the boolean a two-value union usually should be: this is a
2597
- * genuine protocol discriminant, not a behavioural switch. It names which of two
2598
- * published wire shapes a request took — a fact the request already carries — and it
2589
+ * `'modern'` and `'legacy'`, and not the boolean such a union would usually be: this is
2590
+ * a genuine protocol discriminant, not a behavioural switch. It names which
2591
+ * published wire shape a request took — a fact the request already carries — and it
2599
2592
  * is emitted on {@link MCPServerEventMap}'s `request` event, where an observer logs
2600
2593
  * or partitions by it. A boolean `modern` would publish the same fact under a name
2601
- * that stops being readable the day a third era exists.
2594
+ * that stops being readable the day another era exists.
2602
2595
  */
2603
2596
  export declare type MCPEra = 'modern' | 'legacy';
2604
2597
 
2605
2598
  /**
2606
- * A remote Model Context Protocol JSON-RPC error, preserving its machine-readable
2607
- * numeric code and optional structured context.
2599
+ * A Model Context Protocol error preserving its machine-readable numeric code and
2600
+ * optional structured context.
2608
2601
  *
2609
2602
  * @remarks
2610
- * {@link MCPClient} throws this error only for a remote JSON-RPC `error` response.
2611
- * Local lifecycle and transport conditions such as disconnects and request timeouts
2612
- * remain plain `Error`s. `context` carries the response's optional `error.data`
2613
- * unchanged and is `undefined` when the peer omitted it. This includes the modern
2614
- * reserved paths: `-32020` carries no context, `-32021` may carry
2603
+ * {@link MCPClient} throws this error for a remote JSON-RPC `error` response and for a
2604
+ * locally detected protocol incompatibility. Local lifecycle and transport conditions such
2605
+ * as disconnects and request timeouts remain plain `Error`s. For a remote response, `context`
2606
+ * carries the optional `error.data` unchanged and is `undefined` when the peer omitted it.
2607
+ * This includes the modern reserved paths: `-32020` carries no context, `-32021` may carry
2615
2608
  * `requiredCapabilities`, and `-32022` carries the peer's `supported` revisions and
2616
2609
  * `requested` revision for negotiation recovery.
2617
2610
  *
@@ -2630,7 +2623,7 @@ export declare class MCPError extends Error {
2630
2623
  readonly code: number;
2631
2624
  readonly context: unknown;
2632
2625
  /**
2633
- * Create a remote MCP protocol error.
2626
+ * Creates an MCP protocol error.
2634
2627
  *
2635
2628
  * @param message - The human-readable JSON-RPC error message
2636
2629
  * @param code - The machine-readable numeric JSON-RPC error code
@@ -2648,7 +2641,7 @@ export declare interface MCPExecutionContext {
2648
2641
  readonly progress?: MCPProgressInterface;
2649
2642
  }
2650
2643
 
2651
- /** Execute one canonical tool call or return a fully formed complete MCP result. */
2644
+ /** Executes one canonical tool call or return a fully formed complete MCP result. */
2652
2645
  export declare type MCPExecutionHandler = (context: MCPExecutionContext) => ToolResult | MCPCallResult | Promise<ToolResult | MCPCallResult>;
2653
2646
 
2654
2647
  /** One sized, themed icon associated with an MCP resource link. */
@@ -2688,7 +2681,7 @@ export declare interface MCPInputContext {
2688
2681
  }
2689
2682
 
2690
2683
  /**
2691
- * Decide whether the current `tools/call` needs operator input.
2684
+ * Decides whether the current `tools/call` needs operator input.
2692
2685
  *
2693
2686
  * @param context - The original call plus a verified response/state on a retry
2694
2687
  * @param options - The resolved per-request method options
@@ -2702,9 +2695,9 @@ export declare interface MCPInputOptions {
2702
2695
  readonly continuation: MCPContinuationInterface;
2703
2696
  /** Continuation lifetime in milliseconds; required so MCP never invents an expiry policy. */
2704
2697
  readonly ttl: number;
2705
- /** Resolve the authenticated principal for the call in hand. */
2698
+ /** Resolves the authenticated principal for the call in hand. */
2706
2699
  readonly principal: MCPPrincipalHandler;
2707
- /** Decide whether the call needs a form elicitation, including on verified retries. */
2700
+ /** Decides whether the call needs a form elicitation, including on verified retries. */
2708
2701
  readonly elicit: MCPInputHandler;
2709
2702
  }
2710
2703
 
@@ -2731,7 +2724,7 @@ export declare type MCPInputRequestMap = Readonly<Record<string, MCPInputRequest
2731
2724
  * An incomplete modern result carrying input requests, protected request state, or both.
2732
2725
  *
2733
2726
  * @remarks
2734
- * The two-arm union enforces the protocol's at-least-one-of rule at the type boundary:
2727
+ * The union enforces the protocol's at-least-one-of rule at the type boundary:
2735
2728
  * every value has `inputRequests`, `requestState`, or both.
2736
2729
  */
2737
2730
  export declare type MCPInputResult = {
@@ -2783,7 +2776,7 @@ export declare interface MCPJSONLimitOptions {
2783
2776
  }
2784
2777
 
2785
2778
  /**
2786
- * Translate the fixed legacy method set onto one modern dispatcher.
2779
+ * Translates the fixed legacy method set onto one modern dispatcher.
2787
2780
  *
2788
2781
  * @remarks
2789
2782
  * This decorator owns no execution engine or result normalizer. Modern invocations
@@ -2794,7 +2787,7 @@ export declare interface MCPJSONLimitOptions {
2794
2787
  export declare class MCPLegacy implements MCPDispatcherInterface {
2795
2788
  #private;
2796
2789
  /**
2797
- * Create a legacy decorator.
2790
+ * Creates a legacy decorator.
2798
2791
  *
2799
2792
  * @param options - The sole dispatcher and legacy handshake identity
2800
2793
  */
@@ -2881,7 +2874,7 @@ export declare type MCPLoggingLevel = 'debug' | 'info' | 'notice' | 'warning' |
2881
2874
  * The `Object` suffix is not a role suffix from the type table — it NAMES THE SHAPE.
2882
2875
  * `_meta` is a JSON object whose values are exact JSON, and a reader who sees
2883
2876
  * `MCPMeta` cannot tell that from a key, a string, or an entry. The same holds for
2884
- * {@link MCPResultMetaObject} and {@link SubscriptionsListenResultMetaObject}, which are
2877
+ * {@link MCPResultMetaObject} and {@link MCPSubscriptionResultMetaObject}, which are
2885
2878
  * that object narrowed by one reserved key each.
2886
2879
  */
2887
2880
  export declare type MCPMetaObject = Readonly<Record<string, JSONValue>>;
@@ -2962,14 +2955,14 @@ export declare class MCPMethodManager implements MCPMethodManagerInterface {
2962
2955
  */
2963
2956
  export declare interface MCPMethodManagerInterface {
2964
2957
  /**
2965
- * Register one modern method — replacing any handler already under that name.
2958
+ * Registers one modern method — replacing any handler already under that name.
2966
2959
  *
2967
- * @param name - The JSON-RPC method name to answer (e.g. `'tools/call'`)
2960
+ * @param name - The JSON-RPC method name to answer (for example, `'tools/call'`)
2968
2961
  * @param handler - The handler dispatched for that method
2969
2962
  */
2970
2963
  add(name: string, handler: MCPMethodHandler): void;
2971
2964
  /**
2972
- * Find the handler registered for one method name.
2965
+ * Finds the handler registered for one method name.
2973
2966
  *
2974
2967
  * @param name - The JSON-RPC method name to resolve
2975
2968
  * @returns The registered handler, or `undefined` when the method is unregistered
@@ -3021,7 +3014,7 @@ export declare interface MCPPaginationResult {
3021
3014
  }
3022
3015
 
3023
3016
  /**
3024
- * Derive the deployment-authenticated principal bound into signed request state.
3017
+ * Derives the deployment-authenticated principal bound into signed request state.
3025
3018
  *
3026
3019
  * @param request - The parsed `tools/call` request
3027
3020
  * @param options - The resolved per-request method options
@@ -3037,7 +3030,7 @@ export declare interface MCPProgress {
3037
3030
  }
3038
3031
 
3039
3032
  /**
3040
- * Receive one progress report a peer published for a request this client issued.
3033
+ * Receives one progress report a peer published for a request this client issued.
3041
3034
  *
3042
3035
  * @remarks
3043
3036
  * The RECEIVING half of {@link MCPProgressInterface}, and deliberately not its mirror:
@@ -3056,7 +3049,7 @@ export declare type MCPProgressHandler = (progress: MCPProgress) => void;
3056
3049
 
3057
3050
  /** Backpressured request-scoped progress reporter supplied to an explicit executor. */
3058
3051
  export declare interface MCPProgressInterface {
3059
- /** Report one finite, strictly increasing progress value and await its consumption. */
3052
+ /** Reports one finite, strictly increasing progress value and awaits its consumption. */
3060
3053
  report(progress: MCPProgress): Promise<void>;
3061
3054
  }
3062
3055
 
@@ -3086,7 +3079,7 @@ export declare interface MCPProgressInterface {
3086
3079
  export declare class MCPProgressReporter implements MCPProgressInterface {
3087
3080
  #private;
3088
3081
  /**
3089
- * Create one non-durable progress slot for an active request.
3082
+ * Creates one non-durable progress slot for an active request.
3090
3083
  *
3091
3084
  * @param token - The opaque progress token copied into each notification
3092
3085
  * @param limits - The byte, key, and depth bounds applied to every progress payload
@@ -3094,7 +3087,7 @@ export declare class MCPProgressReporter implements MCPProgressInterface {
3094
3087
  */
3095
3088
  constructor(token: string | number, limits: MCPJSONLimitOptions, signal: AbortSignal);
3096
3089
  /**
3097
- * Publish one bounded, strictly increasing progress value and await its consumption.
3090
+ * Publishes one bounded, strictly increasing progress value and awaits its consumption.
3098
3091
  *
3099
3092
  * @param progress - The progress payload to own and hand to the serial consumer
3100
3093
  * @returns A promise resolving after {@link take} consumes the item
@@ -3103,14 +3096,14 @@ export declare class MCPProgressReporter implements MCPProgressInterface {
3103
3096
  */
3104
3097
  report(progress: MCPProgress): Promise<void>;
3105
3098
  /**
3106
- * Take the next progress notification, waiting for the single producer slot when empty.
3099
+ * Takes the next progress notification, waiting for the single producer slot when empty.
3107
3100
  *
3108
3101
  * @returns The official progress notification carrying the original token
3109
3102
  * @throws When the reporter stops or another consumer already has a pending take
3110
3103
  */
3111
3104
  take(): Promise<JSONRPCNotification>;
3112
3105
  /**
3113
- * Permanently stop the reporter, reject pending work, and detach its abort listener.
3106
+ * Stops the reporter permanently, rejects pending work, and detaches its abort listener.
3114
3107
  *
3115
3108
  * Repeated calls are idempotent. No queued or replayable progress survives the first call.
3116
3109
  *
@@ -3170,7 +3163,7 @@ export declare type MCPPromptListResult = MCPPromptPage & {
3170
3163
  */
3171
3164
  export declare interface MCPPromptManagerInterface {
3172
3165
  /**
3173
- * Read one prompt page.
3166
+ * Reads one prompt page.
3174
3167
  *
3175
3168
  * @param pagination - The optional opaque cursor
3176
3169
  * @param options - The resolved per-request options
@@ -3178,7 +3171,7 @@ export declare interface MCPPromptManagerInterface {
3178
3171
  */
3179
3172
  prompts(pagination: MCPPaginationParams, options: MCPMethodOptions): MCPPromptPage | Promise<MCPPromptPage>;
3180
3173
  /**
3181
- * Resolve one named prompt.
3174
+ * Resolves one named prompt.
3182
3175
  *
3183
3176
  * @param params - The prompt name, string arguments, and optional multi-round response carrier
3184
3177
  * @param options - The resolved per-request options
@@ -3221,7 +3214,7 @@ export declare interface MCPRequestContext {
3221
3214
  }
3222
3215
 
3223
3216
  /**
3224
- * Issue one correlated JSON-RPC request and await the peer's result.
3217
+ * Issues one correlated JSON-RPC request and awaits the peer's result.
3225
3218
  *
3226
3219
  * @remarks
3227
3220
  * The door an {@link MCPTaskClientInterface} reaches the wire through, and the whole of what
@@ -3301,7 +3294,7 @@ export declare type MCPResourceListResult = MCPResourcePage & {
3301
3294
  */
3302
3295
  export declare interface MCPResourceManagerInterface {
3303
3296
  /**
3304
- * Read one resource page.
3297
+ * Reads one resource page.
3305
3298
  *
3306
3299
  * @param pagination - The optional opaque cursor
3307
3300
  * @param options - The resolved per-request options
@@ -3309,7 +3302,7 @@ export declare interface MCPResourceManagerInterface {
3309
3302
  */
3310
3303
  resources(pagination: MCPPaginationParams, options: MCPMethodOptions): MCPResourcePage | Promise<MCPResourcePage>;
3311
3304
  /**
3312
- * Read one concrete resource URI.
3305
+ * Reads one concrete resource URI.
3313
3306
  *
3314
3307
  * @param params - The URI and optional multi-round response carrier
3315
3308
  * @param options - The resolved per-request options
@@ -3317,7 +3310,7 @@ export declare interface MCPResourceManagerInterface {
3317
3310
  */
3318
3311
  resource(params: MCPResourceReadParams, options: MCPMethodOptions): readonly MCPResourceContents[] | MCPInputResult | undefined | Promise<readonly MCPResourceContents[] | MCPInputResult | undefined>;
3319
3312
  /**
3320
- * Read one resource-template page.
3313
+ * Reads one resource-template page.
3321
3314
  *
3322
3315
  * @remarks
3323
3316
  * `uriTemplate` values are RFC 6570 strings. Expansion belongs to the manager that resolves
@@ -3395,7 +3388,7 @@ export declare interface MCPResourceTemplateReference {
3395
3388
  * Concrete results — {@link MCPCallResult}, {@link MCPDiscoverResult},
3396
3389
  * {@link MCPListResult}, {@link MCPPromptListResult}, {@link MCPPromptGetResult},
3397
3390
  * {@link MCPCompletionResult}, {@link MCPInputResult}, and
3398
- * {@link SubscriptionsListenResult} — stay CLOSED and keep their literal
3391
+ * {@link MCPSubscriptionResult} — stay CLOSED and keep their literal
3399
3392
  * `resultType`, so a caller that knows which method it called still narrows to a
3400
3393
  * literal through that result's guard. Openness lives here, at the arm a server may
3401
3394
  * answer any registered method through, and nowhere else.
@@ -3421,7 +3414,7 @@ export declare type MCPRole = 'user' | 'assistant';
3421
3414
  * requests over a live {@link ToolManagerInterface}, with NO transport coupling.
3422
3415
  *
3423
3416
  * @remarks
3424
- * - **Two entry points.** `dispatch(invocation)` runs an already-parsed invocation and
3417
+ * - **`dispatch` and `handle`.** `dispatch(invocation)` runs an already-parsed invocation and
3425
3418
  * resolves a {@link JSONRPCResponse} for a request — or `undefined` for a
3426
3419
  * {@link JSONRPCNotification}, which carries no `id` and is answered by nothing.
3427
3420
  * `handle(message)` is the string boundary: it
@@ -3437,8 +3430,8 @@ export declare type MCPRole = 'user' | 'assistant';
3437
3430
  * every dispatch: the same path a later method or a consumer's own takes, with an
3438
3431
  * unregistered method still answering `-32601`.
3439
3432
  * - **Provider-agnostic.** Imports only core siblings — JSON-RPC + the tool registry,
3440
- * no HTTP, no model. Wire fields are narrowed via the contracts guards (no `as`).
3441
- * - **Observable (§13).** The owned `emitter` fires `request` at the top of every
3433
+ * no HTTP, no model. Wire fields are narrowed with the contract guards (no `as`).
3434
+ * - **Observable.** The owned `emitter` fires `request` at the top of every
3442
3435
  * dispatch; the emitter isolates a listener throw and routes it to its `error` handler
3443
3436
  * (the `error` option), so a listener throw can never escape the dispatch.
3444
3437
  *
@@ -3483,17 +3476,17 @@ export declare type MCPServerCapabilities = Readonly<Record<string, MCPMetaObjec
3483
3476
  };
3484
3477
 
3485
3478
  /**
3486
- * The push observation surface (§13) of an {@link MCPServerInterface} — the
3479
+ * The push observation surface of an {@link MCPServerInterface} — the
3487
3480
  * dispatch moments a fire-and-forget observer (logging, tracing) subscribes to
3488
- * via `server.emitter.on`.
3481
+ * through `server.emitter.on`.
3489
3482
  *
3490
3483
  * @remarks
3491
3484
  * `request` fires at the TOP of every `dispatch` with the method, correlating id
3492
3485
  * (ABSENT for a notification, which has none), and structurally selected wire era, BEFORE the
3493
- * method runs — so an observer sees every inbound call. Listener isolation is the emitter's (§13): a
3486
+ * method runs — so an observer sees every inbound call. Listener isolation is the emitter's: a
3494
3487
  * listener throw is routed to the emitter's `error` handler (the `error` option),
3495
3488
  * never onto this map, so a buggy observer can never corrupt a dispatch. Declared as
3496
- * a `type` alias (§4.5) so the type-literal satisfies `EventMap` structurally.
3489
+ * a `type` alias so the type-literal satisfies `EventMap` structurally.
3497
3490
  */
3498
3491
  export declare type MCPServerEventMap = {
3499
3492
  /**
@@ -3537,10 +3530,10 @@ export declare type MCPServerEventMap = {
3537
3530
  * pumps strings through `handle`).
3538
3531
  *
3539
3532
  * @remarks
3540
- * - **Two entry points.** `dispatch(invocation)` is the TYPED core: it takes an
3533
+ * - **`dispatch` and `handle`.** `dispatch(invocation)` is the TYPED core: it takes an
3541
3534
  * already-parsed {@link JSONRPCInvocation}, runs the method, and resolves a
3542
3535
  * {@link JSONRPCResponse} — or an {@link MCPStream} for a held-open modern method — for
3543
- * a {@link JSONRPCRequest}, and `undefined` for a {@link JSONRPCNotification}. Its two
3536
+ * a {@link JSONRPCRequest}, and `undefined` for a {@link JSONRPCNotification}. Its
3544
3537
  * overloads say exactly that, so a caller dispatching a request never handles an
3545
3538
  * `undefined` answer and a caller dispatching a notification never handles a response.
3546
3539
  * `handle(message)` is the STRING boundary: it `JSON.parse`s the raw message, narrows it
@@ -3555,9 +3548,9 @@ export declare type MCPServerEventMap = {
3555
3548
  * still answers `-32601`.
3556
3549
  * - **Provider-agnostic.** Imports only core siblings; it speaks JSON-RPC + the
3557
3550
  * tool registry, with no HTTP, no model, and no backend coupling.
3558
- * - **Observable (§13).** The owned `emitter` ({@link MCPServerEventMap}) fires
3551
+ * - **Observable.** The owned `emitter` ({@link MCPServerEventMap}) fires
3559
3552
  * `request` per dispatch; the emitter isolates a listener throw and routes it to its
3560
- * `error` handler (the `error` option, §13), never the dispatch.
3553
+ * `error` handler (the `error` option), never the dispatch.
3561
3554
  */
3562
3555
  export declare interface MCPServerInterface extends MCPDispatcherInterface {
3563
3556
  readonly identity: MCPIdentity;
@@ -3572,15 +3565,15 @@ export declare interface MCPServerInterface extends MCPDispatcherInterface {
3572
3565
  * code in front of the server needs the SAME number: a binder that decodes an inbound
3573
3566
  * message before handing it on must refuse at the byte the server would have refused at,
3574
3567
  * and the alternative — a second configured copy of one bound, on the binder's own options
3575
- * — is two numbers that will disagree the first time one of them is changed.
3568
+ * — is a second number that will disagree the first time either is changed.
3576
3569
  */
3577
3570
  readonly limit: Required<MCPLimitOptions>;
3578
3571
  /**
3579
- * Dispatch an already-parsed request — run its method and resolve its answer.
3572
+ * Dispatches an already-parsed request — runs its method and resolves its answer.
3580
3573
  *
3581
3574
  * @remarks
3582
3575
  * A held-open modern method answers with a CONTROLLED stream instead of a response:
3583
- * narrow the two apart with `Symbol.asyncIterator in answer`. Whatever the method
3576
+ * narrow a stream from a response with `Symbol.asyncIterator in answer`. Whatever the method
3584
3577
  * produced, what leaves here is an {@link MCPStreamControllerInterface} — dispatch is
3585
3578
  * the one wrapping seam — so a caller may end the exchange promptly without waiting on
3586
3579
  * the producer. `options` is optional, so a caller that cannot abort simply never
@@ -3592,7 +3585,7 @@ export declare interface MCPServerInterface extends MCPDispatcherInterface {
3592
3585
  */
3593
3586
  dispatch(request: JSONRPCRequest, options?: MCPDispatchOptions): Promise<JSONRPCResponse | MCPStreamControllerInterface>;
3594
3587
  /**
3595
- * Dispatch an already-parsed notification — run its method and answer nothing.
3588
+ * Dispatches an already-parsed notification — runs its method and answers nothing.
3596
3589
  *
3597
3590
  * @param notification - The parsed JSON-RPC notification to dispatch
3598
3591
  * @param options - Per-request execution options (see {@link MCPDispatchOptions})
@@ -3600,7 +3593,7 @@ export declare interface MCPServerInterface extends MCPDispatcherInterface {
3600
3593
  */
3601
3594
  dispatch(notification: JSONRPCNotification, options?: MCPDispatchOptions): Promise<undefined>;
3602
3595
  /**
3603
- * Dispatch an already-parsed invocation whose arm is not statically known.
3596
+ * Dispatches an already-parsed invocation whose arm is not statically known.
3604
3597
  *
3605
3598
  * @remarks
3606
3599
  * The union arm a transport uses when it has narrowed a message no further than
@@ -3614,7 +3607,7 @@ export declare interface MCPServerInterface extends MCPDispatcherInterface {
3614
3607
  */
3615
3608
  dispatch(invocation: JSONRPCInvocation, options?: MCPDispatchOptions): Promise<JSONRPCResponse | MCPStreamControllerInterface | undefined>;
3616
3609
  /**
3617
- * Handle a raw message string — parse it, dispatch, and serialize the answer.
3610
+ * Handles a raw message string — parses it, dispatches it, and serializes the answer.
3618
3611
  *
3619
3612
  * @remarks
3620
3613
  * A `JSON.parse` failure resolves a serialized `-32700` (Parse error) response;
@@ -3628,7 +3621,7 @@ export declare interface MCPServerInterface extends MCPDispatcherInterface {
3628
3621
  * The vague-verb prohibition (`process`, `handle`) governs STANDALONE helpers,
3629
3622
  * which carry no entity to supply their object. Here the entity does: `server.handle`
3630
3623
  * reads as "the server handles this message", and it is the string-boundary twin of
3631
- * {@link dispatch} — one verb per entry point, the same act at two levels of parsing.
3624
+ * {@link dispatch} — one verb per entry point, the same act at the typed and string levels.
3632
3625
  *
3633
3626
  * @param message - The raw JSON-RPC message string
3634
3627
  * @param options - Per-request execution options (see {@link MCPDispatchOptions})
@@ -3640,7 +3633,7 @@ export declare interface MCPServerInterface extends MCPDispatcherInterface {
3640
3633
  /**
3641
3634
  * Options for `createMCPServer` — the server {@link MCPIdentity}, the live
3642
3635
  * {@link ToolManagerInterface} it exposes, optional `instructions`, and the
3643
- * reserved `on` hooks (§8).
3636
+ * reserved `on` hooks.
3644
3637
  *
3645
3638
  * @remarks
3646
3639
  * `identity` identifies the server in the `initialize` handshake (`serverInfo`).
@@ -3648,14 +3641,14 @@ export declare interface MCPServerInterface extends MCPDispatcherInterface {
3648
3641
  * over — its `definitions()` advertise the tools and its `execute()` runs a call
3649
3642
  * (the manager already isolates a tool throw into a `success: false` result, so
3650
3643
  * the server adds none). `resources` is the optional consumer-owned registry the
3651
- * three modern resource methods project without taking ownership of storage. `prompts`
3644
+ * modern resource methods project without taking ownership of storage. `prompts`
3652
3645
  * supplies the equivalent prompt registry for `prompts/list` and `prompts/get`.
3653
3646
  * `completion` supplies independent host-owned lookup and candidate generation for
3654
3647
  * `completion/complete`; the server never parses or expands a resource-template URI.
3655
3648
  * `instructions` is the optional human guidance exposed
3656
3649
  * by `server/discover`. `cache` configures the modern cache stamps: `ttl` is the
3657
3650
  * freshness lifetime in milliseconds and `scope` defaults to `'private'`. `on`
3658
- * is the §8 reserved key: initial listeners for the server's
3651
+ * is the reserved `on` key: initial listeners for the server's
3659
3652
  * {@link MCPServerEventMap}, wired at construction. `input` enables modern
3660
3653
  * `tools/call` multi-round trips: the consumer decides when input is needed and
3661
3654
  * supplies principal/continuation/TTL policy, while MCP assigns the request key and
@@ -3667,7 +3660,7 @@ export declare interface MCPServerInterface extends MCPDispatcherInterface {
3667
3660
  */
3668
3661
  export declare interface MCPServerOptions {
3669
3662
  readonly on?: EmitterHooks<MCPServerEventMap>;
3670
- /** The emitter's listener-error handler (AGENTS §13) — a listener throw routes here, not to a domain event. */
3663
+ /** The emitter's listener-error handler — a listener throw routes here, not to a domain event. */
3671
3664
  readonly error?: EmitterErrorHandler;
3672
3665
  readonly identity: MCPIdentity;
3673
3666
  /** The live tool registry the server exposes over `tools/list` / `tools/call`. */
@@ -3725,9 +3718,9 @@ export declare interface MCPServerOptions {
3725
3718
  *
3726
3719
  * Held-open closure is a RESULT in the modern revision, not an out-of-band event, so it
3727
3720
  * arrives where a result arrives — the generator's `return`. Consuming a stream and
3728
- * consuming a unary response therefore end the same way, and a transport narrows the two
3729
- * apart at ONE point (`Symbol.asyncIterator in answer`), at the place that already pumps
3730
- * messages onto the wire. The third parameter is stated explicitly because a stream
3721
+ * consuming a unary response therefore end the same way, and a transport narrows a stream
3722
+ * from a response at ONE point (`Symbol.asyncIterator in answer`), at the place that already pumps
3723
+ * messages onto the wire. The `TNext` type parameter is stated explicitly because a stream
3731
3724
  * accepts nothing back from its consumer.
3732
3725
  */
3733
3726
  export declare type MCPStream = AsyncGenerator<JSONRPCNotification, JSONRPCResponse, unknown>;
@@ -3744,10 +3737,10 @@ export declare type MCPStream = AsyncGenerator<JSONRPCNotification, JSONRPCRespo
3744
3737
  * cleanup to the producer — so a cooperating producer is woken rather than waited on —
3745
3738
  * contains every promise the producer settles late, and makes every closure path idempotent.
3746
3739
  *
3747
- * The three closures are deliberately different answers: the source's own return is the
3740
+ * The closures are deliberately different answers: the source's own return is the
3748
3741
  * terminal RESPONSE, `return(value)` is the consumer saying it has the answer already, and
3749
- * {@link stop} is an owner saying there will be no answer at all. Only the first is a
3750
- * message a peer ever sees.
3742
+ * {@link stop} is an owner saying there will be no answer at all. Only the source's own
3743
+ * return is a message a peer ever sees.
3751
3744
  *
3752
3745
  * A producer's own resource cleanup remains the producer's: JavaScript cannot settle work a
3753
3746
  * generator is suspended inside, so the signal is how an uncooperative producer is asked to
@@ -3773,7 +3766,7 @@ export declare type MCPStream = AsyncGenerator<JSONRPCNotification, JSONRPCRespo
3773
3766
  export declare class MCPStreamController implements MCPStreamControllerInterface {
3774
3767
  #private;
3775
3768
  /**
3776
- * Control one produced stream for the lifetime of one request.
3769
+ * Controls one produced stream for the lifetime of one request.
3777
3770
  *
3778
3771
  * @param source - The produced held-open result whose cancellation this controller owns
3779
3772
  * @param signal - The request signal every closure settles against; its abort ends the exchange
@@ -3781,7 +3774,7 @@ export declare class MCPStreamController implements MCPStreamControllerInterface
3781
3774
  */
3782
3775
  constructor(source: MCPStream, signal: AbortSignal, closure: AbortController);
3783
3776
  /**
3784
- * Read the next message, or the terminating response that ends the exchange.
3777
+ * Reads the next message, or the terminating response that ends the exchange.
3785
3778
  *
3786
3779
  * @remarks
3787
3780
  * At most one read is outstanding against the source at a time, and a rival read is
@@ -3794,14 +3787,14 @@ export declare class MCPStreamController implements MCPStreamControllerInterface
3794
3787
  */
3795
3788
  next(): Promise<IteratorResult<JSONRPCNotification, JSONRPCResponse>>;
3796
3789
  /**
3797
- * End the exchange because the consumer already has its answer.
3790
+ * Ends the exchange because the consumer already has its answer.
3798
3791
  *
3799
3792
  * @param value - The terminal the consumer is ending on
3800
3793
  * @returns That terminal as the iteration's `return`
3801
3794
  */
3802
3795
  return(value: JSONRPCResponse | PromiseLike<JSONRPCResponse>): Promise<IteratorResult<JSONRPCNotification, JSONRPCResponse>>;
3803
3796
  /**
3804
- * End the exchange with a failure the consumer is raising.
3797
+ * Ends the exchange with a failure the consumer is raising.
3805
3798
  *
3806
3799
  * @param error - The failure to end the exchange with
3807
3800
  * @returns Never — the returned promise always rejects
@@ -3809,7 +3802,7 @@ export declare class MCPStreamController implements MCPStreamControllerInterface
3809
3802
  */
3810
3803
  throw(error: unknown): Promise<IteratorResult<JSONRPCNotification, JSONRPCResponse>>;
3811
3804
  /**
3812
- * End the exchange permanently, with no terminal response.
3805
+ * Ends the exchange permanently, with no terminal response.
3813
3806
  *
3814
3807
  * @remarks
3815
3808
  * Idempotent, and the operation an owner that is not the consumer uses: a transport whose
@@ -3820,7 +3813,7 @@ export declare class MCPStreamController implements MCPStreamControllerInterface
3820
3813
  */
3821
3814
  stop(): void;
3822
3815
  /**
3823
- * End the exchange when the scope that owns it exits.
3816
+ * Ends the exchange when the scope that owns it exits.
3824
3817
  *
3825
3818
  * @remarks
3826
3819
  * {@link stop} under the name a `finally` calls it by, so a pump discharges its ownership
@@ -3831,7 +3824,7 @@ export declare class MCPStreamController implements MCPStreamControllerInterface
3831
3824
  */
3832
3825
  [Symbol.asyncDispose](): Promise<void>;
3833
3826
  /**
3834
- * Iterate this exchange — the controller is its own iterator.
3827
+ * Iterates this exchange — the controller is its own iterator.
3835
3828
  *
3836
3829
  * @returns This controller
3837
3830
  */
@@ -3877,7 +3870,7 @@ export declare class MCPStreamController implements MCPStreamControllerInterface
3877
3870
  */
3878
3871
  export declare interface MCPStreamControllerInterface extends MCPStream {
3879
3872
  /**
3880
- * Read the next notification, or the terminating response that ends the exchange.
3873
+ * Reads the next notification, or the terminating response that ends the exchange.
3881
3874
  *
3882
3875
  * @remarks
3883
3876
  * At most ONE read is outstanding against the producer, and a rival read is refused
@@ -3889,21 +3882,21 @@ export declare interface MCPStreamControllerInterface extends MCPStream {
3889
3882
  */
3890
3883
  next(): Promise<IteratorResult<JSONRPCNotification, JSONRPCResponse>>;
3891
3884
  /**
3892
- * End the exchange because the consumer already has its answer.
3885
+ * Ends the exchange because the consumer already has its answer.
3893
3886
  *
3894
3887
  * @param value - The terminal the consumer is ending on
3895
3888
  * @returns That terminal as the iteration's `return`
3896
3889
  */
3897
3890
  return(value: JSONRPCResponse | PromiseLike<JSONRPCResponse>): Promise<IteratorResult<JSONRPCNotification, JSONRPCResponse>>;
3898
3891
  /**
3899
- * End the exchange with a failure the consumer is raising.
3892
+ * Ends the exchange with a failure the consumer is raising.
3900
3893
  *
3901
3894
  * @param error - The failure to end the exchange with
3902
3895
  * @returns Never — the returned promise always rejects with the supplied failure
3903
3896
  */
3904
3897
  throw(error: unknown): Promise<IteratorResult<JSONRPCNotification, JSONRPCResponse>>;
3905
3898
  /**
3906
- * End the exchange permanently, with no terminal response.
3899
+ * Ends the exchange permanently, with no terminal response.
3907
3900
  *
3908
3901
  * @remarks
3909
3902
  * Idempotent, and never a way to deliver an answer: a read parked on the producer
@@ -3914,7 +3907,7 @@ export declare interface MCPStreamControllerInterface extends MCPStream {
3914
3907
  */
3915
3908
  stop(): void;
3916
3909
  /**
3917
- * End the exchange when the scope that owns it exits.
3910
+ * Ends the exchange when the scope that owns it exits.
3918
3911
  *
3919
3912
  * @remarks
3920
3913
  * The scoped spelling of {@link stop}, and the member a pump discharges its ownership
@@ -3940,18 +3933,18 @@ export declare interface MCPStreamControllerInterface extends MCPStream {
3940
3933
  * and takes the `MCP` prefix; the keys are the protocol's and do not change.
3941
3934
  */
3942
3935
  export declare interface MCPSubscriptionFilter {
3943
- /** Receive `notifications/tools/list_changed` when the server produces it. */
3936
+ /** Receives `notifications/tools/list_changed` when the server produces it. */
3944
3937
  readonly toolsListChanged?: boolean;
3945
- /** Receive `notifications/prompts/list_changed` when the server produces it. */
3938
+ /** Receives `notifications/prompts/list_changed` when the server produces it. */
3946
3939
  readonly promptsListChanged?: boolean;
3947
- /** Receive `notifications/resources/list_changed` when the server produces it. */
3940
+ /** Receives `notifications/resources/list_changed` when the server produces it. */
3948
3941
  readonly resourcesListChanged?: boolean;
3949
- /** Receive `notifications/resources/updated` for these resource URIs. */
3942
+ /** Receives `notifications/resources/updated` for these resource URIs. */
3950
3943
  readonly resourceSubscriptions?: readonly string[];
3951
3944
  }
3952
3945
 
3953
3946
  /**
3954
- * Produce notifications for one honoured `subscriptions/listen` filter.
3947
+ * Produces notifications for one honoured `subscriptions/listen` filter.
3955
3948
  *
3956
3949
  * @remarks
3957
3950
  * The producer parks on its own event source while idle and ends its iterable to close the
@@ -3968,10 +3961,22 @@ export declare type MCPSubscriptionHandler = (notifications: MCPSubscriptionFilt
3968
3961
  export declare interface MCPSubscriptionOptions {
3969
3962
  /** The notification filter this server can actually honour. */
3970
3963
  readonly notifications: MCPSubscriptionFilter;
3971
- /** Open the producer for one honoured filter. */
3964
+ /** Opens the producer for one honoured filter. */
3972
3965
  readonly listen: MCPSubscriptionHandler;
3973
3966
  }
3974
3967
 
3968
+ /** The terminating result returned when a `subscriptions/listen` stream closes gracefully. */
3969
+ export declare type MCPSubscriptionResult = {
3970
+ readonly resultType: 'complete';
3971
+ readonly _meta: MCPSubscriptionResultMetaObject;
3972
+ };
3973
+
3974
+ /** The required metadata on a graceful `subscriptions/listen` result. */
3975
+ export declare type MCPSubscriptionResultMetaObject = MCPResultMetaObject & {
3976
+ /** The JSON-RPC id of the `subscriptions/listen` request whose stream is closing. */
3977
+ readonly 'io.modelcontextprotocol/subscriptionId': JSONRPCId;
3978
+ };
3979
+
3975
3980
  /**
3976
3981
  * One durable task's wire snapshot — the payload a deferred `tools/call` answers with.
3977
3982
  *
@@ -3979,10 +3984,10 @@ export declare interface MCPSubscriptionOptions {
3979
3984
  * Every field name here is a WIRE SPELLING carried verbatim from the extension's
3980
3985
  * schema, so the compound-member prohibition does not reach them; the type NAME is
3981
3986
  * this library's own. `ttlMs` is `null` — not absent — when the task has no expiry,
3982
- * because the schema distinguishes the two. `createdAt` and `lastUpdatedAt` are
3987
+ * because the schema distinguishes absence from `null`. `createdAt` and `lastUpdatedAt` are
3983
3988
  * described as ISO 8601 instants, though the generated schema validates only a
3984
3989
  * string, so this package carries whatever the manager produced without reformatting
3985
- * it. `pollIntervalMs` is the manager's hint about how often the client should ask
3990
+ * it. `pollIntervalMs` is the manager's hint about how often the client can ask
3986
3991
  * again; a manager that pushes notifications instead simply omits it.
3987
3992
  */
3988
3993
  export declare type MCPTask = {
@@ -4000,7 +4005,7 @@ export declare type MCPTask = {
4000
4005
  };
4001
4006
 
4002
4007
  /**
4003
- * The CLIENT half of the draft Tasks extension — the three `tasks/*` methods over one
4008
+ * The CLIENT half of the draft Tasks extension — the `tasks/*` methods over one
4004
4009
  * correlated-request door, exposed as an {@link import('./types.js').MCPClientInterface}'s
4005
4010
  * `tasks`.
4006
4011
  *
@@ -4020,7 +4025,7 @@ export declare type MCPTask = {
4020
4025
  * client's id space, pending table, deadline policy, and `disconnect` drain rather than
4021
4026
  * opening a second path to the same peer.
4022
4027
  * - **The peer authorizes.** Nothing is checked locally. A server that never configured the
4023
- * extension answers all three `-32601`, and a task that never existed, one whose TTL purged
4028
+ * extension answers each of them `-32601`, and a task that never existed, one whose TTL purged
4024
4029
  * it, and one belonging to another principal are all the same `-32602` — a refusal this
4025
4030
  * client passes on rather than resolving into a distinction the peer refused to publish.
4026
4031
  *
@@ -4051,7 +4056,7 @@ export declare class MCPTaskClient implements MCPTaskClientInterface {
4051
4056
  * The mirror of {@link MCPTaskManagerInterface} minus `start`, because creating a task is
4052
4057
  * never the client's decision: the extension gives a client no flag and no parameter to ask
4053
4058
  * for one, and a task exists only because the SERVER deferred a `tools/call` it received. The
4054
- * three methods that remain are the three `tasks/*` methods on the wire.
4059
+ * methods that remain are the `tasks/*` methods on the wire.
4055
4060
  *
4056
4061
  * There is deliberately NO plural accessor, for the same reason the server-side port has none:
4057
4062
  * the extension defines no `tasks/list`, and an accessor that could enumerate tasks would
@@ -4067,12 +4072,12 @@ export declare class MCPTaskClient implements MCPTaskClientInterface {
4067
4072
  * existing `notification` event at zero new mechanism.
4068
4073
  *
4069
4074
  * Every method authorizes on the peer's side, so a task belonging to another principal is
4070
- * indistinguishable from one that never existed and one whose TTL purged it — all three are
4075
+ * indistinguishable from one that never existed and one whose TTL purged it — each is
4071
4076
  * the same `-32602`, deliberately.
4072
4077
  */
4073
4078
  export declare interface MCPTaskClientInterface {
4074
4079
  /**
4075
- * Read one durable task's current snapshot.
4080
+ * Reads one durable task's current snapshot.
4076
4081
  *
4077
4082
  * @remarks
4078
4083
  * REJECTS rather than answering `undefined` for a task it cannot read. The peer's refusal
@@ -4098,7 +4103,7 @@ export declare interface MCPTaskClientInterface {
4098
4103
  */
4099
4104
  task(id: string): Promise<MCPTaskDetail>;
4100
4105
  /**
4101
- * Answer the input requests an `input_required` task is waiting on.
4106
+ * Answers the input requests an `input_required` task is waiting on.
4102
4107
  *
4103
4108
  * @remarks
4104
4109
  * The responses are keyed by the request keys the task itself published, and they travel
@@ -4117,7 +4122,7 @@ export declare interface MCPTaskClientInterface {
4117
4122
  */
4118
4123
  update(id: string, responses: Readonly<Record<string, unknown>>): Promise<void>;
4119
4124
  /**
4120
- * Ask one durable task to stop.
4125
+ * Asks one durable task to stop.
4121
4126
  *
4122
4127
  * @remarks
4123
4128
  * ADVISORY, exactly like the server-side port it mirrors: the acknowledgement reports that
@@ -4193,7 +4198,7 @@ export declare interface MCPTaskContext {
4193
4198
  * that ended it, and `working` / `cancelled` carry nothing extra. Narrow on `status`.
4194
4199
  *
4195
4200
  * `result` is an open {@link MCPResult} rather than an {@link MCPCallResult}: only
4196
- * `tools/call` can currently be deferred, but the payload is the deferred method's
4201
+ * `tools/call` can be deferred, but the payload is the deferred method's
4197
4202
  * own result and the extension says nothing that fixes it to one method forever.
4198
4203
  */
4199
4204
  export declare type MCPTaskDetail = (MCPTask & {
@@ -4212,7 +4217,7 @@ export declare type MCPTaskDetail = (MCPTask & {
4212
4217
  });
4213
4218
 
4214
4219
  /**
4215
- * Decide whether the `tools/call` in hand becomes a durable task.
4220
+ * Decides whether the `tools/call` in hand becomes a durable task.
4216
4221
  *
4217
4222
  * @remarks
4218
4223
  * Deferral is entirely the SERVER's decision. The extension gives a client no flag and
@@ -4248,7 +4253,7 @@ export declare type MCPTaskHandler = (context: MCPTaskContext, options: MCPMetho
4248
4253
  * states the non-goal.
4249
4254
  *
4250
4255
  * {@link task} answers `undefined` for a task that never existed, one whose TTL purged
4251
- * it, AND one this caller is not entitled to see. The three are indistinguishable ON
4256
+ * it, AND one this caller is not entitled to see. They are indistinguishable ON
4252
4257
  * PURPOSE: they all become the same `-32602`, so a `taskId` cannot be probed for
4253
4258
  * existence. A manager that distinguishes them — by throwing for the unauthorized case,
4254
4259
  * say — turns its own store into an enumeration oracle no matter what this package does.
@@ -4259,10 +4264,10 @@ export declare type MCPTaskHandler = (context: MCPTaskContext, options: MCPMetho
4259
4264
  */
4260
4265
  export declare interface MCPTaskManagerInterface {
4261
4266
  /**
4262
- * Create — or return the existing — durable task for one stable operation key.
4267
+ * Creates — or return the existing — durable task for one stable operation key.
4263
4268
  *
4264
4269
  * @remarks
4265
- * Three obligations this package cannot enforce, and one consequence that is easy
4270
+ * The obligations this package cannot enforce, and one consequence that is easy
4266
4271
  * to miss:
4267
4272
  *
4268
4273
  * - **Durability before return.** The returned task MUST already be retrievable by
@@ -4287,10 +4292,10 @@ export declare interface MCPTaskManagerInterface {
4287
4292
  */
4288
4293
  start(key: string, context: MCPTaskContext, options: MCPMethodOptions): Promise<MCPTask>;
4289
4294
  /**
4290
- * Read one task's current snapshot.
4295
+ * Reads one task's current snapshot.
4291
4296
  *
4292
4297
  * @remarks
4293
- * ALL THREE `tasks/*` methods run through here first, not only `tasks/get`. {@link update}
4298
+ * EVERY `tasks/*` method runs through here first, not only `tasks/get`. {@link update}
4294
4299
  * and {@link abort} answer `void`, so neither has a way to say "no such task" and neither
4295
4300
  * can be the place authorization is decided; this is. Expect one read of the named task
4296
4301
  * before every update and every cancellation, and expect an `undefined` answer to end that
@@ -4302,7 +4307,7 @@ export declare interface MCPTaskManagerInterface {
4302
4307
  */
4303
4308
  task(id: string, options: MCPMethodOptions): Promise<MCPTaskDetail | undefined>;
4304
4309
  /**
4305
- * Answer the input requests an `input_required` task is waiting on.
4310
+ * Answers the input requests an `input_required` task is waiting on.
4306
4311
  *
4307
4312
  * @remarks
4308
4313
  * Responses are keyed by the request keys the task published. A key the task does not
@@ -4323,7 +4328,7 @@ export declare interface MCPTaskManagerInterface {
4323
4328
  */
4324
4329
  update(id: string, responses: Readonly<Record<string, unknown>>, options: MCPMethodOptions): Promise<void>;
4325
4330
  /**
4326
- * Ask one task to stop.
4331
+ * Asks one task to stop.
4327
4332
  *
4328
4333
  * @remarks
4329
4334
  * Cancellation is COOPERATIVE: a task that has already finished, or one whose work
@@ -4347,7 +4352,7 @@ export declare interface MCPTaskManagerInterface {
4347
4352
  export declare interface MCPTaskOptions {
4348
4353
  /** The durable store the server creates tasks in and reads them back from. */
4349
4354
  readonly tasks: MCPTaskManagerInterface;
4350
- /** Decide whether the call in hand is deferred, and under which stable key. */
4355
+ /** Decides whether the call in hand is deferred, and under which stable key. */
4351
4356
  readonly defer: MCPTaskHandler;
4352
4357
  }
4353
4358
 
@@ -4446,20 +4451,20 @@ export declare type MCPTextStream = AsyncGenerator<string, string, unknown>;
4446
4451
  export declare class MCPTextStreamController implements MCPTextStreamControllerInterface {
4447
4452
  #private;
4448
4453
  /**
4449
- * Mirror one controlled typed exchange as its serialized sequence.
4454
+ * Mirrors one controlled typed exchange as its serialized sequence.
4450
4455
  *
4451
4456
  * @param stream - The controlled typed stream this face serializes and delegates into
4452
4457
  */
4453
4458
  constructor(stream: MCPStreamControllerInterface);
4454
4459
  /**
4455
- * Read the next serialized message, or the serialized terminating response.
4460
+ * Reads the next serialized message, or the serialized terminating response.
4456
4461
  *
4457
4462
  * @returns The next message as a string, or the terminal as the iteration's `return`
4458
4463
  * @throws Whatever ended the typed exchange, unserialized — an abort is not a message
4459
4464
  */
4460
4465
  next(): Promise<IteratorResult<string, string>>;
4461
4466
  /**
4462
- * End the exchange because the consumer already has its answer.
4467
+ * Ends the exchange because the consumer already has its answer.
4463
4468
  *
4464
4469
  * @remarks
4465
4470
  * The typed exchange ends with no terminal, because a string is not a
@@ -4472,7 +4477,7 @@ export declare class MCPTextStreamController implements MCPTextStreamControllerI
4472
4477
  */
4473
4478
  return(value: string | PromiseLike<string>): Promise<IteratorResult<string, string>>;
4474
4479
  /**
4475
- * End the exchange with a failure the consumer is raising.
4480
+ * Ends the exchange with a failure the consumer is raising.
4476
4481
  *
4477
4482
  * @param error - The failure to end the exchange with
4478
4483
  * @returns Never — the returned promise always rejects
@@ -4480,13 +4485,13 @@ export declare class MCPTextStreamController implements MCPTextStreamControllerI
4480
4485
  */
4481
4486
  throw(error: unknown): Promise<IteratorResult<string, string>>;
4482
4487
  /**
4483
- * End the typed exchange permanently, with no terminal response.
4488
+ * Ends the typed exchange permanently, with no terminal response.
4484
4489
  *
4485
4490
  * @returns Nothing
4486
4491
  */
4487
4492
  stop(): void;
4488
4493
  /**
4489
- * End the typed exchange when the scope that owns this face exits.
4494
+ * Ends the typed exchange when the scope that owns this face exits.
4490
4495
  *
4491
4496
  * @remarks
4492
4497
  * Delegates downward exactly as {@link stop} does — disposing the serialized arm is
@@ -4496,7 +4501,7 @@ export declare class MCPTextStreamController implements MCPTextStreamControllerI
4496
4501
  */
4497
4502
  [Symbol.asyncDispose](): Promise<void>;
4498
4503
  /**
4499
- * Iterate this exchange — the controller is its own iterator.
4504
+ * Iterates this exchange — the controller is its own iterator.
4500
4505
  *
4501
4506
  * @returns This controller
4502
4507
  */
@@ -4534,13 +4539,13 @@ export declare class MCPTextStreamController implements MCPTextStreamControllerI
4534
4539
  */
4535
4540
  export declare interface MCPTextStreamControllerInterface extends MCPTextStream {
4536
4541
  /**
4537
- * Read the next serialized message, or the serialized terminating response.
4542
+ * Reads the next serialized message, or the serialized terminating response.
4538
4543
  *
4539
4544
  * @returns The next message as a string, or the terminal as the iteration's `return`
4540
4545
  */
4541
4546
  next(): Promise<IteratorResult<string, string>>;
4542
4547
  /**
4543
- * End the exchange because the consumer already has its answer.
4548
+ * Ends the exchange because the consumer already has its answer.
4544
4549
  *
4545
4550
  * @remarks
4546
4551
  * The typed exchange ends with NO terminal: a string is not a {@link JSONRPCResponse}, and
@@ -4552,20 +4557,20 @@ export declare interface MCPTextStreamControllerInterface extends MCPTextStream
4552
4557
  */
4553
4558
  return(value: string | PromiseLike<string>): Promise<IteratorResult<string, string>>;
4554
4559
  /**
4555
- * End the exchange with a failure the consumer is raising.
4560
+ * Ends the exchange with a failure the consumer is raising.
4556
4561
  *
4557
4562
  * @param error - The failure to end the exchange with
4558
4563
  * @returns Never — the returned promise always rejects with the supplied failure
4559
4564
  */
4560
4565
  throw(error: unknown): Promise<IteratorResult<string, string>>;
4561
4566
  /**
4562
- * End the exchange permanently, with no terminal response, through the typed stream.
4567
+ * Ends the exchange permanently, with no terminal response, through the typed stream.
4563
4568
  *
4564
4569
  * @returns Nothing
4565
4570
  */
4566
4571
  stop(): void;
4567
4572
  /**
4568
- * End the typed exchange when the scope that owns this face exits.
4573
+ * Ends the typed exchange when the scope that owns this face exits.
4569
4574
  *
4570
4575
  * @remarks
4571
4576
  * Delegates downward exactly as {@link stop} does, so a pump holding only the serialized
@@ -4616,13 +4621,13 @@ export declare interface MCPToolDescriptor {
4616
4621
  * replaceable handler per event is the whole point of it.
4617
4622
  */
4618
4623
  export declare interface MCPTransportInterface {
4619
- /** Deliver one outbound JSON-RPC message (already serialized). */
4624
+ /** Delivers one outbound JSON-RPC message (already serialized). */
4620
4625
  readonly send: (message: string) => void | Promise<void>;
4621
- /** Register the single inbound-message handler — a second call REPLACES the first. */
4626
+ /** Registers the single inbound-message handler — a second call REPLACES the first. */
4622
4627
  readonly listen: (handler: (message: string) => void) => void;
4623
- /** Register the single closed handler — a second call REPLACES the first. */
4628
+ /** Registers the single closed handler — a second call REPLACES the first. */
4624
4629
  readonly closed: (handler: () => void) => void;
4625
- /** Close the underlying channel. */
4630
+ /** Closes the underlying channel. */
4626
4631
  readonly close: () => void | Promise<void>;
4627
4632
  }
4628
4633
 
@@ -4634,7 +4639,7 @@ export declare interface MCPTransportInterface {
4634
4639
  * The name states the whole distinction: this is the tool-call result WITHOUT
4635
4640
  * `resultType`, which is the only shape the legacy revision has for one.
4636
4641
  * {@link MCPCallResult} is this payload plus the modern `'complete'` stamp, so
4637
- * stamping is the one difference between the two eras' answers to `tools/call`.
4642
+ * stamping is the one difference between the modern and legacy answers to `tools/call`.
4638
4643
  * Its sole producer is `MCPServer`'s legacy branch, and it is removed with that
4639
4644
  * branch.
4640
4645
  *
@@ -4659,11 +4664,11 @@ export declare type MCPUnstampedCallResult = {
4659
4664
  export declare type MCPVersion = '2026-07-28' | '2025-11-25' | '2025-06-18';
4660
4665
 
4661
4666
  /**
4662
- * Narrow an already-parsed value to a {@link JSONRPCMessage}, or `undefined` when
4667
+ * Narrows an already-parsed value to a {@link JSONRPCMessage}, or `undefined` when
4663
4668
  * it is not one.
4664
4669
  *
4665
4670
  * @remarks
4666
- * Total (§14) — a non-message returns `undefined`, never throws. The input must
4671
+ * Total — a non-message returns `undefined`, never throws. The input must
4667
4672
  * ALREADY be `JSON.parse`d: the raw-string parse (which can throw on malformed
4668
4673
  * JSON) happens in `MCPServer.handle` inside a try/catch that maps a parse failure
4669
4674
  * to a `-32700` response.
@@ -4677,7 +4682,7 @@ export declare type MCPVersion = '2026-07-28' | '2025-11-25' | '2025-06-18';
4677
4682
  * result. Identity is not preserved and is not promised.
4678
4683
  *
4679
4684
  * The parser's sound partner is the COMPOSITE `isJSONRPCMessage(value) &&
4680
- * isBoundedJSON(value, limits)`, and against it both halves of the §15 soundness law
4685
+ * isBoundedJSON(value, limits)`, and against it both halves of the soundness law
4681
4686
  * hold by construction:
4682
4687
  *
4683
4688
  * - Every non-`undefined` result satisfies {@link isJSONRPCMessage}, because the guard
@@ -4708,7 +4713,7 @@ export declare type MCPVersion = '2026-07-28' | '2025-11-25' | '2025-06-18';
4708
4713
  export declare function parseJSONRPCMessage(value: unknown, limits?: MCPJSONLimitOptions): JSONRPCMessage | undefined;
4709
4714
 
4710
4715
  /**
4711
- * Parse the opened value carried by an opaque `requestState` continuation.
4716
+ * Parses the opened value carried by an opaque `requestState` continuation.
4712
4717
  *
4713
4718
  * @remarks
4714
4719
  * This parser does not open the opaque continuation carrier; the configured
@@ -4730,7 +4735,7 @@ export declare function parseJSONRPCMessage(value: unknown, limits?: MCPJSONLimi
4730
4735
  export declare function parseMCPInputState(value: unknown): MCPInputState | undefined;
4731
4736
 
4732
4737
  /**
4733
- * Parse the reserved modern request metadata into an {@link MCPRequestContext}.
4738
+ * Parses the reserved modern request metadata into an {@link MCPRequestContext}.
4734
4739
  *
4735
4740
  * @remarks
4736
4741
  * This is the validity step after {@link isModernRequest}: a defined result can
@@ -4751,7 +4756,7 @@ export declare function parseMCPInputState(value: unknown): MCPInputState | unde
4751
4756
  export declare function parseRequestContext(value: unknown, limits?: MCPJSONLimitOptions): MCPRequestContext | undefined;
4752
4757
 
4753
4758
  /**
4754
- * Read the request id an inbound `notifications/cancelled` names — the inverse of
4759
+ * Reads the request id an inbound `notifications/cancelled` names — the inverse of
4755
4760
  * {@link buildCancelledNotification}.
4756
4761
  *
4757
4762
  * @remarks
@@ -4759,7 +4764,7 @@ export declare function parseRequestContext(value: unknown, limits?: MCPJSONLimi
4759
4764
  * real {@link JSONRPCId}: `null` is not one, and neither is an absent member, so a
4760
4765
  * malformed frame reads as "cancels nothing" rather than as an error. Anything that is not a
4761
4766
  * `notifications/cancelled` notification — a response, a request that happens to use the
4762
- * method name, another notification — reads the same way. Total (§14).
4767
+ * method name, another notification — reads the same way. Total.
4763
4768
  *
4764
4769
  * @param message - The decoded inbound message to read
4765
4770
  * @returns The id of the request being cancelled, or `undefined` when the message cancels nothing
@@ -4772,7 +4777,7 @@ export declare function parseRequestContext(value: unknown, limits?: MCPJSONLimi
4772
4777
  export declare function readCancelledId(message: JSONRPCMessage): JSONRPCId | undefined;
4773
4778
 
4774
4779
  /**
4775
- * Pump a controlled serialized exchange onto a transport — every notification in order, then
4780
+ * Pumps a controlled serialized exchange onto a transport — every notification in order, then
4776
4781
  * the terminating response — and END the exchange however the pump leaves.
4777
4782
  *
4778
4783
  * @remarks
@@ -4807,7 +4812,7 @@ export declare function readCancelledId(message: JSONRPCMessage): JSONRPCId | un
4807
4812
  export declare function sendStream(stream: MCPTextStreamControllerInterface, transport: MCPTransportInterface): Promise<void>;
4808
4813
 
4809
4814
  /**
4810
- * Deterministically serialize one exact JSON value within explicit bounds.
4815
+ * Serializes one exact JSON value deterministically within explicit bounds.
4811
4816
  *
4812
4817
  * @param value - The unknown value to validate and serialize
4813
4818
  * @param limits - Serialized byte, key, and depth limits
@@ -4816,7 +4821,7 @@ export declare function sendStream(stream: MCPTextStreamControllerInterface, tra
4816
4821
  export declare function serializeJSON(value: unknown, limits: MCPJSONLimitOptions): string | undefined;
4817
4822
 
4818
4823
  /**
4819
- * Snapshot one bounded exact JSON value together with its canonical wire serialization.
4824
+ * Snapshots one bounded exact JSON value together with its canonical wire serialization.
4820
4825
  *
4821
4826
  * The returned value is an owned, deeply frozen graph reconstructed from the canonical text;
4822
4827
  * the frozen tuple shares no mutable structure with the input. Invalid exact-JSON shapes,
@@ -4838,10 +4843,10 @@ export declare function serializeJSON(value: unknown, limits: MCPJSONLimitOption
4838
4843
  export declare function snapshotJSON(value: unknown, limits: MCPJSONLimitOptions): readonly [value: JSONValue, text: string] | undefined;
4839
4844
 
4840
4845
  /**
4841
- * Snapshot one exact Tool result and the canonical wire text of a defined success value.
4846
+ * Snapshots one exact Tool result and the canonical wire text of a defined success value.
4842
4847
  *
4843
- * A success must have exactly four own enumerable data properties: `id`, `name`, `success: true`,
4844
- * and `value`. A failure must instead have exactly `id`, `name`, `success: false`, and a string
4848
+ * A success must have exactly the own enumerable data properties `id`, `name`,
4849
+ * `success: true`, and `value`. A failure must instead have exactly `id`, `name`, `success: false`, and a string
4845
4850
  * `error`. The returned result and tuple are frozen. Only a defined success value crosses the
4846
4851
  * bounded JSON ownership seam; it becomes an owned deeply frozen value and receives canonical
4847
4852
  * text. Value-less successes and failures pair with `undefined` text. Non-records, symbol keys,
@@ -4866,7 +4871,7 @@ export declare function snapshotJSON(value: unknown, limits: MCPJSONLimitOptions
4866
4871
  export declare function snapshotToolResult(value: unknown, limits: MCPJSONLimitOptions): readonly [result: ToolResult, text: string | undefined] | undefined;
4867
4872
 
4868
4873
  /**
4869
- * Stamp a subscription notification with the request id reserved for its held-open stream.
4874
+ * Stamps a subscription notification with the request id reserved for its held-open stream.
4870
4875
  *
4871
4876
  * @param notification - The notification to copy and stamp
4872
4877
  * @param id - The `subscriptions/listen` request id
@@ -4874,18 +4879,6 @@ export declare function snapshotToolResult(value: unknown, limits: MCPJSONLimitO
4874
4879
  */
4875
4880
  export declare function stampSubscriptionNotification(notification: JSONRPCNotification, id: JSONRPCId): JSONRPCNotification;
4876
4881
 
4877
- /** The terminating result returned when a `subscriptions/listen` stream closes gracefully. */
4878
- export declare type SubscriptionsListenResult = {
4879
- readonly resultType: 'complete';
4880
- readonly _meta: SubscriptionsListenResultMetaObject;
4881
- };
4882
-
4883
- /** The required metadata on a graceful `subscriptions/listen` result. */
4884
- export declare type SubscriptionsListenResultMetaObject = MCPResultMetaObject & {
4885
- /** The JSON-RPC id of the `subscriptions/listen` request whose stream is closing. */
4886
- readonly 'io.modelcontextprotocol/subscriptionId': JSONRPCId;
4887
- };
4888
-
4889
4882
  /**
4890
4883
  * The MCP protocol revisions this server can negotiate.
4891
4884
  *