From c4f006c459a581390a39d71ddb6d170771314ca8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 13 Jul 2026 06:54:19 +0000 Subject: [PATCH] chore: update spec.types.ts from upstream --- packages/core/src/types/spec.types.ts | 3581 ++++++++++++------------- 1 file changed, 1747 insertions(+), 1834 deletions(-) diff --git a/packages/core/src/types/spec.types.ts b/packages/core/src/types/spec.types.ts index f36434bef3..66c05bb0c3 100644 --- a/packages/core/src/types/spec.types.ts +++ b/packages/core/src/types/spec.types.ts @@ -3,16 +3,17 @@ * * Source: https://github.com/modelcontextprotocol/modelcontextprotocol * Pulled from: https://raw.githubusercontent.com/modelcontextprotocol/modelcontextprotocol/main/schema/draft/schema.ts - * Last updated from commit: 838d6f69055f1d14400d67a47eb1d76207c7c34b + * Last updated from commit: 93671a3f2bac3bc11b0eb6327c2d029e272b2871 * * DO NOT EDIT THIS FILE MANUALLY. Changes will be overwritten by automated updates. * To update this file, run: pnpm run fetch:spec-types - */ /* JSON types */ + *//* JSON types */ /** * @category Common Types */ -export type JSONValue = string | number | boolean | null | JSONObject | JSONArray; +export type JSONValue = + string | number | boolean | null | JSONObject | JSONArray; /** * @category Common Types @@ -31,12 +32,13 @@ export type JSONArray = JSONValue[]; * * @category JSON-RPC */ -export type JSONRPCMessage = JSONRPCRequest | JSONRPCNotification | JSONRPCResponse; +export type JSONRPCMessage = + JSONRPCRequest | JSONRPCNotification | JSONRPCResponse; /** @internal */ -export const LATEST_PROTOCOL_VERSION = 'DRAFT-2026-v1'; +export const LATEST_PROTOCOL_VERSION = "2026-07-28"; /** @internal */ -export const JSONRPC_VERSION = '2.0'; +export const JSONRPC_VERSION = "2.0"; /** * Represents the contents of a `_meta` field, which clients and servers use to attach additional metadata to their interactions. @@ -48,7 +50,8 @@ export const JSONRPC_VERSION = '2.0'; * **Prefix:** * - Optional — if specified, MUST be a series of _labels_ separated by dots (`.`), followed by a slash (`/`). * - Labels MUST start with a letter and end with a letter or digit. Interior characters may be letters, digits, or hyphens (`-`). - * - Any prefix consisting of zero or more labels, followed by `modelcontextprotocol` or `mcp`, followed by any label, is **reserved** for MCP use. For example: `modelcontextprotocol.io/`, `mcp.dev/`, `api.modelcontextprotocol.org/`, and `tools.mcp.com/` are all reserved. + * - Implementations SHOULD use reverse DNS notation (e.g., `com.example/` rather than `example.com/`). + * - Any prefix where the second label is `modelcontextprotocol` or `mcp` is **reserved** for MCP use. For example: `io.modelcontextprotocol/`, `dev.mcp/`, `org.modelcontextprotocol.api/`, and `com.mcp.tools/` are all reserved. However, `com.example.mcp/` is NOT reserved, as the second label is `example`. * * **Name:** * - Unless empty, MUST start and end with an alphanumeric character (`[a-z0-9A-Z]`). @@ -67,10 +70,69 @@ export type MetaObject = Record; * @category Common Types */ export interface RequestMetaObject extends MetaObject { - /** - * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by {@link ProgressNotification | notifications/progress}). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. - */ - progressToken?: ProgressToken; + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by {@link ProgressNotification | notifications/progress}). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken?: ProgressToken; + /** + * The MCP Protocol Version being used for this request. Required. + * + * For the HTTP transport, this value MUST match the `MCP-Protocol-Version` + * header; otherwise the server MUST return a `400 Bad Request`. If the + * server does not support the requested version, it MUST return an + * {@link UnsupportedProtocolVersionError}. + */ + "io.modelcontextprotocol/protocolVersion": string; + /** + * Identifies the client software making the request. Required. + * + * The {@link Implementation} schema requires `name` and `version`; other + * fields are optional. + */ + "io.modelcontextprotocol/clientInfo": Implementation; + /** + * The client's capabilities for this specific request. Required. + * + * Capabilities are declared per-request rather than once at initialization; + * an empty object means the client supports no optional capabilities. + * Servers MUST NOT infer capabilities from prior requests. + */ + "io.modelcontextprotocol/clientCapabilities": ClientCapabilities; + /** + * The desired log level for this request. Optional. + * + * If absent, the server MUST NOT send any {@link LoggingMessageNotification | notifications/message} + * notifications for this request. The client opts in to log messages by + * explicitly setting a level. Replaces the former `logging/setLevel` RPC. + * + * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577). + * Remains in the specification for at least twelve months; see the + * deprecated features registry. + */ + "io.modelcontextprotocol/logLevel"?: LoggingLevel; +} + +/** + * Extends {@link MetaObject} with additional notification-specific fields. All key naming rules from `MetaObject` apply. + * + * @see {@link MetaObject} for key naming rules and reserved prefixes. + * @see [General fields: `_meta`](/specification/draft/basic/index#meta) for more details. + * @category Common Types + */ +export interface NotificationMetaObject extends MetaObject { + /** + * Identifies the subscription stream a notification was delivered on. The + * server MUST include this key on every notification delivered via a + * {@link SubscriptionsListenRequest | subscriptions/listen} stream, so the + * client can correlate the notification with the originating subscription. + * The key is absent on notifications not delivered via a subscription + * stream (e.g. progress notifications for an in-flight request), which is + * why it is optional here. + * + * The value is the JSON-RPC ID of the `subscriptions/listen` request that + * opened the stream. + */ + "io.modelcontextprotocol/subscriptionId"?: RequestId; } /** @@ -87,38 +149,21 @@ export type ProgressToken = string | number; */ export type Cursor = string; -/** - * Common params for any task-augmented request. - * - * @internal - */ -export interface TaskAugmentedRequestParams extends RequestParams { - /** - * If specified, the caller is requesting task-augmented execution for this request. - * The request will return a {@link CreateTaskResult} immediately, and the actual result can be - * retrieved later via {@link GetTaskPayloadRequest | tasks/result}. - * - * Task augmentation is subject to capability negotiation - receivers MUST declare support - * for task augmentation of specific request types in their capabilities. - */ - task?: TaskMetadata; -} - /** * Common params for any request. * * @category Common Types */ export interface RequestParams { - _meta?: RequestMetaObject; + _meta: RequestMetaObject; } /** @internal */ export interface Request { - method: string; - // Allow unofficial extensions of `Request.params` without impacting `RequestParams`. - // eslint-disable-next-line @typescript-eslint/no-explicit-any - params?: { [key: string]: any }; + method: string; + // Allow unofficial extensions of `Request.params` without impacting `RequestParams`. + // eslint-disable-next-line @typescript-eslint/no-explicit-any + params?: { [key: string]: any }; } /** @@ -127,43 +172,63 @@ export interface Request { * @category Common Types */ export interface NotificationParams { - _meta?: MetaObject; + _meta?: NotificationMetaObject; } /** @internal */ export interface Notification { - method: string; - // Allow unofficial extensions of `Notification.params` without impacting `NotificationParams`. - // eslint-disable-next-line @typescript-eslint/no-explicit-any - params?: { [key: string]: any }; + method: string; + // Allow unofficial extensions of `Notification.params` without impacting `NotificationParams`. + // eslint-disable-next-line @typescript-eslint/no-explicit-any + params?: { [key: string]: any }; } +/** + * Indicates the type of a {@link Result} object, allowing the client to + * determine how to parse the response. + * + * complete - the request completed successfully and the result contains the final content. + * input_required - the request requires additional input and the result contains an {@link InputRequiredResult} object with instructions for the client to provide additional input before retrying the original request. + * @category Common Types + */ +export type ResultType = "complete" | "input_required" | string; + /** * Common result fields. * * @category Common Types */ export interface Result { - _meta?: MetaObject; - [key: string]: unknown; + _meta?: MetaObject; + /** + * Indicates the type of the result, which allows the client to determine + * how to parse the result object. + * + * Servers implementing this protocol version MUST include this field. + * For backward compatibility, when a client receives a result from a + * server implementing an earlier protocol version (which does not include + * `resultType`), the client MUST treat the absent field as `"complete"`. + */ + resultType: ResultType; + [key: string]: unknown; } /** * @category Errors */ export interface Error { - /** - * The error type that occurred. - */ - code: number; - /** - * A short description of the error. The message SHOULD be limited to a concise single sentence. - */ - message: string; - /** - * Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.). - */ - data?: unknown; + /** + * The error type that occurred. + */ + code: number; + /** + * A short description of the error. The message SHOULD be limited to a concise single sentence. + */ + message: string; + /** + * Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.). + */ + data?: unknown; } /** @@ -179,8 +244,8 @@ export type RequestId = string | number; * @category JSON-RPC */ export interface JSONRPCRequest extends Request { - jsonrpc: typeof JSONRPC_VERSION; - id: RequestId; + jsonrpc: typeof JSONRPC_VERSION; + id: RequestId; } /** @@ -189,7 +254,7 @@ export interface JSONRPCRequest extends Request { * @category JSON-RPC */ export interface JSONRPCNotification extends Notification { - jsonrpc: typeof JSONRPC_VERSION; + jsonrpc: typeof JSONRPC_VERSION; } /** @@ -198,9 +263,9 @@ export interface JSONRPCNotification extends Notification { * @category JSON-RPC */ export interface JSONRPCResultResponse { - jsonrpc: typeof JSONRPC_VERSION; - id: RequestId; - result: Result; + jsonrpc: typeof JSONRPC_VERSION; + id: RequestId; + result: Result; } /** @@ -209,9 +274,9 @@ export interface JSONRPCResultResponse { * @category JSON-RPC */ export interface JSONRPCErrorResponse { - jsonrpc: typeof JSONRPC_VERSION; - id?: RequestId; - error: Error; + jsonrpc: typeof JSONRPC_VERSION; + id?: RequestId; + error: Error; } /** @@ -239,7 +304,7 @@ export const INTERNAL_ERROR = -32603; * @category Errors */ export interface ParseError extends Error { - code: typeof PARSE_ERROR; + code: typeof PARSE_ERROR; } /** @@ -250,26 +315,25 @@ export interface ParseError extends Error { * @category Errors */ export interface InvalidRequestError extends Error { - code: typeof INVALID_REQUEST; + code: typeof INVALID_REQUEST; } /** * A JSON-RPC error indicating that the requested method does not exist or is not available. * - * In MCP, this error is returned when a request is made for a method that requires a capability that has not been declared. This can occur in either direction: + * In MCP, a server returns this error when a client invokes a method the server does not implement — either a genuinely unknown method, or one gated behind a server capability the server did not advertise (e.g., calling `prompts/list` when the `prompts` capability was not advertised). * - * - A server returning this error when the client requests a capability it doesn't support (e.g., requesting completions when the `completions` capability was not advertised) - * - A client returning this error when the server requests a capability it doesn't support (e.g., requesting roots when the client did not declare the `roots` capability) + * A request that requires a client capability the client did not declare is signalled instead by {@link MissingRequiredClientCapabilityError} (`-32021`). * * @see {@link https://www.jsonrpc.org/specification#error_object | JSON-RPC 2.0 Error Object} * - * @example Roots not supported - * {@includeCode ./examples/MethodNotFoundError/roots-not-supported.json} + * @example Prompts not supported + * {@includeCode ./examples/MethodNotFoundError/prompts-not-supported.json} * * @category Errors */ export interface MethodNotFoundError extends Error { - code: typeof METHOD_NOT_FOUND; + code: typeof METHOD_NOT_FOUND; } /** @@ -281,7 +345,6 @@ export interface MethodNotFoundError extends Error { * - **Prompts**: Unknown prompt name or missing required arguments * - **Pagination**: Invalid or expired cursor values * - **Logging**: Invalid log level - * - **Tasks**: Invalid or nonexistent task ID, invalid cursor, or attempting to cancel a task already in a terminal status * - **Elicitation**: Server requests an elicitation mode not declared in client capabilities * - **Sampling**: Missing tool result or tool results mixed with other content * @@ -302,7 +365,7 @@ export interface MethodNotFoundError extends Error { * @category Errors */ export interface InvalidParamsError extends Error { - code: typeof INVALID_PARAMS; + code: typeof INVALID_PARAMS; } /** @@ -316,29 +379,128 @@ export interface InvalidParamsError extends Error { * @category Errors */ export interface InternalError extends Error { - code: typeof INTERNAL_ERROR; + code: typeof INTERNAL_ERROR; } -// Implementation-specific JSON-RPC error codes [-32000, -32099] -/** @internal */ -export const URL_ELICITATION_REQUIRED = -32042; +/* + * MCP error codes. + * + * JSON-RPC 2.0 reserves `-32000` to `-32099` for implementation-defined + * server errors. MCP partitions that range: + * + * - `-32000` to `-32019`: implementation-defined. Existing SDKs and + * implementations use codes here for their own purposes; the specification + * will never define codes in this sub-range, and receivers must not assign + * cross-implementation semantics to them. + * - `-32020` to `-32099`: reserved for error codes defined by the MCP + * specification. Every code allocated here is recorded in this file. + * Codes are allocated sequentially starting at `-32020` and proceeding + * toward `-32099`. + * + * Codes defined by earlier protocol versions remain reserved and are never + * reused: `-32002` (resource not found, 2025-11-25 and earlier; replaced by + * `-32602`) and `-32042` (URL elicitation required, 2025-11-25 only). + */ /** - * An error response that indicates that the server requires the client to provide additional information via an elicitation request. + * Error code returned when the HTTP headers of a request do not match the + * corresponding values in the request body, or required headers are + * missing or malformed. * - * @example Authorization required - * {@includeCode ./examples/URLElicitationRequiredError/authorization-required.json} + * @category Errors + */ +export const HEADER_MISMATCH = -32020; + +/** + * Error code returned when a server requires a client capability that was + * not declared in the request's `clientCapabilities`. * - * @internal + * @category Errors + */ +export const MISSING_REQUIRED_CLIENT_CAPABILITY = -32021; + +/** + * Error code returned when the request's protocol version is not supported + * by the server. + * + * @category Errors + */ +export const UNSUPPORTED_PROTOCOL_VERSION = -32022; + +/** + * Returned when a server rejects a request because the values in the HTTP + * headers do not match the corresponding values in the request body, or + * because required headers are missing or malformed. For HTTP, the response + * status code MUST be `400 Bad Request`. + * + * @example Header mismatch + * {@includeCode ./examples/HeaderMismatchError/header-mismatch.json} + * + * @category Errors + */ +export interface HeaderMismatchError extends Omit< + JSONRPCErrorResponse, + "error" +> { + error: Error & { + code: typeof HEADER_MISMATCH; + }; +} + +/** + * Returned when the request's protocol version is unknown to the server or + * unsupported (e.g., a known experimental or draft version the server has + * chosen not to implement). For HTTP, the response status code MUST be + * `400 Bad Request`. + * + * @example Unsupported protocol version + * {@includeCode ./examples/UnsupportedProtocolVersionError/unsupported-version.json} + * + * @category Errors + */ +export interface UnsupportedProtocolVersionError extends Omit< + JSONRPCErrorResponse, + "error" +> { + error: Error & { + code: typeof UNSUPPORTED_PROTOCOL_VERSION; + data: { + /** + * Protocol versions the server supports. The client should choose a + * mutually supported version from this list and retry. + */ + supported: string[]; + /** + * The protocol version that was requested by the client. + */ + requested: string; + }; + }; +} + +/** + * Returned when processing a request requires a capability the client did not + * declare in `clientCapabilities`. For HTTP, the response status code MUST be + * `400 Bad Request`. + * + * @example Missing elicitation capability + * {@includeCode ./examples/MissingRequiredClientCapabilityError/missing-elicitation-capability.json} + * + * @category Errors */ -export interface URLElicitationRequiredError extends Omit { - error: Error & { - code: typeof URL_ELICITATION_REQUIRED; - data: { - elicitations: ElicitRequestURLParams[]; - [key: string]: unknown; - }; +export interface MissingRequiredClientCapabilityError extends Omit< + JSONRPCErrorResponse, + "error" +> { + error: Error & { + code: typeof MISSING_REQUIRED_CLIENT_CAPABILITY; + data: { + /** + * The capabilities the server requires from the client to process this request. + */ + requiredCapabilities: ClientCapabilities; }; + }; } /* Empty result */ @@ -349,361 +511,357 @@ export interface URLElicitationRequiredError extends Omit; + const: string; /** - * Optional default value. + * Display label for this option. */ - default?: string; + title: string; + }>; + /** + * Optional default value. + */ + default?: string; } /** * @category `elicitation/create` */ // Combined single selection enumeration -export type SingleSelectEnumSchema = UntitledSingleSelectEnumSchema | TitledSingleSelectEnumSchema; +export type SingleSelectEnumSchema = + UntitledSingleSelectEnumSchema | TitledSingleSelectEnumSchema; /** * Schema for multiple-selection enumeration without display titles for options. @@ -2989,37 +2964,37 @@ export type SingleSelectEnumSchema = UntitledSingleSelectEnumSchema | TitledSing * @category `elicitation/create` */ export interface UntitledMultiSelectEnumSchema { - type: 'array'; + type: "array"; + /** + * Optional title for the enum field. + */ + title?: string; + /** + * Optional description for the enum field. + */ + description?: string; + /** + * Minimum number of items to select. + */ + minItems?: number; + /** + * Maximum number of items to select. + */ + maxItems?: number; + /** + * Schema for the array items. + */ + items: { + type: "string"; /** - * Optional title for the enum field. - */ - title?: string; - /** - * Optional description for the enum field. - */ - description?: string; - /** - * Minimum number of items to select. - */ - minItems?: number; - /** - * Maximum number of items to select. - */ - maxItems?: number; - /** - * Schema for the array items. - */ - items: { - type: 'string'; - /** - * Array of enum values to choose from. - */ - enum: string[]; - }; - /** - * Optional default value. + * Array of enum values to choose from. */ - default?: string[]; + enum: string[]; + }; + /** + * Optional default value. + */ + default?: string[]; } /** @@ -3031,52 +3006,53 @@ export interface UntitledMultiSelectEnumSchema { * @category `elicitation/create` */ export interface TitledMultiSelectEnumSchema { - type: 'array'; - /** - * Optional title for the enum field. - */ - title?: string; - /** - * Optional description for the enum field. - */ - description?: string; - /** - * Minimum number of items to select. - */ - minItems?: number; - /** - * Maximum number of items to select. - */ - maxItems?: number; - /** - * Schema for array items with enum options and display labels. - */ - items: { - /** - * Array of enum options with values and display labels. - */ - anyOf: Array<{ - /** - * The constant enum value. - */ - const: string; - /** - * Display title for this option. - */ - title: string; - }>; - }; + type: "array"; + /** + * Optional title for the enum field. + */ + title?: string; + /** + * Optional description for the enum field. + */ + description?: string; + /** + * Minimum number of items to select. + */ + minItems?: number; + /** + * Maximum number of items to select. + */ + maxItems?: number; + /** + * Schema for array items with enum options and display labels. + */ + items: { /** - * Optional default value. + * Array of enum options with values and display labels. */ - default?: string[]; + anyOf: Array<{ + /** + * The constant enum value. + */ + const: string; + /** + * Display title for this option. + */ + title: string; + }>; + }; + /** + * Optional default value. + */ + default?: string[]; } /** * @category `elicitation/create` */ // Combined multiple selection enumeration -export type MultiSelectEnumSchema = UntitledMultiSelectEnumSchema | TitledMultiSelectEnumSchema; +export type MultiSelectEnumSchema = + UntitledMultiSelectEnumSchema | TitledMultiSelectEnumSchema; /** * Use {@link TitledSingleSelectEnumSchema} instead. @@ -3085,26 +3061,27 @@ export type MultiSelectEnumSchema = UntitledMultiSelectEnumSchema | TitledMultiS * @category `elicitation/create` */ export interface LegacyTitledEnumSchema { - type: 'string'; - title?: string; - description?: string; - enum: string[]; - /** - * (Legacy) Display names for enum values. - * Non-standard according to JSON schema 2020-12. - */ - enumNames?: string[]; - default?: string; + type: "string"; + title?: string; + description?: string; + enum: string[]; + /** + * (Legacy) Display names for enum values. + * Non-standard according to JSON schema 2020-12. + */ + enumNames?: string[]; + default?: string; } /** * @category `elicitation/create` */ // Union type for all enum schemas -export type EnumSchema = SingleSelectEnumSchema | MultiSelectEnumSchema | LegacyTitledEnumSchema; +export type EnumSchema = + SingleSelectEnumSchema | MultiSelectEnumSchema | LegacyTitledEnumSchema; /** - * The result returned by the client for an {@link ElicitRequest | elicitation/create} request. + * The result returned by the client for an {@link ElicitRequest| elicitation/create} request. * * @example Input single field * {@includeCode ./examples/ElicitResult/input-single-field.json} @@ -3117,131 +3094,67 @@ export type EnumSchema = SingleSelectEnumSchema | MultiSelectEnumSchema | Legacy * * @category `elicitation/create` */ -export interface ElicitResult extends Result { - /** - * The user action in response to the elicitation. - * - `"accept"`: User submitted the form/confirmed the action - * - `"decline"`: User explicitly declined the action - * - `"cancel"`: User dismissed without making an explicit choice - */ - action: 'accept' | 'decline' | 'cancel'; - - /** - * The submitted form data, only present when action is `"accept"` and mode was `"form"`. - * Contains values matching the requested schema. - * Omitted for out-of-band mode responses. - */ - content?: { [key: string]: string | number | boolean | string[] }; -} - -/** - * A successful response from the client for a {@link ElicitRequest | elicitation/create} request. - * - * @example Elicitation result response - * {@includeCode ./examples/ElicitResultResponse/elicitation-result-response.json} - * - * @category `elicitation/create` - */ -export interface ElicitResultResponse extends JSONRPCResultResponse { - result: ElicitResult; -} +export interface ElicitResult { + /** + * The user action in response to the elicitation. + * - `"accept"`: User submitted the form/confirmed the action + * - `"decline"`: User explicitly declined the action + * - `"cancel"`: User dismissed without making an explicit choice + */ + action: "accept" | "decline" | "cancel"; -/** - * An optional notification from the server to the client, informing it of a completion of a out-of-band elicitation request. - * - * @example Elicitation complete - * {@includeCode ./examples/ElicitationCompleteNotification/elicitation-complete.json} - * - * @category `notifications/elicitation/complete` - */ -export interface ElicitationCompleteNotification extends JSONRPCNotification { - method: 'notifications/elicitation/complete'; - params: { - /** - * The ID of the elicitation that completed. - */ - elicitationId: string; - }; + /** + * The submitted form data, only present when action is `"accept"` and mode was `"form"`. + * Contains values matching the requested schema. + * Omitted for out-of-band mode responses. + */ + content?: { [key: string]: string | number | boolean | string[] }; } /* Client messages */ /** @internal */ export type ClientRequest = - | PingRequest - | InitializeRequest - | CompleteRequest - | SetLevelRequest - | GetPromptRequest - | ListPromptsRequest - | ListResourcesRequest - | ListResourceTemplatesRequest - | ReadResourceRequest - | SubscribeRequest - | UnsubscribeRequest - | CallToolRequest - | ListToolsRequest - | GetTaskRequest - | GetTaskPayloadRequest - | ListTasksRequest - | CancelTaskRequest; + | DiscoverRequest + | CompleteRequest + | GetPromptRequest + | ListPromptsRequest + | ListResourcesRequest + | ListResourceTemplatesRequest + | ReadResourceRequest + | SubscriptionsListenRequest + | CallToolRequest + | ListToolsRequest; /** @internal */ -export type ClientNotification = - | CancelledNotification - | ProgressNotification - | InitializedNotification - | RootsListChangedNotification - | TaskStatusNotification; +export type ClientNotification = CancelledNotification; /** @internal */ -export type ClientResult = - | EmptyResult - | CreateMessageResult - | ListRootsResult - | ElicitResult - | GetTaskResult - | GetTaskPayloadResult - | ListTasksResult - | CancelTaskResult; +export type ClientResult = EmptyResult; /* Server messages */ -/** @internal */ -export type ServerRequest = - | PingRequest - | CreateMessageRequest - | ListRootsRequest - | ElicitRequest - | GetTaskRequest - | GetTaskPayloadRequest - | ListTasksRequest - | CancelTaskRequest; /** @internal */ export type ServerNotification = - | CancelledNotification - | ProgressNotification - | LoggingMessageNotification - | ResourceUpdatedNotification - | ResourceListChangedNotification - | ToolListChangedNotification - | PromptListChangedNotification - | ElicitationCompleteNotification - | TaskStatusNotification; + | CancelledNotification + | ProgressNotification + | LoggingMessageNotification + | ResourceUpdatedNotification + | ResourceListChangedNotification + | ToolListChangedNotification + | PromptListChangedNotification + | SubscriptionsAcknowledgedNotification; /** @internal */ export type ServerResult = - | EmptyResult - | InitializeResult - | CompleteResult - | GetPromptResult - | ListPromptsResult - | ListResourceTemplatesResult - | ListResourcesResult - | ReadResourceResult - | CallToolResult - | CreateTaskResult - | ListToolsResult - | GetTaskResult - | GetTaskPayloadResult - | ListTasksResult - | CancelTaskResult; + | EmptyResult + | DiscoverResult + | CompleteResult + | GetPromptResult + | ListPromptsResult + | ListResourceTemplatesResult + | ListResourcesResult + | ReadResourceResult + | SubscriptionsListenResult + | CallToolResult + | ListToolsResult + | InputRequiredResult;