@@ -75,6 +75,23 @@ import {
7575 JSONRPCNotificationSchema ,
7676 JSONRPCResultResponseSchema ,
7777 JSONRPCErrorResponseSchema ,
78+ // Resource request schemas
79+ ListResourcesRequestSchema ,
80+ ListResourceTemplatesRequestSchema ,
81+ SubscribeRequestSchema ,
82+ UnsubscribeRequestSchema ,
83+ // Prompt request schemas
84+ ListPromptsRequestSchema ,
85+ GetPromptRequestSchema ,
86+ // Tool request schemas
87+ ListToolsRequestSchema ,
88+ // Task request schemas
89+ GetTaskRequestSchema ,
90+ GetTaskPayloadRequestSchema ,
91+ ListTasksRequestSchema ,
92+ CancelTaskRequestSchema ,
93+ // Roots request schema
94+ ListRootsRequestSchema ,
7895} from './generated/sdk.schemas.js' ;
7996
8097// Alias RequestParamsSchema to BaseRequestParamsSchema for internal use
@@ -131,6 +148,18 @@ export {
131148 JSONRPCNotificationSchema ,
132149 JSONRPCResultResponseSchema ,
133150 JSONRPCErrorResponseSchema ,
151+ ListResourcesRequestSchema ,
152+ ListResourceTemplatesRequestSchema ,
153+ SubscribeRequestSchema ,
154+ UnsubscribeRequestSchema ,
155+ ListPromptsRequestSchema ,
156+ GetPromptRequestSchema ,
157+ ListToolsRequestSchema ,
158+ GetTaskRequestSchema ,
159+ GetTaskPayloadRequestSchema ,
160+ ListTasksRequestSchema ,
161+ CancelTaskRequestSchema ,
162+ ListRootsRequestSchema ,
134163} ;
135164
136165export const LATEST_PROTOCOL_VERSION = '2025-11-25' ;
@@ -586,63 +615,28 @@ export const TaskStatusNotificationSchema = NotificationSchema.extend({
586615 params : TaskStatusNotificationParamsSchema
587616} ) ;
588617
589- /**
590- * A request to get the state of a specific task.
591- */
592- export const GetTaskRequestSchema = RequestSchema . extend ( {
593- method : z . literal ( 'tasks/get' ) ,
594- params : BaseRequestParamsSchema . extend ( {
595- taskId : z . string ( )
596- } )
597- } ) ;
618+ // Note: Task request schemas (GetTaskRequestSchema, GetTaskPayloadRequestSchema,
619+ // ListTasksRequestSchema, CancelTaskRequestSchema) are re-exported from generated.
598620
599621/**
600622 * The response to a tasks/get request.
601623 */
602624export const GetTaskResultSchema = ResultSchema . merge ( TaskSchema ) ;
603625
604- /**
605- * A request to get the result of a specific task.
606- */
607- export const GetTaskPayloadRequestSchema = RequestSchema . extend ( {
608- method : z . literal ( 'tasks/result' ) ,
609- params : BaseRequestParamsSchema . extend ( {
610- taskId : z . string ( )
611- } )
612- } ) ;
613-
614626/**
615627 * The response to a tasks/result request.
616628 * The structure matches the result type of the original request.
617629 * For example, a tools/call task would return the CallToolResult structure.
618- *
619630 */
620631export const GetTaskPayloadResultSchema = ResultSchema . loose ( ) ;
621632
622- /**
623- * A request to list tasks.
624- */
625- export const ListTasksRequestSchema = PaginatedRequestSchema . extend ( {
626- method : z . literal ( 'tasks/list' )
627- } ) ;
628-
629633/**
630634 * The response to a tasks/list request.
631635 */
632636export const ListTasksResultSchema = PaginatedResultSchema . extend ( {
633637 tasks : z . array ( TaskSchema )
634638} ) ;
635639
636- /**
637- * A request to cancel a specific task.
638- */
639- export const CancelTaskRequestSchema = RequestSchema . extend ( {
640- method : z . literal ( 'tasks/cancel' ) ,
641- params : BaseRequestParamsSchema . extend ( {
642- taskId : z . string ( )
643- } )
644- } ) ;
645-
646640/**
647641 * The response to a tasks/cancel request.
648642 */
@@ -722,12 +716,8 @@ export const ResourceTemplateSchema = z.object({
722716 _meta : z . optional ( z . looseObject ( { } ) )
723717} ) ;
724718
725- /**
726- * Sent from the client to request a list of resources the server has.
727- */
728- export const ListResourcesRequestSchema = PaginatedRequestSchema . extend ( {
729- method : z . literal ( 'resources/list' )
730- } ) ;
719+ // Note: ListResourcesRequestSchema, ListResourceTemplatesRequestSchema, SubscribeRequestSchema,
720+ // UnsubscribeRequestSchema are re-exported from generated.
731721
732722/**
733723 * The server's response to a resources/list request from the client.
@@ -736,13 +726,6 @@ export const ListResourcesResultSchema = PaginatedResultSchema.extend({
736726 resources : z . array ( ResourceSchema )
737727} ) ;
738728
739- /**
740- * Sent from the client to request a list of resource templates the server has.
741- */
742- export const ListResourceTemplatesRequestSchema = PaginatedRequestSchema . extend ( {
743- method : z . literal ( 'resources/templates/list' )
744- } ) ;
745-
746729/**
747730 * The server's response to a resources/templates/list request from the client.
748731 */
@@ -782,22 +765,7 @@ export const ReadResourceResultSchema = ResultSchema.extend({
782765// Note: ResourceListChangedNotificationSchema is re-exported from generated.
783766
784767export const SubscribeRequestParamsSchema = ResourceRequestParamsSchema ;
785- /**
786- * Sent from the client to request resources/updated notifications from the server whenever a particular resource changes.
787- */
788- export const SubscribeRequestSchema = RequestSchema . extend ( {
789- method : z . literal ( 'resources/subscribe' ) ,
790- params : SubscribeRequestParamsSchema
791- } ) ;
792-
793768export const UnsubscribeRequestParamsSchema = ResourceRequestParamsSchema ;
794- /**
795- * Sent from the client to request cancellation of resources/updated notifications from the server. This should follow a previous resources/subscribe request.
796- */
797- export const UnsubscribeRequestSchema = RequestSchema . extend ( {
798- method : z . literal ( 'resources/unsubscribe' ) ,
799- params : UnsubscribeRequestParamsSchema
800- } ) ;
801769
802770/**
803771 * Parameters for a `notifications/resources/updated` notification.
@@ -857,12 +825,7 @@ export const PromptSchema = z.object({
857825 _meta : z . optional ( z . looseObject ( { } ) )
858826} ) ;
859827
860- /**
861- * Sent from the client to request a list of prompts and prompt templates the server has.
862- */
863- export const ListPromptsRequestSchema = PaginatedRequestSchema . extend ( {
864- method : z . literal ( 'prompts/list' )
865- } ) ;
828+ // Note: ListPromptsRequestSchema, GetPromptRequestSchema are re-exported from generated.
866829
867830/**
868831 * The server's response to a prompts/list request from the client.
@@ -884,13 +847,6 @@ export const GetPromptRequestParamsSchema = BaseRequestParamsSchema.extend({
884847 */
885848 arguments : z . record ( z . string ( ) , z . string ( ) ) . optional ( )
886849} ) ;
887- /**
888- * Used by the client to get a prompt provided by the server.
889- */
890- export const GetPromptRequestSchema = RequestSchema . extend ( {
891- method : z . literal ( 'prompts/get' ) ,
892- params : GetPromptRequestParamsSchema
893- } ) ;
894850
895851// Note: TextContentSchema, ImageContentSchema, AudioContentSchema are re-exported
896852// from generated with Base64 validation for data fields.
@@ -1010,12 +966,7 @@ export const ToolSchema = z.object({
1010966 _meta : z . record ( z . string ( ) , z . unknown ( ) ) . optional ( )
1011967} ) ;
1012968
1013- /**
1014- * Sent from the client to request a list of tools the server has.
1015- */
1016- export const ListToolsRequestSchema = PaginatedRequestSchema . extend ( {
1017- method : z . literal ( 'tools/list' )
1018- } ) ;
969+ // Note: ListToolsRequestSchema is re-exported from generated.
1019970
1020971/**
1021972 * The server's response to a tools/list request from the client.
@@ -1693,14 +1644,7 @@ export const CompleteResultSchema = ResultSchema.extend({
16931644
16941645/* Roots */
16951646// Note: RootSchema is re-exported from generated with .startsWith('file://') validation.
1696-
1697- /**
1698- * Sent from the server to request a list of root URIs from the client.
1699- */
1700- export const ListRootsRequestSchema = RequestSchema . extend ( {
1701- method : z . literal ( 'roots/list' ) ,
1702- params : BaseRequestParamsSchema . optional ( )
1703- } ) ;
1647+ // Note: ListRootsRequestSchema is re-exported from generated.
17041648
17051649/**
17061650 * The client's response to a roots/list request from the server.
0 commit comments