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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 28 additions & 19 deletions src/spec.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
/* JSON-RPC types */
/**
* This file is automatically generated from the Model Context Protocol specification.
*
* Source: https://github.com/modelcontextprotocol/modelcontextprotocol
* Pulled from: https://raw.githubusercontent.com/modelcontextprotocol/modelcontextprotocol/main/schema/draft/schema.ts
* Last updated from commit: 35fa160caf287a9c48696e3ae452c0645c713669
*
* DO NOT EDIT THIS FILE MANUALLY. Changes will be overwritten by automated updates.
* To update this file, run: npm run fetch:spec-types
*//* JSON-RPC types */

/**
* Refers to any valid JSON-RPC object that can be decoded off the wire, or encoded to be sent.
Expand All @@ -11,7 +20,7 @@ export type JSONRPCMessage =
| JSONRPCResponse;

/** @internal */
export const LATEST_PROTOCOL_VERSION = "2025-11-25";
export const LATEST_PROTOCOL_VERSION = "DRAFT-2026-v1";
/** @internal */
export const JSONRPC_VERSION = "2.0";

Expand Down Expand Up @@ -52,7 +61,7 @@ export interface TaskAugmentedRequestParams extends RequestParams {
*/
export interface RequestParams {
/**
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
*/
_meta?: {
/**
Expand All @@ -74,7 +83,7 @@ export interface Request {
/** @internal */
export interface NotificationParams {
/**
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
*/
_meta?: { [key: string]: unknown };
}
Expand All @@ -92,7 +101,7 @@ export interface Notification {
*/
export interface Result {
/**
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
*/
_meta?: { [key: string]: unknown };
[key: string]: unknown;
Expand Down Expand Up @@ -830,7 +839,7 @@ export interface Resource extends BaseMetadata, Icons {
size?: number;

/**
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
*/
_meta?: { [key: string]: unknown };
}
Expand Down Expand Up @@ -866,7 +875,7 @@ export interface ResourceTemplate extends BaseMetadata, Icons {
annotations?: Annotations;

/**
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
*/
_meta?: { [key: string]: unknown };
}
Expand All @@ -889,7 +898,7 @@ export interface ResourceContents {
mimeType?: string;

/**
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
*/
_meta?: { [key: string]: unknown };
}
Expand Down Expand Up @@ -991,7 +1000,7 @@ export interface Prompt extends BaseMetadata, Icons {
arguments?: PromptArgument[];

/**
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
*/
_meta?: { [key: string]: unknown };
}
Expand Down Expand Up @@ -1061,7 +1070,7 @@ export interface EmbeddedResource {
annotations?: Annotations;

/**
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
*/
_meta?: { [key: string]: unknown };
}
Expand Down Expand Up @@ -1289,7 +1298,7 @@ export interface Tool extends BaseMetadata, Icons {
annotations?: ToolAnnotations;

/**
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
*/
_meta?: { [key: string]: unknown };
}
Expand Down Expand Up @@ -1679,7 +1688,7 @@ export interface SamplingMessage {
role: Role;
content: SamplingMessageContentBlock | SamplingMessageContentBlock[];
/**
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
*/
_meta?: { [key: string]: unknown };
}
Expand Down Expand Up @@ -1756,7 +1765,7 @@ export interface TextContent {
annotations?: Annotations;

/**
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
*/
_meta?: { [key: string]: unknown };
}
Expand Down Expand Up @@ -1787,7 +1796,7 @@ export interface ImageContent {
annotations?: Annotations;

/**
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
*/
_meta?: { [key: string]: unknown };
}
Expand Down Expand Up @@ -1818,7 +1827,7 @@ export interface AudioContent {
annotations?: Annotations;

/**
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
*/
_meta?: { [key: string]: unknown };
}
Expand Down Expand Up @@ -1852,7 +1861,7 @@ export interface ToolUseContent {
* Optional metadata about the tool use. Clients SHOULD preserve this field when
* including tool uses in subsequent sampling requests to enable caching optimizations.
*
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
*/
_meta?: { [key: string]: unknown };
}
Expand Down Expand Up @@ -1899,7 +1908,7 @@ export interface ToolResultContent {
* Optional metadata about the tool result. Clients SHOULD preserve this field when
* including tool results in subsequent sampling requests to enable caching optimizations.
*
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
*/
_meta?: { [key: string]: unknown };
}
Expand Down Expand Up @@ -2127,7 +2136,7 @@ export interface Root {
name?: string;

/**
* See [General fields: `_meta`](/specification/2025-11-25/basic/index#meta) for notes on `_meta` usage.
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
*/
_meta?: { [key: string]: unknown };
}
Expand Down Expand Up @@ -2575,4 +2584,4 @@ export type ServerResult =
| GetTaskResult
| GetTaskPayloadResult
| ListTasksResult
| CancelTaskResult;
| CancelTaskResult;
2 changes: 1 addition & 1 deletion test/server/streamableHttp.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2285,7 +2285,7 @@ describe.each(zodTestMatrix)('$zodVersionLabel', (entry: ZodMatrixEntry) => {

// Verify we received the notification that was sent while disconnected
expect(allText).toContain('Missed while disconnected');
}, 15000);
}, 10000);
});

// Test onsessionclosed callback
Expand Down
1 change: 0 additions & 1 deletion test/spec.types.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,6 @@ describe('Spec Types', () => {
}
}

console.log(missingTests);
expect(missingTests).toHaveLength(0);
});

Expand Down
Loading