Skip to content

Commit 92022da

Browse files
authored
feat: implement default trait for eligible types (#51)
1 parent 95f2c41 commit 92022da

File tree

2 files changed

+77
-77
lines changed

2 files changed

+77
-77
lines changed

src/generated_schema/2024_11_05/mcp_schema.rs

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/// ----------------------------------------------------------------------------
2-
/// This file is auto-generated by mcp-schema-gen v0.1.9.
2+
/// This file is auto-generated by mcp-schema-gen v0.1.10.
33
/// WARNING:
44
/// It is not recommended to modify this file directly. You are free to
55
/// modify or extend the implementations as needed, but please do so at your own risk.
66
///
77
/// Generated from : <https://github.com/modelcontextprotocol/specification.git>
88
/// Hash : bb8f4b7323693910328f72f244352cd71a0689e6
9-
/// Generated at : 2025-03-15 09:27:41
9+
/// Generated at : 2025-03-15 18:47:04
1010
/// ----------------------------------------------------------------------------
1111
///
1212
/// MCP Protocol Version
@@ -54,7 +54,7 @@ pub const INTERNAL_ERROR: i64 = -32603i64;
5454
///}
5555
/// ```
5656
/// </details>
57-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
57+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
5858
pub struct Annotated {
5959
#[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6060
pub annotations: ::std::option::Option<AnnotatedAnnotations>,
@@ -84,7 +84,7 @@ pub struct Annotated {
8484
///}
8585
/// ```
8686
/// </details>
87-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
87+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
8888
pub struct AnnotatedAnnotations {
8989
/**Describes who the intended customer of this object or data is.
9090
It can include multiple entries to indicate content useful for multiple audiences (e.g., ["user", "assistant"]).*/
@@ -439,7 +439,7 @@ pub struct CancelledNotificationParams {
439439
///}
440440
/// ```
441441
/// </details>
442-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
442+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
443443
pub struct ClientCapabilities {
444444
///Experimental, non-standard capabilities that the client supports.
445445
#[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
@@ -469,7 +469,7 @@ pub struct ClientCapabilities {
469469
///}
470470
/// ```
471471
/// </details>
472-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
472+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
473473
pub struct ClientCapabilitiesRoots {
474474
///Whether the client supports notifications for changes to the roots list.
475475
#[serde(rename = "listChanged", default, skip_serializing_if = "::std::option::Option::is_none")]
@@ -1386,7 +1386,7 @@ impl EmbeddedResource {
13861386
///}
13871387
/// ```
13881388
/// </details>
1389-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1389+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
13901390
pub struct EmbeddedResourceAnnotations {
13911391
/**Describes who the intended customer of this object or data is.
13921392
It can include multiple entries to indicate content useful for multiple audiences (e.g., ["user", "assistant"]).*/
@@ -1675,7 +1675,7 @@ impl ImageContent {
16751675
///}
16761676
/// ```
16771677
/// </details>
1678-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1678+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
16791679
pub struct ImageContentAnnotations {
16801680
/**Describes who the intended customer of this object or data is.
16811681
It can include multiple entries to indicate content useful for multiple audiences (e.g., ["user", "assistant"]).*/
@@ -1924,7 +1924,7 @@ impl InitializedNotification {
19241924
///}
19251925
/// ```
19261926
/// </details>
1927-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1927+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
19281928
pub struct InitializedNotificationParams {
19291929
///This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.
19301930
#[serde(rename = "_meta", default, skip_serializing_if = "::std::option::Option::is_none")]
@@ -2155,7 +2155,7 @@ impl JsonrpcNotification {
21552155
///}
21562156
/// ```
21572157
/// </details>
2158-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2158+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
21592159
pub struct JsonrpcNotificationParams {
21602160
///This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.
21612161
#[serde(rename = "_meta", default, skip_serializing_if = "::std::option::Option::is_none")]
@@ -2249,7 +2249,7 @@ impl JsonrpcRequest {
22492249
///}
22502250
/// ```
22512251
/// </details>
2252-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2252+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
22532253
pub struct JsonrpcRequestParams {
22542254
#[serde(rename = "_meta", default, skip_serializing_if = "::std::option::Option::is_none")]
22552255
pub meta: ::std::option::Option<JsonrpcRequestParamsMeta>,
@@ -2272,7 +2272,7 @@ pub struct JsonrpcRequestParams {
22722272
///}
22732273
/// ```
22742274
/// </details>
2275-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2275+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
22762276
pub struct JsonrpcRequestParamsMeta {
22772277
///If specified, the caller is requesting out-of-band progress notifications for this request (as represented by 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.
22782278
#[serde(rename = "progressToken", default, skip_serializing_if = "::std::option::Option::is_none")]
@@ -2386,7 +2386,7 @@ impl ListPromptsRequest {
23862386
///}
23872387
/// ```
23882388
/// </details>
2389-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2389+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
23902390
pub struct ListPromptsRequestParams {
23912391
/**An opaque token representing the current pagination position.
23922392
If provided, the server should return results starting after this cursor.*/
@@ -2497,7 +2497,7 @@ impl ListResourceTemplatesRequest {
24972497
///}
24982498
/// ```
24992499
/// </details>
2500-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2500+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
25012501
pub struct ListResourceTemplatesRequestParams {
25022502
/**An opaque token representing the current pagination position.
25032503
If provided, the server should return results starting after this cursor.*/
@@ -2609,7 +2609,7 @@ impl ListResourcesRequest {
26092609
///}
26102610
/// ```
26112611
/// </details>
2612-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2612+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
26132613
pub struct ListResourcesRequestParams {
26142614
/**An opaque token representing the current pagination position.
26152615
If provided, the server should return results starting after this cursor.*/
@@ -2737,7 +2737,7 @@ impl ListRootsRequest {
27372737
///}
27382738
/// ```
27392739
/// </details>
2740-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2740+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
27412741
pub struct ListRootsRequestParams {
27422742
#[serde(rename = "_meta", default, skip_serializing_if = "::std::option::Option::is_none")]
27432743
pub meta: ::std::option::Option<ListRootsRequestParamsMeta>,
@@ -2760,7 +2760,7 @@ pub struct ListRootsRequestParams {
27602760
///}
27612761
/// ```
27622762
/// </details>
2763-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2763+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
27642764
pub struct ListRootsRequestParamsMeta {
27652765
///If specified, the caller is requesting out-of-band progress notifications for this request (as represented by 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.
27662766
#[serde(rename = "progressToken", default, skip_serializing_if = "::std::option::Option::is_none")]
@@ -2864,7 +2864,7 @@ impl ListToolsRequest {
28642864
///}
28652865
/// ```
28662866
/// </details>
2867-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2867+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
28682868
pub struct ListToolsRequestParams {
28692869
/**An opaque token representing the current pagination position.
28702870
If provided, the server should return results starting after this cursor.*/
@@ -3082,7 +3082,7 @@ to the client to interpret.*/
30823082
///}
30833083
/// ```
30843084
/// </details>
3085-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3085+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
30863086
pub struct ModelHint {
30873087
/**A hint for a model name.
30883088
The client SHOULD treat this as a substring of a model name; for example:
@@ -3140,7 +3140,7 @@ balance them against other considerations.*/
31403140
///}
31413141
/// ```
31423142
/// </details>
3143-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3143+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
31443144
pub struct ModelPreferences {
31453145
#[serde(rename = "costPriority", default, skip_serializing_if = "::std::option::Option::is_none")]
31463146
pub cost_priority: ::std::option::Option<f64>,
@@ -3213,7 +3213,7 @@ pub struct Notification {
32133213
///}
32143214
/// ```
32153215
/// </details>
3216-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3216+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
32173217
pub struct NotificationParams {
32183218
///This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.
32193219
#[serde(rename = "_meta", default, skip_serializing_if = "::std::option::Option::is_none")]
@@ -3270,7 +3270,7 @@ pub struct PaginatedRequest {
32703270
///}
32713271
/// ```
32723272
/// </details>
3273-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3273+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
32743274
pub struct PaginatedRequestParams {
32753275
/**An opaque token representing the current pagination position.
32763276
If provided, the server should return results starting after this cursor.*/
@@ -3298,7 +3298,7 @@ pub struct PaginatedRequestParams {
32983298
///}
32993299
/// ```
33003300
/// </details>
3301-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3301+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
33023302
pub struct PaginatedResult {
33033303
///This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.
33043304
#[serde(rename = "_meta", default, skip_serializing_if = "::std::option::Option::is_none")]
@@ -3382,7 +3382,7 @@ impl PingRequest {
33823382
///}
33833383
/// ```
33843384
/// </details>
3385-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3385+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
33863386
pub struct PingRequestParams {
33873387
#[serde(rename = "_meta", default, skip_serializing_if = "::std::option::Option::is_none")]
33883388
pub meta: ::std::option::Option<PingRequestParamsMeta>,
@@ -3405,7 +3405,7 @@ pub struct PingRequestParams {
34053405
///}
34063406
/// ```
34073407
/// </details>
3408-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3408+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
34093409
pub struct PingRequestParamsMeta {
34103410
///If specified, the caller is requesting out-of-band progress notifications for this request (as represented by 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.
34113411
#[serde(rename = "progressToken", default, skip_serializing_if = "::std::option::Option::is_none")]
@@ -3678,7 +3678,7 @@ impl PromptListChangedNotification {
36783678
///}
36793679
/// ```
36803680
/// </details>
3681-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3681+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
36823682
pub struct PromptListChangedNotificationParams {
36833683
///This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.
36843684
#[serde(rename = "_meta", default, skip_serializing_if = "::std::option::Option::is_none")]
@@ -4046,7 +4046,7 @@ impl ::std::convert::From<i64> for RequestId {
40464046
///}
40474047
/// ```
40484048
/// </details>
4049-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4049+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
40504050
pub struct RequestParams {
40514051
#[serde(rename = "_meta", default, skip_serializing_if = "::std::option::Option::is_none")]
40524052
pub meta: ::std::option::Option<RequestParamsMeta>,
@@ -4069,7 +4069,7 @@ pub struct RequestParams {
40694069
///}
40704070
/// ```
40714071
/// </details>
4072-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4072+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
40734073
pub struct RequestParamsMeta {
40744074
///If specified, the caller is requesting out-of-band progress notifications for this request (as represented by 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.
40754075
#[serde(rename = "progressToken", default, skip_serializing_if = "::std::option::Option::is_none")]
@@ -4177,7 +4177,7 @@ pub struct Resource {
41774177
///}
41784178
/// ```
41794179
/// </details>
4180-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4180+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
41814181
pub struct ResourceAnnotations {
41824182
/**Describes who the intended customer of this object or data is.
41834183
It can include multiple entries to indicate content useful for multiple audiences (e.g., ["user", "assistant"]).*/
@@ -4285,7 +4285,7 @@ impl ResourceListChangedNotification {
42854285
///}
42864286
/// ```
42874287
/// </details>
4288-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4288+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
42894289
pub struct ResourceListChangedNotificationParams {
42904290
///This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.
42914291
#[serde(rename = "_meta", default, skip_serializing_if = "::std::option::Option::is_none")]
@@ -4432,7 +4432,7 @@ pub struct ResourceTemplate {
44324432
///}
44334433
/// ```
44344434
/// </details>
4435-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4435+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
44364436
pub struct ResourceTemplateAnnotations {
44374437
/**Describes who the intended customer of this object or data is.
44384438
It can include multiple entries to indicate content useful for multiple audiences (e.g., ["user", "assistant"]).*/
@@ -4677,7 +4677,7 @@ impl RootsListChangedNotification {
46774677
///}
46784678
/// ```
46794679
/// </details>
4680-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4680+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
46814681
pub struct RootsListChangedNotificationParams {
46824682
///This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.
46834683
#[serde(rename = "_meta", default, skip_serializing_if = "::std::option::Option::is_none")]
@@ -4813,7 +4813,7 @@ impl ::std::convert::From<ImageContent> for SamplingMessageContent {
48134813
///}
48144814
/// ```
48154815
/// </details>
4816-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4816+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
48174817
pub struct ServerCapabilities {
48184818
///Experimental, non-standard capabilities that the server supports.
48194819
#[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
@@ -4847,7 +4847,7 @@ pub struct ServerCapabilities {
48474847
///}
48484848
/// ```
48494849
/// </details>
4850-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4850+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
48514851
pub struct ServerCapabilitiesPrompts {
48524852
///Whether this server supports notifications for changes to the prompt list.
48534853
#[serde(rename = "listChanged", default, skip_serializing_if = "::std::option::Option::is_none")]
@@ -4874,7 +4874,7 @@ pub struct ServerCapabilitiesPrompts {
48744874
///}
48754875
/// ```
48764876
/// </details>
4877-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4877+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
48784878
pub struct ServerCapabilitiesResources {
48794879
///Whether this server supports notifications for changes to the resource list.
48804880
#[serde(rename = "listChanged", default, skip_serializing_if = "::std::option::Option::is_none")]
@@ -4900,7 +4900,7 @@ pub struct ServerCapabilitiesResources {
49004900
///}
49014901
/// ```
49024902
/// </details>
4903-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4903+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
49044904
pub struct ServerCapabilitiesTools {
49054905
///Whether this server supports notifications for changes to the tool list.
49064906
#[serde(rename = "listChanged", default, skip_serializing_if = "::std::option::Option::is_none")]
@@ -5368,7 +5368,7 @@ impl TextContent {
53685368
///}
53695369
/// ```
53705370
/// </details>
5371-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5371+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
53725372
pub struct TextContentAnnotations {
53735373
/**Describes who the intended customer of this object or data is.
53745374
It can include multiple entries to indicate content useful for multiple audiences (e.g., ["user", "assistant"]).*/
@@ -5607,7 +5607,7 @@ impl ToolListChangedNotification {
56075607
///}
56085608
/// ```
56095609
/// </details>
5610-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5610+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
56115611
pub struct ToolListChangedNotificationParams {
56125612
///This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.
56135613
#[serde(rename = "_meta", default, skip_serializing_if = "::std::option::Option::is_none")]

0 commit comments

Comments
 (0)