@@ -326,7 +326,7 @@ class InitializeRequest(Request[InitializeRequestParams, Literal["initialize"]])
326
326
to begin initialization.
327
327
"""
328
328
329
- method : Literal ["initialize" ]
329
+ method : Literal ["initialize" ] = "initialize"
330
330
params : InitializeRequestParams
331
331
332
332
@@ -347,7 +347,7 @@ class InitializedNotification(Notification[NotificationParams | None, Literal["n
347
347
finished.
348
348
"""
349
349
350
- method : Literal ["notifications/initialized" ]
350
+ method : Literal ["notifications/initialized" ] = "notifications/initialized"
351
351
params : NotificationParams | None = None
352
352
353
353
@@ -357,7 +357,7 @@ class PingRequest(Request[RequestParams | None, Literal["ping"]]):
357
357
still alive.
358
358
"""
359
359
360
- method : Literal ["ping" ]
360
+ method : Literal ["ping" ] = "ping"
361
361
params : RequestParams | None = None
362
362
363
363
@@ -390,14 +390,14 @@ class ProgressNotification(Notification[ProgressNotificationParams, Literal["not
390
390
long-running request.
391
391
"""
392
392
393
- method : Literal ["notifications/progress" ]
393
+ method : Literal ["notifications/progress" ] = "notifications/progress"
394
394
params : ProgressNotificationParams
395
395
396
396
397
397
class ListResourcesRequest (PaginatedRequest [Literal ["resources/list" ]]):
398
398
"""Sent from the client to request a list of resources the server has."""
399
399
400
- method : Literal ["resources/list" ]
400
+ method : Literal ["resources/list" ] = "resources/list"
401
401
402
402
403
403
class Annotations (BaseModel ):
@@ -464,7 +464,7 @@ class ListResourcesResult(PaginatedResult):
464
464
class ListResourceTemplatesRequest (PaginatedRequest [Literal ["resources/templates/list" ]]):
465
465
"""Sent from the client to request a list of resource templates the server has."""
466
466
467
- method : Literal ["resources/templates/list" ]
467
+ method : Literal ["resources/templates/list" ] = "resources/templates/list"
468
468
469
469
470
470
class ListResourceTemplatesResult (PaginatedResult ):
@@ -487,7 +487,7 @@ class ReadResourceRequestParams(RequestParams):
487
487
class ReadResourceRequest (Request [ReadResourceRequestParams , Literal ["resources/read" ]]):
488
488
"""Sent from the client to the server, to read a specific resource URI."""
489
489
490
- method : Literal ["resources/read" ]
490
+ method : Literal ["resources/read" ] = "resources/read"
491
491
params : ReadResourceRequestParams
492
492
493
493
@@ -537,7 +537,7 @@ class ResourceListChangedNotification(
537
537
of resources it can read from has changed.
538
538
"""
539
539
540
- method : Literal ["notifications/resources/list_changed" ]
540
+ method : Literal ["notifications/resources/list_changed" ] = "notifications/resources/list_changed"
541
541
params : NotificationParams | None = None
542
542
543
543
@@ -558,7 +558,7 @@ class SubscribeRequest(Request[SubscribeRequestParams, Literal["resources/subscr
558
558
whenever a particular resource changes.
559
559
"""
560
560
561
- method : Literal ["resources/subscribe" ]
561
+ method : Literal ["resources/subscribe" ] = "resources/subscribe"
562
562
params : SubscribeRequestParams
563
563
564
564
@@ -576,7 +576,7 @@ class UnsubscribeRequest(Request[UnsubscribeRequestParams, Literal["resources/un
576
576
the server.
577
577
"""
578
578
579
- method : Literal ["resources/unsubscribe" ]
579
+ method : Literal ["resources/unsubscribe" ] = "resources/unsubscribe"
580
580
params : UnsubscribeRequestParams
581
581
582
582
@@ -599,14 +599,14 @@ class ResourceUpdatedNotification(
599
599
changed and may need to be read again.
600
600
"""
601
601
602
- method : Literal ["notifications/resources/updated" ]
602
+ method : Literal ["notifications/resources/updated" ] = "notifications/resources/updated"
603
603
params : ResourceUpdatedNotificationParams
604
604
605
605
606
606
class ListPromptsRequest (PaginatedRequest [Literal ["prompts/list" ]]):
607
607
"""Sent from the client to request a list of prompts and prompt templates."""
608
608
609
- method : Literal ["prompts/list" ]
609
+ method : Literal ["prompts/list" ] = "prompts/list"
610
610
611
611
612
612
class PromptArgument (BaseModel ):
@@ -655,7 +655,7 @@ class GetPromptRequestParams(RequestParams):
655
655
class GetPromptRequest (Request [GetPromptRequestParams , Literal ["prompts/get" ]]):
656
656
"""Used by the client to get a prompt provided by the server."""
657
657
658
- method : Literal ["prompts/get" ]
658
+ method : Literal ["prompts/get" ] = "prompts/get"
659
659
params : GetPromptRequestParams
660
660
661
661
@@ -782,14 +782,14 @@ class PromptListChangedNotification(
782
782
of prompts it offers has changed.
783
783
"""
784
784
785
- method : Literal ["notifications/prompts/list_changed" ]
785
+ method : Literal ["notifications/prompts/list_changed" ] = "notifications/prompts/list_changed"
786
786
params : NotificationParams | None = None
787
787
788
788
789
789
class ListToolsRequest (PaginatedRequest [Literal ["tools/list" ]]):
790
790
"""Sent from the client to request a list of tools the server has."""
791
791
792
- method : Literal ["tools/list" ]
792
+ method : Literal ["tools/list" ] = "tools/list"
793
793
794
794
795
795
class ToolAnnotations (BaseModel ):
@@ -879,7 +879,7 @@ class CallToolRequestParams(RequestParams):
879
879
class CallToolRequest (Request [CallToolRequestParams , Literal ["tools/call" ]]):
880
880
"""Used by the client to invoke a tool provided by the server."""
881
881
882
- method : Literal ["tools/call" ]
882
+ method : Literal ["tools/call" ] = "tools/call"
883
883
params : CallToolRequestParams
884
884
885
885
@@ -898,7 +898,7 @@ class ToolListChangedNotification(Notification[NotificationParams | None, Litera
898
898
of tools it offers has changed.
899
899
"""
900
900
901
- method : Literal ["notifications/tools/list_changed" ]
901
+ method : Literal ["notifications/tools/list_changed" ] = "notifications/tools/list_changed"
902
902
params : NotificationParams | None = None
903
903
904
904
@@ -916,7 +916,7 @@ class SetLevelRequestParams(RequestParams):
916
916
class SetLevelRequest (Request [SetLevelRequestParams , Literal ["logging/setLevel" ]]):
917
917
"""A request from the client to the server, to enable or adjust logging."""
918
918
919
- method : Literal ["logging/setLevel" ]
919
+ method : Literal ["logging/setLevel" ] = "logging/setLevel"
920
920
params : SetLevelRequestParams
921
921
922
922
@@ -938,7 +938,7 @@ class LoggingMessageNotificationParams(NotificationParams):
938
938
class LoggingMessageNotification (Notification [LoggingMessageNotificationParams , Literal ["notifications/message" ]]):
939
939
"""Notification of a log message passed from server to client."""
940
940
941
- method : Literal ["notifications/message" ]
941
+ method : Literal ["notifications/message" ] = "notifications/message"
942
942
params : LoggingMessageNotificationParams
943
943
944
944
@@ -1033,7 +1033,7 @@ class CreateMessageRequestParams(RequestParams):
1033
1033
class CreateMessageRequest (Request [CreateMessageRequestParams , Literal ["sampling/createMessage" ]]):
1034
1034
"""A request from the server to sample an LLM via the client."""
1035
1035
1036
- method : Literal ["sampling/createMessage" ]
1036
+ method : Literal ["sampling/createMessage" ] = "sampling/createMessage"
1037
1037
params : CreateMessageRequestParams
1038
1038
1039
1039
@@ -1105,7 +1105,7 @@ class CompleteRequestParams(RequestParams):
1105
1105
class CompleteRequest (Request [CompleteRequestParams , Literal ["completion/complete" ]]):
1106
1106
"""A request from the client to the server, to ask for completion options."""
1107
1107
1108
- method : Literal ["completion/complete" ]
1108
+ method : Literal ["completion/complete" ] = "completion/complete"
1109
1109
params : CompleteRequestParams
1110
1110
1111
1111
@@ -1144,7 +1144,7 @@ class ListRootsRequest(Request[RequestParams | None, Literal["roots/list"]]):
1144
1144
structure or access specific locations that the client has permission to read from.
1145
1145
"""
1146
1146
1147
- method : Literal ["roots/list" ]
1147
+ method : Literal ["roots/list" ] = "roots/list"
1148
1148
params : RequestParams | None = None
1149
1149
1150
1150
@@ -1193,7 +1193,7 @@ class RootsListChangedNotification(
1193
1193
using the ListRootsRequest.
1194
1194
"""
1195
1195
1196
- method : Literal ["notifications/roots/list_changed" ]
1196
+ method : Literal ["notifications/roots/list_changed" ] = "notifications/roots/list_changed"
1197
1197
params : NotificationParams | None = None
1198
1198
1199
1199
@@ -1213,7 +1213,7 @@ class CancelledNotification(Notification[CancelledNotificationParams, Literal["n
1213
1213
previously-issued request.
1214
1214
"""
1215
1215
1216
- method : Literal ["notifications/cancelled" ]
1216
+ method : Literal ["notifications/cancelled" ] = "notifications/cancelled"
1217
1217
params : CancelledNotificationParams
1218
1218
1219
1219
@@ -1259,7 +1259,7 @@ class ElicitRequestParams(RequestParams):
1259
1259
class ElicitRequest (Request [ElicitRequestParams , Literal ["elicitation/create" ]]):
1260
1260
"""A request from the server to elicit information from the client."""
1261
1261
1262
- method : Literal ["elicitation/create" ]
1262
+ method : Literal ["elicitation/create" ] = "elicitation/create"
1263
1263
params : ElicitRequestParams
1264
1264
1265
1265
0 commit comments