@workday/canvas-kit-mcp 14.1.19 → 15.0.0-alpha.0008-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +259 -434
- package/dist/cli.js.map +3 -3
- package/dist/index.js +259 -434
- package/dist/index.js.map +3 -3
- package/dist/lib/upgrade-guides/14.0-UPGRADE-GUIDE.md +15 -22
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -10837,42 +10837,38 @@ var NEVER = INVALID;
|
|
|
10837
10837
|
var LATEST_PROTOCOL_VERSION = "2025-06-18";
|
|
10838
10838
|
var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-03-26", "2024-11-05", "2024-10-07"];
|
|
10839
10839
|
var JSONRPC_VERSION = "2.0";
|
|
10840
|
-
var AssertObjectSchema = external_exports.custom((v) => v !== null && (typeof v === "object" || typeof v === "function"));
|
|
10841
10840
|
var ProgressTokenSchema = external_exports.union([external_exports.string(), external_exports.number().int()]);
|
|
10842
10841
|
var CursorSchema = external_exports.string();
|
|
10843
10842
|
var RequestMetaSchema = external_exports.object({
|
|
10844
10843
|
/**
|
|
10845
10844
|
* 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.
|
|
10846
10845
|
*/
|
|
10847
|
-
progressToken:
|
|
10846
|
+
progressToken: external_exports.optional(ProgressTokenSchema)
|
|
10848
10847
|
}).passthrough();
|
|
10849
10848
|
var BaseRequestParamsSchema = external_exports.object({
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
*/
|
|
10853
|
-
_meta: RequestMetaSchema.optional()
|
|
10854
|
-
});
|
|
10849
|
+
_meta: external_exports.optional(RequestMetaSchema)
|
|
10850
|
+
}).passthrough();
|
|
10855
10851
|
var RequestSchema = external_exports.object({
|
|
10856
10852
|
method: external_exports.string(),
|
|
10857
|
-
params:
|
|
10853
|
+
params: external_exports.optional(BaseRequestParamsSchema)
|
|
10858
10854
|
});
|
|
10859
|
-
var
|
|
10855
|
+
var BaseNotificationParamsSchema = external_exports.object({
|
|
10860
10856
|
/**
|
|
10861
10857
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
10862
10858
|
* for notes on _meta usage.
|
|
10863
10859
|
*/
|
|
10864
|
-
_meta: external_exports.
|
|
10865
|
-
});
|
|
10860
|
+
_meta: external_exports.optional(external_exports.object({}).passthrough())
|
|
10861
|
+
}).passthrough();
|
|
10866
10862
|
var NotificationSchema = external_exports.object({
|
|
10867
10863
|
method: external_exports.string(),
|
|
10868
|
-
params:
|
|
10864
|
+
params: external_exports.optional(BaseNotificationParamsSchema)
|
|
10869
10865
|
});
|
|
10870
10866
|
var ResultSchema = external_exports.object({
|
|
10871
10867
|
/**
|
|
10872
10868
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
10873
10869
|
* for notes on _meta usage.
|
|
10874
10870
|
*/
|
|
10875
|
-
_meta: external_exports.
|
|
10871
|
+
_meta: external_exports.optional(external_exports.object({}).passthrough())
|
|
10876
10872
|
}).passthrough();
|
|
10877
10873
|
var RequestIdSchema = external_exports.union([external_exports.string(), external_exports.number().int()]);
|
|
10878
10874
|
var JSONRPCRequestSchema = external_exports.object({
|
|
@@ -10921,21 +10917,20 @@ var JSONRPCErrorSchema = external_exports.object({
|
|
|
10921
10917
|
var isJSONRPCError = (value) => JSONRPCErrorSchema.safeParse(value).success;
|
|
10922
10918
|
var JSONRPCMessageSchema = external_exports.union([JSONRPCRequestSchema, JSONRPCNotificationSchema, JSONRPCResponseSchema, JSONRPCErrorSchema]);
|
|
10923
10919
|
var EmptyResultSchema = ResultSchema.strict();
|
|
10924
|
-
var CancelledNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
10925
|
-
/**
|
|
10926
|
-
* The ID of the request to cancel.
|
|
10927
|
-
*
|
|
10928
|
-
* This MUST correspond to the ID of a request previously issued in the same direction.
|
|
10929
|
-
*/
|
|
10930
|
-
requestId: RequestIdSchema,
|
|
10931
|
-
/**
|
|
10932
|
-
* An optional string describing the reason for the cancellation. This MAY be logged or presented to the user.
|
|
10933
|
-
*/
|
|
10934
|
-
reason: external_exports.string().optional()
|
|
10935
|
-
});
|
|
10936
10920
|
var CancelledNotificationSchema = NotificationSchema.extend({
|
|
10937
10921
|
method: external_exports.literal("notifications/cancelled"),
|
|
10938
|
-
params:
|
|
10922
|
+
params: BaseNotificationParamsSchema.extend({
|
|
10923
|
+
/**
|
|
10924
|
+
* The ID of the request to cancel.
|
|
10925
|
+
*
|
|
10926
|
+
* This MUST correspond to the ID of a request previously issued in the same direction.
|
|
10927
|
+
*/
|
|
10928
|
+
requestId: RequestIdSchema,
|
|
10929
|
+
/**
|
|
10930
|
+
* An optional string describing the reason for the cancellation. This MAY be logged or presented to the user.
|
|
10931
|
+
*/
|
|
10932
|
+
reason: external_exports.string().optional()
|
|
10933
|
+
})
|
|
10939
10934
|
});
|
|
10940
10935
|
var IconSchema = external_exports.object({
|
|
10941
10936
|
/**
|
|
@@ -10945,15 +10940,15 @@ var IconSchema = external_exports.object({
|
|
|
10945
10940
|
/**
|
|
10946
10941
|
* Optional MIME type for the icon.
|
|
10947
10942
|
*/
|
|
10948
|
-
mimeType: external_exports.
|
|
10943
|
+
mimeType: external_exports.optional(external_exports.string()),
|
|
10949
10944
|
/**
|
|
10950
10945
|
* Optional array of strings that specify sizes at which the icon can be used.
|
|
10951
10946
|
* Each string should be in WxH format (e.g., `"48x48"`, `"96x96"`) or `"any"` for scalable formats like SVG.
|
|
10952
10947
|
*
|
|
10953
10948
|
* If not provided, the client should assume that the icon can be used at any size.
|
|
10954
10949
|
*/
|
|
10955
|
-
sizes: external_exports.array(external_exports.string())
|
|
10956
|
-
});
|
|
10950
|
+
sizes: external_exports.optional(external_exports.array(external_exports.string()))
|
|
10951
|
+
}).passthrough();
|
|
10957
10952
|
var IconsSchema = external_exports.object({
|
|
10958
10953
|
/**
|
|
10959
10954
|
* Optional set of sized icons that the client can display in a user interface.
|
|
@@ -10967,7 +10962,7 @@ var IconsSchema = external_exports.object({
|
|
|
10967
10962
|
* - `image/webp` - WebP images (modern, efficient format)
|
|
10968
10963
|
*/
|
|
10969
10964
|
icons: external_exports.array(IconSchema).optional()
|
|
10970
|
-
});
|
|
10965
|
+
}).passthrough();
|
|
10971
10966
|
var BaseMetadataSchema = external_exports.object({
|
|
10972
10967
|
/** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
|
|
10973
10968
|
name: external_exports.string(),
|
|
@@ -10979,68 +10974,62 @@ var BaseMetadataSchema = external_exports.object({
|
|
|
10979
10974
|
* where `annotations.title` should be given precedence over using `name`,
|
|
10980
10975
|
* if present).
|
|
10981
10976
|
*/
|
|
10982
|
-
title: external_exports.
|
|
10983
|
-
});
|
|
10977
|
+
title: external_exports.optional(external_exports.string())
|
|
10978
|
+
}).passthrough();
|
|
10984
10979
|
var ImplementationSchema = BaseMetadataSchema.extend({
|
|
10985
10980
|
version: external_exports.string(),
|
|
10986
10981
|
/**
|
|
10987
10982
|
* An optional URL of the website for this implementation.
|
|
10988
10983
|
*/
|
|
10989
|
-
websiteUrl: external_exports.
|
|
10984
|
+
websiteUrl: external_exports.optional(external_exports.string())
|
|
10990
10985
|
}).merge(IconsSchema);
|
|
10991
10986
|
var ClientCapabilitiesSchema = external_exports.object({
|
|
10992
10987
|
/**
|
|
10993
10988
|
* Experimental, non-standard capabilities that the client supports.
|
|
10994
10989
|
*/
|
|
10995
|
-
experimental: external_exports.
|
|
10990
|
+
experimental: external_exports.optional(external_exports.object({}).passthrough()),
|
|
10996
10991
|
/**
|
|
10997
10992
|
* Present if the client supports sampling from an LLM.
|
|
10998
10993
|
*/
|
|
10999
|
-
sampling:
|
|
10994
|
+
sampling: external_exports.optional(external_exports.object({}).passthrough()),
|
|
11000
10995
|
/**
|
|
11001
10996
|
* Present if the client supports eliciting user input.
|
|
11002
10997
|
*/
|
|
11003
|
-
elicitation: external_exports.
|
|
11004
|
-
/**
|
|
11005
|
-
* Whether the client should apply defaults to the user input.
|
|
11006
|
-
*/
|
|
11007
|
-
applyDefaults: external_exports.boolean().optional()
|
|
11008
|
-
}).optional(), external_exports.record(external_exports.string(), external_exports.unknown()).optional()),
|
|
10998
|
+
elicitation: external_exports.optional(external_exports.object({}).passthrough()),
|
|
11009
10999
|
/**
|
|
11010
11000
|
* Present if the client supports listing roots.
|
|
11011
11001
|
*/
|
|
11012
|
-
roots: external_exports.object({
|
|
11002
|
+
roots: external_exports.optional(external_exports.object({
|
|
11013
11003
|
/**
|
|
11014
11004
|
* Whether the client supports issuing notifications for changes to the roots list.
|
|
11015
11005
|
*/
|
|
11016
|
-
listChanged: external_exports.
|
|
11017
|
-
}).
|
|
11018
|
-
});
|
|
11019
|
-
var InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
11020
|
-
/**
|
|
11021
|
-
* The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well.
|
|
11022
|
-
*/
|
|
11023
|
-
protocolVersion: external_exports.string(),
|
|
11024
|
-
capabilities: ClientCapabilitiesSchema,
|
|
11025
|
-
clientInfo: ImplementationSchema
|
|
11026
|
-
});
|
|
11006
|
+
listChanged: external_exports.optional(external_exports.boolean())
|
|
11007
|
+
}).passthrough())
|
|
11008
|
+
}).passthrough();
|
|
11027
11009
|
var InitializeRequestSchema = RequestSchema.extend({
|
|
11028
11010
|
method: external_exports.literal("initialize"),
|
|
11029
|
-
params:
|
|
11011
|
+
params: BaseRequestParamsSchema.extend({
|
|
11012
|
+
/**
|
|
11013
|
+
* The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well.
|
|
11014
|
+
*/
|
|
11015
|
+
protocolVersion: external_exports.string(),
|
|
11016
|
+
capabilities: ClientCapabilitiesSchema,
|
|
11017
|
+
clientInfo: ImplementationSchema
|
|
11018
|
+
})
|
|
11030
11019
|
});
|
|
11031
11020
|
var ServerCapabilitiesSchema = external_exports.object({
|
|
11032
11021
|
/**
|
|
11033
11022
|
* Experimental, non-standard capabilities that the server supports.
|
|
11034
11023
|
*/
|
|
11035
|
-
experimental: external_exports.
|
|
11024
|
+
experimental: external_exports.optional(external_exports.object({}).passthrough()),
|
|
11036
11025
|
/**
|
|
11037
11026
|
* Present if the server supports sending log messages to the client.
|
|
11038
11027
|
*/
|
|
11039
|
-
logging:
|
|
11028
|
+
logging: external_exports.optional(external_exports.object({}).passthrough()),
|
|
11040
11029
|
/**
|
|
11041
11030
|
* Present if the server supports sending completions to the client.
|
|
11042
11031
|
*/
|
|
11043
|
-
completions:
|
|
11032
|
+
completions: external_exports.optional(external_exports.object({}).passthrough()),
|
|
11044
11033
|
/**
|
|
11045
11034
|
* Present if the server offers any prompt templates.
|
|
11046
11035
|
*/
|
|
@@ -11049,30 +11038,30 @@ var ServerCapabilitiesSchema = external_exports.object({
|
|
|
11049
11038
|
* Whether this server supports issuing notifications for changes to the prompt list.
|
|
11050
11039
|
*/
|
|
11051
11040
|
listChanged: external_exports.optional(external_exports.boolean())
|
|
11052
|
-
})),
|
|
11041
|
+
}).passthrough()),
|
|
11053
11042
|
/**
|
|
11054
11043
|
* Present if the server offers any resources to read.
|
|
11055
11044
|
*/
|
|
11056
|
-
resources: external_exports.object({
|
|
11045
|
+
resources: external_exports.optional(external_exports.object({
|
|
11057
11046
|
/**
|
|
11058
11047
|
* Whether this server supports clients subscribing to resource updates.
|
|
11059
11048
|
*/
|
|
11060
|
-
subscribe: external_exports.
|
|
11049
|
+
subscribe: external_exports.optional(external_exports.boolean()),
|
|
11061
11050
|
/**
|
|
11062
11051
|
* Whether this server supports issuing notifications for changes to the resource list.
|
|
11063
11052
|
*/
|
|
11064
|
-
listChanged: external_exports.
|
|
11065
|
-
}).
|
|
11053
|
+
listChanged: external_exports.optional(external_exports.boolean())
|
|
11054
|
+
}).passthrough()),
|
|
11066
11055
|
/**
|
|
11067
11056
|
* Present if the server offers any tools to call.
|
|
11068
11057
|
*/
|
|
11069
|
-
tools: external_exports.object({
|
|
11058
|
+
tools: external_exports.optional(external_exports.object({
|
|
11070
11059
|
/**
|
|
11071
11060
|
* Whether this server supports issuing notifications for changes to the tool list.
|
|
11072
11061
|
*/
|
|
11073
|
-
listChanged: external_exports.
|
|
11074
|
-
}).
|
|
11075
|
-
});
|
|
11062
|
+
listChanged: external_exports.optional(external_exports.boolean())
|
|
11063
|
+
}).passthrough())
|
|
11064
|
+
}).passthrough();
|
|
11076
11065
|
var InitializeResultSchema = ResultSchema.extend({
|
|
11077
11066
|
/**
|
|
11078
11067
|
* The version of the Model Context Protocol that the server wants to use. This may not match the version that the client requested. If the client cannot support this version, it MUST disconnect.
|
|
@@ -11085,7 +11074,7 @@ var InitializeResultSchema = ResultSchema.extend({
|
|
|
11085
11074
|
*
|
|
11086
11075
|
* This can be used by clients to improve the LLM's understanding of available tools, resources, etc. It can be thought of like a "hint" to the model. For example, this information MAY be added to the system prompt.
|
|
11087
11076
|
*/
|
|
11088
|
-
instructions: external_exports.
|
|
11077
|
+
instructions: external_exports.optional(external_exports.string())
|
|
11089
11078
|
});
|
|
11090
11079
|
var InitializedNotificationSchema = NotificationSchema.extend({
|
|
11091
11080
|
method: external_exports.literal("notifications/initialized")
|
|
@@ -11106,26 +11095,24 @@ var ProgressSchema = external_exports.object({
|
|
|
11106
11095
|
* An optional message describing the current progress.
|
|
11107
11096
|
*/
|
|
11108
11097
|
message: external_exports.optional(external_exports.string())
|
|
11109
|
-
});
|
|
11110
|
-
var ProgressNotificationParamsSchema = NotificationsParamsSchema.merge(ProgressSchema).extend({
|
|
11111
|
-
/**
|
|
11112
|
-
* The progress token which was given in the initial request, used to associate this notification with the request that is proceeding.
|
|
11113
|
-
*/
|
|
11114
|
-
progressToken: ProgressTokenSchema
|
|
11115
|
-
});
|
|
11098
|
+
}).passthrough();
|
|
11116
11099
|
var ProgressNotificationSchema = NotificationSchema.extend({
|
|
11117
11100
|
method: external_exports.literal("notifications/progress"),
|
|
11118
|
-
params:
|
|
11119
|
-
|
|
11120
|
-
|
|
11121
|
-
|
|
11122
|
-
|
|
11123
|
-
|
|
11124
|
-
*/
|
|
11125
|
-
cursor: CursorSchema.optional()
|
|
11101
|
+
params: BaseNotificationParamsSchema.merge(ProgressSchema).extend({
|
|
11102
|
+
/**
|
|
11103
|
+
* The progress token which was given in the initial request, used to associate this notification with the request that is proceeding.
|
|
11104
|
+
*/
|
|
11105
|
+
progressToken: ProgressTokenSchema
|
|
11106
|
+
})
|
|
11126
11107
|
});
|
|
11127
11108
|
var PaginatedRequestSchema = RequestSchema.extend({
|
|
11128
|
-
params:
|
|
11109
|
+
params: BaseRequestParamsSchema.extend({
|
|
11110
|
+
/**
|
|
11111
|
+
* An opaque token representing the current pagination position.
|
|
11112
|
+
* If provided, the server should return results starting after this cursor.
|
|
11113
|
+
*/
|
|
11114
|
+
cursor: external_exports.optional(CursorSchema)
|
|
11115
|
+
}).optional()
|
|
11129
11116
|
});
|
|
11130
11117
|
var PaginatedResultSchema = ResultSchema.extend({
|
|
11131
11118
|
/**
|
|
@@ -11147,8 +11134,8 @@ var ResourceContentsSchema = external_exports.object({
|
|
|
11147
11134
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
11148
11135
|
* for notes on _meta usage.
|
|
11149
11136
|
*/
|
|
11150
|
-
_meta: external_exports.
|
|
11151
|
-
});
|
|
11137
|
+
_meta: external_exports.optional(external_exports.object({}).passthrough())
|
|
11138
|
+
}).passthrough();
|
|
11152
11139
|
var TextResourceContentsSchema = ResourceContentsSchema.extend({
|
|
11153
11140
|
/**
|
|
11154
11141
|
* The text of the item. This must only be set if the item can actually be represented as text (not binary data).
|
|
@@ -11223,18 +11210,14 @@ var ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({
|
|
|
11223
11210
|
var ListResourceTemplatesResultSchema = PaginatedResultSchema.extend({
|
|
11224
11211
|
resourceTemplates: external_exports.array(ResourceTemplateSchema)
|
|
11225
11212
|
});
|
|
11226
|
-
var ResourceRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
11227
|
-
/**
|
|
11228
|
-
* The URI of the resource to read. The URI can use any protocol; it is up to the server how to interpret it.
|
|
11229
|
-
*
|
|
11230
|
-
* @format uri
|
|
11231
|
-
*/
|
|
11232
|
-
uri: external_exports.string()
|
|
11233
|
-
});
|
|
11234
|
-
var ReadResourceRequestParamsSchema = ResourceRequestParamsSchema;
|
|
11235
11213
|
var ReadResourceRequestSchema = RequestSchema.extend({
|
|
11236
11214
|
method: external_exports.literal("resources/read"),
|
|
11237
|
-
params:
|
|
11215
|
+
params: BaseRequestParamsSchema.extend({
|
|
11216
|
+
/**
|
|
11217
|
+
* The URI of the resource to read. The URI can use any protocol; it is up to the server how to interpret it.
|
|
11218
|
+
*/
|
|
11219
|
+
uri: external_exports.string()
|
|
11220
|
+
})
|
|
11238
11221
|
});
|
|
11239
11222
|
var ReadResourceResultSchema = ResultSchema.extend({
|
|
11240
11223
|
contents: external_exports.array(external_exports.union([TextResourceContentsSchema, BlobResourceContentsSchema]))
|
|
@@ -11242,25 +11225,32 @@ var ReadResourceResultSchema = ResultSchema.extend({
|
|
|
11242
11225
|
var ResourceListChangedNotificationSchema = NotificationSchema.extend({
|
|
11243
11226
|
method: external_exports.literal("notifications/resources/list_changed")
|
|
11244
11227
|
});
|
|
11245
|
-
var SubscribeRequestParamsSchema = ResourceRequestParamsSchema;
|
|
11246
11228
|
var SubscribeRequestSchema = RequestSchema.extend({
|
|
11247
11229
|
method: external_exports.literal("resources/subscribe"),
|
|
11248
|
-
params:
|
|
11230
|
+
params: BaseRequestParamsSchema.extend({
|
|
11231
|
+
/**
|
|
11232
|
+
* The URI of the resource to subscribe to. The URI can use any protocol; it is up to the server how to interpret it.
|
|
11233
|
+
*/
|
|
11234
|
+
uri: external_exports.string()
|
|
11235
|
+
})
|
|
11249
11236
|
});
|
|
11250
|
-
var UnsubscribeRequestParamsSchema = ResourceRequestParamsSchema;
|
|
11251
11237
|
var UnsubscribeRequestSchema = RequestSchema.extend({
|
|
11252
11238
|
method: external_exports.literal("resources/unsubscribe"),
|
|
11253
|
-
params:
|
|
11254
|
-
|
|
11255
|
-
|
|
11256
|
-
|
|
11257
|
-
|
|
11258
|
-
|
|
11259
|
-
uri: external_exports.string()
|
|
11239
|
+
params: BaseRequestParamsSchema.extend({
|
|
11240
|
+
/**
|
|
11241
|
+
* The URI of the resource to unsubscribe from.
|
|
11242
|
+
*/
|
|
11243
|
+
uri: external_exports.string()
|
|
11244
|
+
})
|
|
11260
11245
|
});
|
|
11261
11246
|
var ResourceUpdatedNotificationSchema = NotificationSchema.extend({
|
|
11262
11247
|
method: external_exports.literal("notifications/resources/updated"),
|
|
11263
|
-
params:
|
|
11248
|
+
params: BaseNotificationParamsSchema.extend({
|
|
11249
|
+
/**
|
|
11250
|
+
* The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to.
|
|
11251
|
+
*/
|
|
11252
|
+
uri: external_exports.string()
|
|
11253
|
+
})
|
|
11264
11254
|
});
|
|
11265
11255
|
var PromptArgumentSchema = external_exports.object({
|
|
11266
11256
|
/**
|
|
@@ -11275,7 +11265,7 @@ var PromptArgumentSchema = external_exports.object({
|
|
|
11275
11265
|
* Whether this argument must be provided.
|
|
11276
11266
|
*/
|
|
11277
11267
|
required: external_exports.optional(external_exports.boolean())
|
|
11278
|
-
});
|
|
11268
|
+
}).passthrough();
|
|
11279
11269
|
var PromptSchema = BaseMetadataSchema.extend({
|
|
11280
11270
|
/**
|
|
11281
11271
|
* An optional description of what this prompt provides
|
|
@@ -11297,19 +11287,18 @@ var ListPromptsRequestSchema = PaginatedRequestSchema.extend({
|
|
|
11297
11287
|
var ListPromptsResultSchema = PaginatedResultSchema.extend({
|
|
11298
11288
|
prompts: external_exports.array(PromptSchema)
|
|
11299
11289
|
});
|
|
11300
|
-
var GetPromptRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
11301
|
-
/**
|
|
11302
|
-
* The name of the prompt or prompt template.
|
|
11303
|
-
*/
|
|
11304
|
-
name: external_exports.string(),
|
|
11305
|
-
/**
|
|
11306
|
-
* Arguments to use for templating the prompt.
|
|
11307
|
-
*/
|
|
11308
|
-
arguments: external_exports.record(external_exports.string(), external_exports.string()).optional()
|
|
11309
|
-
});
|
|
11310
11290
|
var GetPromptRequestSchema = RequestSchema.extend({
|
|
11311
11291
|
method: external_exports.literal("prompts/get"),
|
|
11312
|
-
params:
|
|
11292
|
+
params: BaseRequestParamsSchema.extend({
|
|
11293
|
+
/**
|
|
11294
|
+
* The name of the prompt or prompt template.
|
|
11295
|
+
*/
|
|
11296
|
+
name: external_exports.string(),
|
|
11297
|
+
/**
|
|
11298
|
+
* Arguments to use for templating the prompt.
|
|
11299
|
+
*/
|
|
11300
|
+
arguments: external_exports.optional(external_exports.record(external_exports.string()))
|
|
11301
|
+
})
|
|
11313
11302
|
});
|
|
11314
11303
|
var TextContentSchema = external_exports.object({
|
|
11315
11304
|
type: external_exports.literal("text"),
|
|
@@ -11321,8 +11310,8 @@ var TextContentSchema = external_exports.object({
|
|
|
11321
11310
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
11322
11311
|
* for notes on _meta usage.
|
|
11323
11312
|
*/
|
|
11324
|
-
_meta: external_exports.
|
|
11325
|
-
});
|
|
11313
|
+
_meta: external_exports.optional(external_exports.object({}).passthrough())
|
|
11314
|
+
}).passthrough();
|
|
11326
11315
|
var ImageContentSchema = external_exports.object({
|
|
11327
11316
|
type: external_exports.literal("image"),
|
|
11328
11317
|
/**
|
|
@@ -11337,8 +11326,8 @@ var ImageContentSchema = external_exports.object({
|
|
|
11337
11326
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
11338
11327
|
* for notes on _meta usage.
|
|
11339
11328
|
*/
|
|
11340
|
-
_meta: external_exports.
|
|
11341
|
-
});
|
|
11329
|
+
_meta: external_exports.optional(external_exports.object({}).passthrough())
|
|
11330
|
+
}).passthrough();
|
|
11342
11331
|
var AudioContentSchema = external_exports.object({
|
|
11343
11332
|
type: external_exports.literal("audio"),
|
|
11344
11333
|
/**
|
|
@@ -11353,8 +11342,8 @@ var AudioContentSchema = external_exports.object({
|
|
|
11353
11342
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
11354
11343
|
* for notes on _meta usage.
|
|
11355
11344
|
*/
|
|
11356
|
-
_meta: external_exports.
|
|
11357
|
-
});
|
|
11345
|
+
_meta: external_exports.optional(external_exports.object({}).passthrough())
|
|
11346
|
+
}).passthrough();
|
|
11358
11347
|
var EmbeddedResourceSchema = external_exports.object({
|
|
11359
11348
|
type: external_exports.literal("resource"),
|
|
11360
11349
|
resource: external_exports.union([TextResourceContentsSchema, BlobResourceContentsSchema]),
|
|
@@ -11362,8 +11351,8 @@ var EmbeddedResourceSchema = external_exports.object({
|
|
|
11362
11351
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
11363
11352
|
* for notes on _meta usage.
|
|
11364
11353
|
*/
|
|
11365
|
-
_meta: external_exports.
|
|
11366
|
-
});
|
|
11354
|
+
_meta: external_exports.optional(external_exports.object({}).passthrough())
|
|
11355
|
+
}).passthrough();
|
|
11367
11356
|
var ResourceLinkSchema = ResourceSchema.extend({
|
|
11368
11357
|
type: external_exports.literal("resource_link")
|
|
11369
11358
|
});
|
|
@@ -11377,7 +11366,7 @@ var ContentBlockSchema = external_exports.union([
|
|
|
11377
11366
|
var PromptMessageSchema = external_exports.object({
|
|
11378
11367
|
role: external_exports.enum(["user", "assistant"]),
|
|
11379
11368
|
content: ContentBlockSchema
|
|
11380
|
-
});
|
|
11369
|
+
}).passthrough();
|
|
11381
11370
|
var GetPromptResultSchema = ResultSchema.extend({
|
|
11382
11371
|
/**
|
|
11383
11372
|
* An optional description for the prompt.
|
|
@@ -11392,13 +11381,13 @@ var ToolAnnotationsSchema = external_exports.object({
|
|
|
11392
11381
|
/**
|
|
11393
11382
|
* A human-readable title for the tool.
|
|
11394
11383
|
*/
|
|
11395
|
-
title: external_exports.
|
|
11384
|
+
title: external_exports.optional(external_exports.string()),
|
|
11396
11385
|
/**
|
|
11397
11386
|
* If true, the tool does not modify its environment.
|
|
11398
11387
|
*
|
|
11399
11388
|
* Default: false
|
|
11400
11389
|
*/
|
|
11401
|
-
readOnlyHint: external_exports.
|
|
11390
|
+
readOnlyHint: external_exports.optional(external_exports.boolean()),
|
|
11402
11391
|
/**
|
|
11403
11392
|
* If true, the tool may perform destructive updates to its environment.
|
|
11404
11393
|
* If false, the tool performs only additive updates.
|
|
@@ -11407,7 +11396,7 @@ var ToolAnnotationsSchema = external_exports.object({
|
|
|
11407
11396
|
*
|
|
11408
11397
|
* Default: true
|
|
11409
11398
|
*/
|
|
11410
|
-
destructiveHint: external_exports.
|
|
11399
|
+
destructiveHint: external_exports.optional(external_exports.boolean()),
|
|
11411
11400
|
/**
|
|
11412
11401
|
* If true, calling the tool repeatedly with the same arguments
|
|
11413
11402
|
* will have no additional effect on the its environment.
|
|
@@ -11416,7 +11405,7 @@ var ToolAnnotationsSchema = external_exports.object({
|
|
|
11416
11405
|
*
|
|
11417
11406
|
* Default: false
|
|
11418
11407
|
*/
|
|
11419
|
-
idempotentHint: external_exports.
|
|
11408
|
+
idempotentHint: external_exports.optional(external_exports.boolean()),
|
|
11420
11409
|
/**
|
|
11421
11410
|
* If true, this tool may interact with an "open world" of external
|
|
11422
11411
|
* entities. If false, the tool's domain of interaction is closed.
|
|
@@ -11425,34 +11414,30 @@ var ToolAnnotationsSchema = external_exports.object({
|
|
|
11425
11414
|
*
|
|
11426
11415
|
* Default: true
|
|
11427
11416
|
*/
|
|
11428
|
-
openWorldHint: external_exports.
|
|
11429
|
-
});
|
|
11417
|
+
openWorldHint: external_exports.optional(external_exports.boolean())
|
|
11418
|
+
}).passthrough();
|
|
11430
11419
|
var ToolSchema = BaseMetadataSchema.extend({
|
|
11431
11420
|
/**
|
|
11432
11421
|
* A human-readable description of the tool.
|
|
11433
11422
|
*/
|
|
11434
|
-
description: external_exports.
|
|
11423
|
+
description: external_exports.optional(external_exports.string()),
|
|
11435
11424
|
/**
|
|
11436
11425
|
* A JSON Schema object defining the expected parameters for the tool.
|
|
11437
11426
|
*/
|
|
11438
11427
|
inputSchema: external_exports.object({
|
|
11439
11428
|
type: external_exports.literal("object"),
|
|
11440
|
-
properties: external_exports.
|
|
11429
|
+
properties: external_exports.optional(external_exports.object({}).passthrough()),
|
|
11441
11430
|
required: external_exports.optional(external_exports.array(external_exports.string()))
|
|
11442
|
-
}),
|
|
11431
|
+
}).passthrough(),
|
|
11443
11432
|
/**
|
|
11444
11433
|
* An optional JSON Schema object defining the structure of the tool's output returned in
|
|
11445
11434
|
* the structuredContent field of a CallToolResult.
|
|
11446
11435
|
*/
|
|
11447
|
-
outputSchema: external_exports.object({
|
|
11436
|
+
outputSchema: external_exports.optional(external_exports.object({
|
|
11448
11437
|
type: external_exports.literal("object"),
|
|
11449
|
-
properties: external_exports.
|
|
11450
|
-
required: external_exports.optional(external_exports.array(external_exports.string()))
|
|
11451
|
-
|
|
11452
|
-
* Not in the MCP specification, but added to support the Ajv validator while removing .passthrough() which previously allowed additionalProperties to be passed through.
|
|
11453
|
-
*/
|
|
11454
|
-
additionalProperties: external_exports.optional(external_exports.boolean())
|
|
11455
|
-
}).optional(),
|
|
11438
|
+
properties: external_exports.optional(external_exports.object({}).passthrough()),
|
|
11439
|
+
required: external_exports.optional(external_exports.array(external_exports.string()))
|
|
11440
|
+
}).passthrough()),
|
|
11456
11441
|
/**
|
|
11457
11442
|
* Optional additional tool information.
|
|
11458
11443
|
*/
|
|
@@ -11461,7 +11446,7 @@ var ToolSchema = BaseMetadataSchema.extend({
|
|
|
11461
11446
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
11462
11447
|
* for notes on _meta usage.
|
|
11463
11448
|
*/
|
|
11464
|
-
_meta: external_exports.
|
|
11449
|
+
_meta: external_exports.optional(external_exports.object({}).passthrough())
|
|
11465
11450
|
}).merge(IconsSchema);
|
|
11466
11451
|
var ListToolsRequestSchema = PaginatedRequestSchema.extend({
|
|
11467
11452
|
method: external_exports.literal("tools/list")
|
|
@@ -11482,7 +11467,7 @@ var CallToolResultSchema = ResultSchema.extend({
|
|
|
11482
11467
|
*
|
|
11483
11468
|
* If the Tool defines an outputSchema, this field MUST be present in the result, and contain a JSON object that matches the schema.
|
|
11484
11469
|
*/
|
|
11485
|
-
structuredContent: external_exports.
|
|
11470
|
+
structuredContent: external_exports.object({}).passthrough().optional(),
|
|
11486
11471
|
/**
|
|
11487
11472
|
* Whether the tool call ended in an error.
|
|
11488
11473
|
*
|
|
@@ -11502,58 +11487,49 @@ var CallToolResultSchema = ResultSchema.extend({
|
|
|
11502
11487
|
var CompatibilityCallToolResultSchema = CallToolResultSchema.or(ResultSchema.extend({
|
|
11503
11488
|
toolResult: external_exports.unknown()
|
|
11504
11489
|
}));
|
|
11505
|
-
var CallToolRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
11506
|
-
/**
|
|
11507
|
-
* The name of the tool to call.
|
|
11508
|
-
*/
|
|
11509
|
-
name: external_exports.string(),
|
|
11510
|
-
/**
|
|
11511
|
-
* Arguments to pass to the tool.
|
|
11512
|
-
*/
|
|
11513
|
-
arguments: external_exports.optional(external_exports.record(external_exports.string(), external_exports.unknown()))
|
|
11514
|
-
});
|
|
11515
11490
|
var CallToolRequestSchema = RequestSchema.extend({
|
|
11516
11491
|
method: external_exports.literal("tools/call"),
|
|
11517
|
-
params:
|
|
11492
|
+
params: BaseRequestParamsSchema.extend({
|
|
11493
|
+
name: external_exports.string(),
|
|
11494
|
+
arguments: external_exports.optional(external_exports.record(external_exports.unknown()))
|
|
11495
|
+
})
|
|
11518
11496
|
});
|
|
11519
11497
|
var ToolListChangedNotificationSchema = NotificationSchema.extend({
|
|
11520
11498
|
method: external_exports.literal("notifications/tools/list_changed")
|
|
11521
11499
|
});
|
|
11522
11500
|
var LoggingLevelSchema = external_exports.enum(["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]);
|
|
11523
|
-
var SetLevelRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
11524
|
-
/**
|
|
11525
|
-
* The level of logging that the client wants to receive from the server. The server should send all logs at this level and higher (i.e., more severe) to the client as notifications/logging/message.
|
|
11526
|
-
*/
|
|
11527
|
-
level: LoggingLevelSchema
|
|
11528
|
-
});
|
|
11529
11501
|
var SetLevelRequestSchema = RequestSchema.extend({
|
|
11530
11502
|
method: external_exports.literal("logging/setLevel"),
|
|
11531
|
-
params:
|
|
11532
|
-
|
|
11533
|
-
|
|
11534
|
-
|
|
11535
|
-
|
|
11536
|
-
|
|
11537
|
-
level: LoggingLevelSchema,
|
|
11538
|
-
/**
|
|
11539
|
-
* An optional name of the logger issuing this message.
|
|
11540
|
-
*/
|
|
11541
|
-
logger: external_exports.string().optional(),
|
|
11542
|
-
/**
|
|
11543
|
-
* The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here.
|
|
11544
|
-
*/
|
|
11545
|
-
data: external_exports.unknown()
|
|
11503
|
+
params: BaseRequestParamsSchema.extend({
|
|
11504
|
+
/**
|
|
11505
|
+
* The level of logging that the client wants to receive from the server. The server should send all logs at this level and higher (i.e., more severe) to the client as notifications/logging/message.
|
|
11506
|
+
*/
|
|
11507
|
+
level: LoggingLevelSchema
|
|
11508
|
+
})
|
|
11546
11509
|
});
|
|
11547
11510
|
var LoggingMessageNotificationSchema = NotificationSchema.extend({
|
|
11548
11511
|
method: external_exports.literal("notifications/message"),
|
|
11549
|
-
params:
|
|
11512
|
+
params: BaseNotificationParamsSchema.extend({
|
|
11513
|
+
/**
|
|
11514
|
+
* The severity of this log message.
|
|
11515
|
+
*/
|
|
11516
|
+
level: LoggingLevelSchema,
|
|
11517
|
+
/**
|
|
11518
|
+
* An optional name of the logger issuing this message.
|
|
11519
|
+
*/
|
|
11520
|
+
logger: external_exports.optional(external_exports.string()),
|
|
11521
|
+
/**
|
|
11522
|
+
* The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here.
|
|
11523
|
+
*/
|
|
11524
|
+
data: external_exports.unknown()
|
|
11525
|
+
})
|
|
11550
11526
|
});
|
|
11551
11527
|
var ModelHintSchema = external_exports.object({
|
|
11552
11528
|
/**
|
|
11553
11529
|
* A hint for a model name.
|
|
11554
11530
|
*/
|
|
11555
11531
|
name: external_exports.string().optional()
|
|
11556
|
-
});
|
|
11532
|
+
}).passthrough();
|
|
11557
11533
|
var ModelPreferencesSchema = external_exports.object({
|
|
11558
11534
|
/**
|
|
11559
11535
|
* Optional hints to use for model selection.
|
|
@@ -11571,41 +11547,38 @@ var ModelPreferencesSchema = external_exports.object({
|
|
|
11571
11547
|
* How much to prioritize intelligence and capabilities when selecting a model.
|
|
11572
11548
|
*/
|
|
11573
11549
|
intelligencePriority: external_exports.optional(external_exports.number().min(0).max(1))
|
|
11574
|
-
});
|
|
11550
|
+
}).passthrough();
|
|
11575
11551
|
var SamplingMessageSchema = external_exports.object({
|
|
11576
11552
|
role: external_exports.enum(["user", "assistant"]),
|
|
11577
11553
|
content: external_exports.union([TextContentSchema, ImageContentSchema, AudioContentSchema])
|
|
11578
|
-
});
|
|
11579
|
-
var CreateMessageRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
11580
|
-
messages: external_exports.array(SamplingMessageSchema),
|
|
11581
|
-
/**
|
|
11582
|
-
* The server's preferences for which model to select. The client MAY modify or omit this request.
|
|
11583
|
-
*/
|
|
11584
|
-
modelPreferences: ModelPreferencesSchema.optional(),
|
|
11585
|
-
/**
|
|
11586
|
-
* An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt.
|
|
11587
|
-
*/
|
|
11588
|
-
systemPrompt: external_exports.string().optional(),
|
|
11589
|
-
/**
|
|
11590
|
-
* A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. The client MAY ignore this request.
|
|
11591
|
-
*/
|
|
11592
|
-
includeContext: external_exports.enum(["none", "thisServer", "allServers"]).optional(),
|
|
11593
|
-
temperature: external_exports.number().optional(),
|
|
11594
|
-
/**
|
|
11595
|
-
* The requested maximum number of tokens to sample (to prevent runaway completions).
|
|
11596
|
-
*
|
|
11597
|
-
* The client MAY choose to sample fewer tokens than the requested maximum.
|
|
11598
|
-
*/
|
|
11599
|
-
maxTokens: external_exports.number().int(),
|
|
11600
|
-
stopSequences: external_exports.array(external_exports.string()).optional(),
|
|
11601
|
-
/**
|
|
11602
|
-
* Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific.
|
|
11603
|
-
*/
|
|
11604
|
-
metadata: AssertObjectSchema.optional()
|
|
11605
|
-
});
|
|
11554
|
+
}).passthrough();
|
|
11606
11555
|
var CreateMessageRequestSchema = RequestSchema.extend({
|
|
11607
11556
|
method: external_exports.literal("sampling/createMessage"),
|
|
11608
|
-
params:
|
|
11557
|
+
params: BaseRequestParamsSchema.extend({
|
|
11558
|
+
messages: external_exports.array(SamplingMessageSchema),
|
|
11559
|
+
/**
|
|
11560
|
+
* An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt.
|
|
11561
|
+
*/
|
|
11562
|
+
systemPrompt: external_exports.optional(external_exports.string()),
|
|
11563
|
+
/**
|
|
11564
|
+
* A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. The client MAY ignore this request.
|
|
11565
|
+
*/
|
|
11566
|
+
includeContext: external_exports.optional(external_exports.enum(["none", "thisServer", "allServers"])),
|
|
11567
|
+
temperature: external_exports.optional(external_exports.number()),
|
|
11568
|
+
/**
|
|
11569
|
+
* The maximum number of tokens to sample, as requested by the server. The client MAY choose to sample fewer tokens than requested.
|
|
11570
|
+
*/
|
|
11571
|
+
maxTokens: external_exports.number().int(),
|
|
11572
|
+
stopSequences: external_exports.optional(external_exports.array(external_exports.string())),
|
|
11573
|
+
/**
|
|
11574
|
+
* Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific.
|
|
11575
|
+
*/
|
|
11576
|
+
metadata: external_exports.optional(external_exports.object({}).passthrough()),
|
|
11577
|
+
/**
|
|
11578
|
+
* The server's preferences for which model to select.
|
|
11579
|
+
*/
|
|
11580
|
+
modelPreferences: external_exports.optional(ModelPreferencesSchema)
|
|
11581
|
+
})
|
|
11609
11582
|
});
|
|
11610
11583
|
var CreateMessageResultSchema = ResultSchema.extend({
|
|
11611
11584
|
/**
|
|
@@ -11621,114 +11594,59 @@ var CreateMessageResultSchema = ResultSchema.extend({
|
|
|
11621
11594
|
});
|
|
11622
11595
|
var BooleanSchemaSchema = external_exports.object({
|
|
11623
11596
|
type: external_exports.literal("boolean"),
|
|
11624
|
-
title: external_exports.
|
|
11625
|
-
description: external_exports.
|
|
11626
|
-
default: external_exports.
|
|
11627
|
-
});
|
|
11597
|
+
title: external_exports.optional(external_exports.string()),
|
|
11598
|
+
description: external_exports.optional(external_exports.string()),
|
|
11599
|
+
default: external_exports.optional(external_exports.boolean())
|
|
11600
|
+
}).passthrough();
|
|
11628
11601
|
var StringSchemaSchema = external_exports.object({
|
|
11629
11602
|
type: external_exports.literal("string"),
|
|
11630
|
-
title: external_exports.
|
|
11631
|
-
description: external_exports.
|
|
11632
|
-
minLength: external_exports.
|
|
11633
|
-
maxLength: external_exports.
|
|
11634
|
-
format: external_exports.enum(["email", "uri", "date", "date-time"])
|
|
11635
|
-
|
|
11636
|
-
});
|
|
11603
|
+
title: external_exports.optional(external_exports.string()),
|
|
11604
|
+
description: external_exports.optional(external_exports.string()),
|
|
11605
|
+
minLength: external_exports.optional(external_exports.number()),
|
|
11606
|
+
maxLength: external_exports.optional(external_exports.number()),
|
|
11607
|
+
format: external_exports.optional(external_exports.enum(["email", "uri", "date", "date-time"]))
|
|
11608
|
+
}).passthrough();
|
|
11637
11609
|
var NumberSchemaSchema = external_exports.object({
|
|
11638
11610
|
type: external_exports.enum(["number", "integer"]),
|
|
11639
|
-
title: external_exports.
|
|
11640
|
-
description: external_exports.
|
|
11641
|
-
minimum: external_exports.
|
|
11642
|
-
maximum: external_exports.
|
|
11643
|
-
|
|
11644
|
-
|
|
11645
|
-
var UntitledSingleSelectEnumSchemaSchema = external_exports.object({
|
|
11646
|
-
type: external_exports.literal("string"),
|
|
11647
|
-
title: external_exports.string().optional(),
|
|
11648
|
-
description: external_exports.string().optional(),
|
|
11649
|
-
enum: external_exports.array(external_exports.string()),
|
|
11650
|
-
default: external_exports.string().optional()
|
|
11651
|
-
});
|
|
11652
|
-
var TitledSingleSelectEnumSchemaSchema = external_exports.object({
|
|
11653
|
-
type: external_exports.literal("string"),
|
|
11654
|
-
title: external_exports.string().optional(),
|
|
11655
|
-
description: external_exports.string().optional(),
|
|
11656
|
-
oneOf: external_exports.array(external_exports.object({
|
|
11657
|
-
const: external_exports.string(),
|
|
11658
|
-
title: external_exports.string()
|
|
11659
|
-
})),
|
|
11660
|
-
default: external_exports.string().optional()
|
|
11661
|
-
});
|
|
11662
|
-
var LegacyTitledEnumSchemaSchema = external_exports.object({
|
|
11611
|
+
title: external_exports.optional(external_exports.string()),
|
|
11612
|
+
description: external_exports.optional(external_exports.string()),
|
|
11613
|
+
minimum: external_exports.optional(external_exports.number()),
|
|
11614
|
+
maximum: external_exports.optional(external_exports.number())
|
|
11615
|
+
}).passthrough();
|
|
11616
|
+
var EnumSchemaSchema = external_exports.object({
|
|
11663
11617
|
type: external_exports.literal("string"),
|
|
11664
|
-
title: external_exports.
|
|
11665
|
-
description: external_exports.
|
|
11618
|
+
title: external_exports.optional(external_exports.string()),
|
|
11619
|
+
description: external_exports.optional(external_exports.string()),
|
|
11666
11620
|
enum: external_exports.array(external_exports.string()),
|
|
11667
|
-
enumNames: external_exports.array(external_exports.string())
|
|
11668
|
-
|
|
11669
|
-
|
|
11670
|
-
var SingleSelectEnumSchemaSchema = external_exports.union([UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema]);
|
|
11671
|
-
var UntitledMultiSelectEnumSchemaSchema = external_exports.object({
|
|
11672
|
-
type: external_exports.literal("array"),
|
|
11673
|
-
title: external_exports.string().optional(),
|
|
11674
|
-
description: external_exports.string().optional(),
|
|
11675
|
-
minItems: external_exports.number().optional(),
|
|
11676
|
-
maxItems: external_exports.number().optional(),
|
|
11677
|
-
items: external_exports.object({
|
|
11678
|
-
type: external_exports.literal("string"),
|
|
11679
|
-
enum: external_exports.array(external_exports.string())
|
|
11680
|
-
}),
|
|
11681
|
-
default: external_exports.array(external_exports.string()).optional()
|
|
11682
|
-
});
|
|
11683
|
-
var TitledMultiSelectEnumSchemaSchema = external_exports.object({
|
|
11684
|
-
type: external_exports.literal("array"),
|
|
11685
|
-
title: external_exports.string().optional(),
|
|
11686
|
-
description: external_exports.string().optional(),
|
|
11687
|
-
minItems: external_exports.number().optional(),
|
|
11688
|
-
maxItems: external_exports.number().optional(),
|
|
11689
|
-
items: external_exports.object({
|
|
11690
|
-
anyOf: external_exports.array(external_exports.object({
|
|
11691
|
-
const: external_exports.string(),
|
|
11692
|
-
title: external_exports.string()
|
|
11693
|
-
}))
|
|
11694
|
-
}),
|
|
11695
|
-
default: external_exports.array(external_exports.string()).optional()
|
|
11696
|
-
});
|
|
11697
|
-
var MultiSelectEnumSchemaSchema = external_exports.union([UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema]);
|
|
11698
|
-
var EnumSchemaSchema = external_exports.union([LegacyTitledEnumSchemaSchema, SingleSelectEnumSchemaSchema, MultiSelectEnumSchemaSchema]);
|
|
11699
|
-
var PrimitiveSchemaDefinitionSchema = external_exports.union([EnumSchemaSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema]);
|
|
11700
|
-
var ElicitRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
11701
|
-
/**
|
|
11702
|
-
* The message to present to the user.
|
|
11703
|
-
*/
|
|
11704
|
-
message: external_exports.string(),
|
|
11705
|
-
/**
|
|
11706
|
-
* A restricted subset of JSON Schema.
|
|
11707
|
-
* Only top-level properties are allowed, without nesting.
|
|
11708
|
-
*/
|
|
11709
|
-
requestedSchema: external_exports.object({
|
|
11710
|
-
type: external_exports.literal("object"),
|
|
11711
|
-
properties: external_exports.record(external_exports.string(), PrimitiveSchemaDefinitionSchema),
|
|
11712
|
-
required: external_exports.array(external_exports.string()).optional()
|
|
11713
|
-
})
|
|
11714
|
-
});
|
|
11621
|
+
enumNames: external_exports.optional(external_exports.array(external_exports.string()))
|
|
11622
|
+
}).passthrough();
|
|
11623
|
+
var PrimitiveSchemaDefinitionSchema = external_exports.union([BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema, EnumSchemaSchema]);
|
|
11715
11624
|
var ElicitRequestSchema = RequestSchema.extend({
|
|
11716
11625
|
method: external_exports.literal("elicitation/create"),
|
|
11717
|
-
params:
|
|
11626
|
+
params: BaseRequestParamsSchema.extend({
|
|
11627
|
+
/**
|
|
11628
|
+
* The message to present to the user.
|
|
11629
|
+
*/
|
|
11630
|
+
message: external_exports.string(),
|
|
11631
|
+
/**
|
|
11632
|
+
* The schema for the requested user input.
|
|
11633
|
+
*/
|
|
11634
|
+
requestedSchema: external_exports.object({
|
|
11635
|
+
type: external_exports.literal("object"),
|
|
11636
|
+
properties: external_exports.record(external_exports.string(), PrimitiveSchemaDefinitionSchema),
|
|
11637
|
+
required: external_exports.optional(external_exports.array(external_exports.string()))
|
|
11638
|
+
}).passthrough()
|
|
11639
|
+
})
|
|
11718
11640
|
});
|
|
11719
11641
|
var ElicitResultSchema = ResultSchema.extend({
|
|
11720
11642
|
/**
|
|
11721
|
-
* The user
|
|
11722
|
-
* - "accept": User submitted the form/confirmed the action
|
|
11723
|
-
* - "decline": User explicitly decline the action
|
|
11724
|
-
* - "cancel": User dismissed without making an explicit choice
|
|
11643
|
+
* The user's response action.
|
|
11725
11644
|
*/
|
|
11726
11645
|
action: external_exports.enum(["accept", "decline", "cancel"]),
|
|
11727
11646
|
/**
|
|
11728
|
-
* The
|
|
11729
|
-
* Contains values matching the requested schema.
|
|
11647
|
+
* The collected user input content (only present if action is "accept").
|
|
11730
11648
|
*/
|
|
11731
|
-
content: external_exports.
|
|
11649
|
+
content: external_exports.optional(external_exports.record(external_exports.string(), external_exports.unknown()))
|
|
11732
11650
|
});
|
|
11733
11651
|
var ResourceTemplateReferenceSchema = external_exports.object({
|
|
11734
11652
|
type: external_exports.literal("ref/resource"),
|
|
@@ -11736,50 +11654,39 @@ var ResourceTemplateReferenceSchema = external_exports.object({
|
|
|
11736
11654
|
* The URI or URI template of the resource.
|
|
11737
11655
|
*/
|
|
11738
11656
|
uri: external_exports.string()
|
|
11739
|
-
});
|
|
11657
|
+
}).passthrough();
|
|
11740
11658
|
var PromptReferenceSchema = external_exports.object({
|
|
11741
11659
|
type: external_exports.literal("ref/prompt"),
|
|
11742
11660
|
/**
|
|
11743
11661
|
* The name of the prompt or prompt template
|
|
11744
11662
|
*/
|
|
11745
11663
|
name: external_exports.string()
|
|
11746
|
-
});
|
|
11747
|
-
var CompleteRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
11748
|
-
ref: external_exports.union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
|
|
11749
|
-
/**
|
|
11750
|
-
* The argument's information
|
|
11751
|
-
*/
|
|
11752
|
-
argument: external_exports.object({
|
|
11753
|
-
/**
|
|
11754
|
-
* The name of the argument
|
|
11755
|
-
*/
|
|
11756
|
-
name: external_exports.string(),
|
|
11757
|
-
/**
|
|
11758
|
-
* The value of the argument to use for completion matching.
|
|
11759
|
-
*/
|
|
11760
|
-
value: external_exports.string()
|
|
11761
|
-
}),
|
|
11762
|
-
context: external_exports.object({
|
|
11763
|
-
/**
|
|
11764
|
-
* Previously-resolved variables in a URI template or prompt.
|
|
11765
|
-
*/
|
|
11766
|
-
arguments: external_exports.record(external_exports.string(), external_exports.string()).optional()
|
|
11767
|
-
}).optional()
|
|
11768
|
-
});
|
|
11664
|
+
}).passthrough();
|
|
11769
11665
|
var CompleteRequestSchema = RequestSchema.extend({
|
|
11770
11666
|
method: external_exports.literal("completion/complete"),
|
|
11771
|
-
params:
|
|
11667
|
+
params: BaseRequestParamsSchema.extend({
|
|
11668
|
+
ref: external_exports.union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
|
|
11669
|
+
/**
|
|
11670
|
+
* The argument's information
|
|
11671
|
+
*/
|
|
11672
|
+
argument: external_exports.object({
|
|
11673
|
+
/**
|
|
11674
|
+
* The name of the argument
|
|
11675
|
+
*/
|
|
11676
|
+
name: external_exports.string(),
|
|
11677
|
+
/**
|
|
11678
|
+
* The value of the argument to use for completion matching.
|
|
11679
|
+
*/
|
|
11680
|
+
value: external_exports.string()
|
|
11681
|
+
}).passthrough(),
|
|
11682
|
+
context: external_exports.optional(external_exports.object({
|
|
11683
|
+
/**
|
|
11684
|
+
* Previously-resolved variables in a URI template or prompt.
|
|
11685
|
+
*/
|
|
11686
|
+
arguments: external_exports.optional(external_exports.record(external_exports.string(), external_exports.string()))
|
|
11687
|
+
}))
|
|
11688
|
+
})
|
|
11772
11689
|
});
|
|
11773
|
-
function assertCompleteRequestPrompt(request) {
|
|
11774
|
-
if (request.params.ref.type !== "ref/prompt") {
|
|
11775
|
-
throw new TypeError(`Expected CompleteRequestPrompt, but got ${request.params.ref.type}`);
|
|
11776
|
-
}
|
|
11777
|
-
}
|
|
11778
|
-
function assertCompleteRequestResourceTemplate(request) {
|
|
11779
|
-
if (request.params.ref.type !== "ref/resource") {
|
|
11780
|
-
throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${request.params.ref.type}`);
|
|
11781
|
-
}
|
|
11782
|
-
}
|
|
11783
11690
|
var CompleteResultSchema = ResultSchema.extend({
|
|
11784
11691
|
completion: external_exports.object({
|
|
11785
11692
|
/**
|
|
@@ -11804,13 +11711,13 @@ var RootSchema = external_exports.object({
|
|
|
11804
11711
|
/**
|
|
11805
11712
|
* An optional name for the root.
|
|
11806
11713
|
*/
|
|
11807
|
-
name: external_exports.
|
|
11714
|
+
name: external_exports.optional(external_exports.string()),
|
|
11808
11715
|
/**
|
|
11809
11716
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
11810
11717
|
* for notes on _meta usage.
|
|
11811
11718
|
*/
|
|
11812
|
-
_meta: external_exports.
|
|
11813
|
-
});
|
|
11719
|
+
_meta: external_exports.optional(external_exports.object({}).passthrough())
|
|
11720
|
+
}).passthrough();
|
|
11814
11721
|
var ListRootsRequestSchema = RequestSchema.extend({
|
|
11815
11722
|
method: external_exports.literal("roots/list")
|
|
11816
11723
|
});
|
|
@@ -12409,24 +12316,15 @@ var Protocol = class {
|
|
|
12409
12316
|
this._notificationHandlers.delete(method);
|
|
12410
12317
|
}
|
|
12411
12318
|
};
|
|
12412
|
-
function isPlainObject(value) {
|
|
12413
|
-
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
12414
|
-
}
|
|
12415
12319
|
function mergeCapabilities(base, additional) {
|
|
12416
|
-
|
|
12417
|
-
|
|
12418
|
-
|
|
12419
|
-
const addValue = additional[k];
|
|
12420
|
-
if (addValue === void 0)
|
|
12421
|
-
continue;
|
|
12422
|
-
const baseValue = result[k];
|
|
12423
|
-
if (isPlainObject(baseValue) && isPlainObject(addValue)) {
|
|
12424
|
-
result[k] = { ...baseValue, ...addValue };
|
|
12320
|
+
return Object.entries(additional).reduce((acc, [key, value]) => {
|
|
12321
|
+
if (value && typeof value === "object") {
|
|
12322
|
+
acc[key] = acc[key] ? { ...acc[key], ...value } : value;
|
|
12425
12323
|
} else {
|
|
12426
|
-
|
|
12324
|
+
acc[key] = value;
|
|
12427
12325
|
}
|
|
12428
|
-
|
|
12429
|
-
|
|
12326
|
+
return acc;
|
|
12327
|
+
}, { ...base });
|
|
12430
12328
|
}
|
|
12431
12329
|
|
|
12432
12330
|
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
|
|
@@ -12598,9 +12496,9 @@ var Server = class extends Protocol {
|
|
|
12598
12496
|
}
|
|
12599
12497
|
assertRequestHandlerCapability(method) {
|
|
12600
12498
|
switch (method) {
|
|
12601
|
-
case "
|
|
12602
|
-
if (!this._capabilities.
|
|
12603
|
-
throw new Error(`Server does not support
|
|
12499
|
+
case "sampling/createMessage":
|
|
12500
|
+
if (!this._capabilities.sampling) {
|
|
12501
|
+
throw new Error(`Server does not support sampling (required for ${method})`);
|
|
12604
12502
|
}
|
|
12605
12503
|
break;
|
|
12606
12504
|
case "logging/setLevel":
|
|
@@ -14055,64 +13953,6 @@ function processCreateParams2(params) {
|
|
|
14055
13953
|
return { errorMap: customMap, description };
|
|
14056
13954
|
}
|
|
14057
13955
|
|
|
14058
|
-
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
|
|
14059
|
-
var TOOL_NAME_REGEX = /^[A-Za-z0-9._-]{1,128}$/;
|
|
14060
|
-
function validateToolName(name) {
|
|
14061
|
-
const warnings = [];
|
|
14062
|
-
if (name.length === 0) {
|
|
14063
|
-
return {
|
|
14064
|
-
isValid: false,
|
|
14065
|
-
warnings: ["Tool name cannot be empty"]
|
|
14066
|
-
};
|
|
14067
|
-
}
|
|
14068
|
-
if (name.length > 128) {
|
|
14069
|
-
return {
|
|
14070
|
-
isValid: false,
|
|
14071
|
-
warnings: [`Tool name exceeds maximum length of 128 characters (current: ${name.length})`]
|
|
14072
|
-
};
|
|
14073
|
-
}
|
|
14074
|
-
if (name.includes(" ")) {
|
|
14075
|
-
warnings.push("Tool name contains spaces, which may cause parsing issues");
|
|
14076
|
-
}
|
|
14077
|
-
if (name.includes(",")) {
|
|
14078
|
-
warnings.push("Tool name contains commas, which may cause parsing issues");
|
|
14079
|
-
}
|
|
14080
|
-
if (name.startsWith("-") || name.endsWith("-")) {
|
|
14081
|
-
warnings.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts");
|
|
14082
|
-
}
|
|
14083
|
-
if (name.startsWith(".") || name.endsWith(".")) {
|
|
14084
|
-
warnings.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts");
|
|
14085
|
-
}
|
|
14086
|
-
if (!TOOL_NAME_REGEX.test(name)) {
|
|
14087
|
-
const invalidChars = name.split("").filter((char) => !/[A-Za-z0-9._-]/.test(char)).filter((char, index, arr) => arr.indexOf(char) === index);
|
|
14088
|
-
warnings.push(`Tool name contains invalid characters: ${invalidChars.map((c) => `"${c}"`).join(", ")}`, "Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)");
|
|
14089
|
-
return {
|
|
14090
|
-
isValid: false,
|
|
14091
|
-
warnings
|
|
14092
|
-
};
|
|
14093
|
-
}
|
|
14094
|
-
return {
|
|
14095
|
-
isValid: true,
|
|
14096
|
-
warnings
|
|
14097
|
-
};
|
|
14098
|
-
}
|
|
14099
|
-
function issueToolNameWarning(name, warnings) {
|
|
14100
|
-
if (warnings.length > 0) {
|
|
14101
|
-
console.warn(`Tool name validation warning for "${name}":`);
|
|
14102
|
-
for (const warning of warnings) {
|
|
14103
|
-
console.warn(` - ${warning}`);
|
|
14104
|
-
}
|
|
14105
|
-
console.warn("Tool registration will proceed, but this may cause compatibility issues.");
|
|
14106
|
-
console.warn("Consider updating the tool name to conform to the MCP tool naming standard.");
|
|
14107
|
-
console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.");
|
|
14108
|
-
}
|
|
14109
|
-
}
|
|
14110
|
-
function validateAndWarnToolName(name) {
|
|
14111
|
-
const result = validateToolName(name);
|
|
14112
|
-
issueToolNameWarning(name, result.warnings);
|
|
14113
|
-
return result.isValid;
|
|
14114
|
-
}
|
|
14115
|
-
|
|
14116
13956
|
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
|
|
14117
13957
|
var McpServer = class {
|
|
14118
13958
|
constructor(serverInfo, options) {
|
|
@@ -14239,10 +14079,8 @@ var McpServer = class {
|
|
|
14239
14079
|
this.server.setRequestHandler(CompleteRequestSchema, async (request) => {
|
|
14240
14080
|
switch (request.params.ref.type) {
|
|
14241
14081
|
case "ref/prompt":
|
|
14242
|
-
assertCompleteRequestPrompt(request);
|
|
14243
14082
|
return this.handlePromptCompletion(request, request.params.ref);
|
|
14244
14083
|
case "ref/resource":
|
|
14245
|
-
assertCompleteRequestResourceTemplate(request);
|
|
14246
14084
|
return this.handleResourceCompletion(request, request.params.ref);
|
|
14247
14085
|
default:
|
|
14248
14086
|
throw new McpError(ErrorCode.InvalidParams, `Invalid completion reference: ${request.params.ref}`);
|
|
@@ -14531,12 +14369,11 @@ var McpServer = class {
|
|
|
14531
14369
|
return registeredPrompt;
|
|
14532
14370
|
}
|
|
14533
14371
|
_createRegisteredTool(name, title, description, inputSchema, outputSchema, annotations, _meta, callback) {
|
|
14534
|
-
validateAndWarnToolName(name);
|
|
14535
14372
|
const registeredTool = {
|
|
14536
14373
|
title,
|
|
14537
14374
|
description,
|
|
14538
|
-
inputSchema:
|
|
14539
|
-
outputSchema:
|
|
14375
|
+
inputSchema: inputSchema === void 0 ? void 0 : external_exports.object(inputSchema),
|
|
14376
|
+
outputSchema: outputSchema === void 0 ? void 0 : external_exports.object(outputSchema),
|
|
14540
14377
|
annotations,
|
|
14541
14378
|
_meta,
|
|
14542
14379
|
callback,
|
|
@@ -14546,9 +14383,6 @@ var McpServer = class {
|
|
|
14546
14383
|
remove: () => registeredTool.update({ name: null }),
|
|
14547
14384
|
update: (updates) => {
|
|
14548
14385
|
if (typeof updates.name !== "undefined" && updates.name !== name) {
|
|
14549
|
-
if (typeof updates.name === "string") {
|
|
14550
|
-
validateAndWarnToolName(updates.name);
|
|
14551
|
-
}
|
|
14552
14386
|
delete this._registeredTools[name];
|
|
14553
14387
|
if (updates.name)
|
|
14554
14388
|
this._registeredTools[updates.name] = registeredTool;
|
|
@@ -14699,15 +14533,6 @@ function isZodRawShape(obj) {
|
|
|
14699
14533
|
function isZodTypeLike(value) {
|
|
14700
14534
|
return value !== null && typeof value === "object" && "parse" in value && typeof value.parse === "function" && "safeParse" in value && typeof value.safeParse === "function";
|
|
14701
14535
|
}
|
|
14702
|
-
function getZodSchemaObject(schema) {
|
|
14703
|
-
if (!schema) {
|
|
14704
|
-
return void 0;
|
|
14705
|
-
}
|
|
14706
|
-
if (isZodRawShape(schema)) {
|
|
14707
|
-
return external_exports.object(schema);
|
|
14708
|
-
}
|
|
14709
|
-
return schema;
|
|
14710
|
-
}
|
|
14711
14536
|
function promptArgumentsFromSchema(schema) {
|
|
14712
14537
|
return Object.entries(schema.shape).map(([name, field]) => ({
|
|
14713
14538
|
name,
|