@workday/canvas-kit-mcp 14.1.9 → 14.1.17
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 +437 -262
- package/dist/cli.js.map +3 -3
- package/dist/index.js +437 -262
- package/dist/index.js.map +3 -3
- package/dist/types/lib/index.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/cli.js
CHANGED
|
@@ -10837,38 +10837,42 @@ 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"));
|
|
10840
10841
|
var ProgressTokenSchema = external_exports.union([external_exports.string(), external_exports.number().int()]);
|
|
10841
10842
|
var CursorSchema = external_exports.string();
|
|
10842
10843
|
var RequestMetaSchema = external_exports.object({
|
|
10843
10844
|
/**
|
|
10844
10845
|
* 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.
|
|
10845
10846
|
*/
|
|
10846
|
-
progressToken:
|
|
10847
|
+
progressToken: ProgressTokenSchema.optional()
|
|
10847
10848
|
}).passthrough();
|
|
10848
10849
|
var BaseRequestParamsSchema = external_exports.object({
|
|
10849
|
-
|
|
10850
|
-
|
|
10850
|
+
/**
|
|
10851
|
+
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
|
|
10852
|
+
*/
|
|
10853
|
+
_meta: RequestMetaSchema.optional()
|
|
10854
|
+
});
|
|
10851
10855
|
var RequestSchema = external_exports.object({
|
|
10852
10856
|
method: external_exports.string(),
|
|
10853
|
-
params:
|
|
10857
|
+
params: BaseRequestParamsSchema.passthrough().optional()
|
|
10854
10858
|
});
|
|
10855
|
-
var
|
|
10859
|
+
var NotificationsParamsSchema = external_exports.object({
|
|
10856
10860
|
/**
|
|
10857
10861
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
10858
10862
|
* for notes on _meta usage.
|
|
10859
10863
|
*/
|
|
10860
|
-
_meta: external_exports.
|
|
10861
|
-
})
|
|
10864
|
+
_meta: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
10865
|
+
});
|
|
10862
10866
|
var NotificationSchema = external_exports.object({
|
|
10863
10867
|
method: external_exports.string(),
|
|
10864
|
-
params:
|
|
10868
|
+
params: NotificationsParamsSchema.passthrough().optional()
|
|
10865
10869
|
});
|
|
10866
10870
|
var ResultSchema = external_exports.object({
|
|
10867
10871
|
/**
|
|
10868
10872
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
10869
10873
|
* for notes on _meta usage.
|
|
10870
10874
|
*/
|
|
10871
|
-
_meta: external_exports.
|
|
10875
|
+
_meta: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
10872
10876
|
}).passthrough();
|
|
10873
10877
|
var RequestIdSchema = external_exports.union([external_exports.string(), external_exports.number().int()]);
|
|
10874
10878
|
var JSONRPCRequestSchema = external_exports.object({
|
|
@@ -10917,20 +10921,21 @@ var JSONRPCErrorSchema = external_exports.object({
|
|
|
10917
10921
|
var isJSONRPCError = (value) => JSONRPCErrorSchema.safeParse(value).success;
|
|
10918
10922
|
var JSONRPCMessageSchema = external_exports.union([JSONRPCRequestSchema, JSONRPCNotificationSchema, JSONRPCResponseSchema, JSONRPCErrorSchema]);
|
|
10919
10923
|
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
|
+
});
|
|
10920
10936
|
var CancelledNotificationSchema = NotificationSchema.extend({
|
|
10921
10937
|
method: external_exports.literal("notifications/cancelled"),
|
|
10922
|
-
params:
|
|
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
|
-
})
|
|
10938
|
+
params: CancelledNotificationParamsSchema
|
|
10934
10939
|
});
|
|
10935
10940
|
var IconSchema = external_exports.object({
|
|
10936
10941
|
/**
|
|
@@ -10940,15 +10945,15 @@ var IconSchema = external_exports.object({
|
|
|
10940
10945
|
/**
|
|
10941
10946
|
* Optional MIME type for the icon.
|
|
10942
10947
|
*/
|
|
10943
|
-
mimeType: external_exports.
|
|
10948
|
+
mimeType: external_exports.string().optional(),
|
|
10944
10949
|
/**
|
|
10945
10950
|
* Optional array of strings that specify sizes at which the icon can be used.
|
|
10946
10951
|
* Each string should be in WxH format (e.g., `"48x48"`, `"96x96"`) or `"any"` for scalable formats like SVG.
|
|
10947
10952
|
*
|
|
10948
10953
|
* If not provided, the client should assume that the icon can be used at any size.
|
|
10949
10954
|
*/
|
|
10950
|
-
sizes: external_exports.
|
|
10951
|
-
})
|
|
10955
|
+
sizes: external_exports.array(external_exports.string()).optional()
|
|
10956
|
+
});
|
|
10952
10957
|
var IconsSchema = external_exports.object({
|
|
10953
10958
|
/**
|
|
10954
10959
|
* Optional set of sized icons that the client can display in a user interface.
|
|
@@ -10962,7 +10967,7 @@ var IconsSchema = external_exports.object({
|
|
|
10962
10967
|
* - `image/webp` - WebP images (modern, efficient format)
|
|
10963
10968
|
*/
|
|
10964
10969
|
icons: external_exports.array(IconSchema).optional()
|
|
10965
|
-
})
|
|
10970
|
+
});
|
|
10966
10971
|
var BaseMetadataSchema = external_exports.object({
|
|
10967
10972
|
/** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
|
|
10968
10973
|
name: external_exports.string(),
|
|
@@ -10974,62 +10979,68 @@ var BaseMetadataSchema = external_exports.object({
|
|
|
10974
10979
|
* where `annotations.title` should be given precedence over using `name`,
|
|
10975
10980
|
* if present).
|
|
10976
10981
|
*/
|
|
10977
|
-
title: external_exports.
|
|
10978
|
-
})
|
|
10982
|
+
title: external_exports.string().optional()
|
|
10983
|
+
});
|
|
10979
10984
|
var ImplementationSchema = BaseMetadataSchema.extend({
|
|
10980
10985
|
version: external_exports.string(),
|
|
10981
10986
|
/**
|
|
10982
10987
|
* An optional URL of the website for this implementation.
|
|
10983
10988
|
*/
|
|
10984
|
-
websiteUrl: external_exports.
|
|
10989
|
+
websiteUrl: external_exports.string().optional()
|
|
10985
10990
|
}).merge(IconsSchema);
|
|
10986
10991
|
var ClientCapabilitiesSchema = external_exports.object({
|
|
10987
10992
|
/**
|
|
10988
10993
|
* Experimental, non-standard capabilities that the client supports.
|
|
10989
10994
|
*/
|
|
10990
|
-
experimental: external_exports.
|
|
10995
|
+
experimental: external_exports.record(external_exports.string(), AssertObjectSchema).optional(),
|
|
10991
10996
|
/**
|
|
10992
10997
|
* Present if the client supports sampling from an LLM.
|
|
10993
10998
|
*/
|
|
10994
|
-
sampling:
|
|
10999
|
+
sampling: AssertObjectSchema.optional(),
|
|
10995
11000
|
/**
|
|
10996
11001
|
* Present if the client supports eliciting user input.
|
|
10997
11002
|
*/
|
|
10998
|
-
elicitation: external_exports.
|
|
11003
|
+
elicitation: external_exports.intersection(external_exports.object({
|
|
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()),
|
|
10999
11009
|
/**
|
|
11000
11010
|
* Present if the client supports listing roots.
|
|
11001
11011
|
*/
|
|
11002
|
-
roots: external_exports.
|
|
11012
|
+
roots: external_exports.object({
|
|
11003
11013
|
/**
|
|
11004
11014
|
* Whether the client supports issuing notifications for changes to the roots list.
|
|
11005
11015
|
*/
|
|
11006
|
-
listChanged: external_exports.
|
|
11007
|
-
}).
|
|
11008
|
-
})
|
|
11016
|
+
listChanged: external_exports.boolean().optional()
|
|
11017
|
+
}).optional()
|
|
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
|
+
});
|
|
11009
11027
|
var InitializeRequestSchema = RequestSchema.extend({
|
|
11010
11028
|
method: external_exports.literal("initialize"),
|
|
11011
|
-
params:
|
|
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
|
-
})
|
|
11029
|
+
params: InitializeRequestParamsSchema
|
|
11019
11030
|
});
|
|
11020
11031
|
var ServerCapabilitiesSchema = external_exports.object({
|
|
11021
11032
|
/**
|
|
11022
11033
|
* Experimental, non-standard capabilities that the server supports.
|
|
11023
11034
|
*/
|
|
11024
|
-
experimental: external_exports.
|
|
11035
|
+
experimental: external_exports.record(external_exports.string(), AssertObjectSchema).optional(),
|
|
11025
11036
|
/**
|
|
11026
11037
|
* Present if the server supports sending log messages to the client.
|
|
11027
11038
|
*/
|
|
11028
|
-
logging:
|
|
11039
|
+
logging: AssertObjectSchema.optional(),
|
|
11029
11040
|
/**
|
|
11030
11041
|
* Present if the server supports sending completions to the client.
|
|
11031
11042
|
*/
|
|
11032
|
-
completions:
|
|
11043
|
+
completions: AssertObjectSchema.optional(),
|
|
11033
11044
|
/**
|
|
11034
11045
|
* Present if the server offers any prompt templates.
|
|
11035
11046
|
*/
|
|
@@ -11038,30 +11049,30 @@ var ServerCapabilitiesSchema = external_exports.object({
|
|
|
11038
11049
|
* Whether this server supports issuing notifications for changes to the prompt list.
|
|
11039
11050
|
*/
|
|
11040
11051
|
listChanged: external_exports.optional(external_exports.boolean())
|
|
11041
|
-
})
|
|
11052
|
+
})),
|
|
11042
11053
|
/**
|
|
11043
11054
|
* Present if the server offers any resources to read.
|
|
11044
11055
|
*/
|
|
11045
|
-
resources: external_exports.
|
|
11056
|
+
resources: external_exports.object({
|
|
11046
11057
|
/**
|
|
11047
11058
|
* Whether this server supports clients subscribing to resource updates.
|
|
11048
11059
|
*/
|
|
11049
|
-
subscribe: external_exports.
|
|
11060
|
+
subscribe: external_exports.boolean().optional(),
|
|
11050
11061
|
/**
|
|
11051
11062
|
* Whether this server supports issuing notifications for changes to the resource list.
|
|
11052
11063
|
*/
|
|
11053
|
-
listChanged: external_exports.
|
|
11054
|
-
}).
|
|
11064
|
+
listChanged: external_exports.boolean().optional()
|
|
11065
|
+
}).optional(),
|
|
11055
11066
|
/**
|
|
11056
11067
|
* Present if the server offers any tools to call.
|
|
11057
11068
|
*/
|
|
11058
|
-
tools: external_exports.
|
|
11069
|
+
tools: external_exports.object({
|
|
11059
11070
|
/**
|
|
11060
11071
|
* Whether this server supports issuing notifications for changes to the tool list.
|
|
11061
11072
|
*/
|
|
11062
|
-
listChanged: external_exports.
|
|
11063
|
-
}).
|
|
11064
|
-
})
|
|
11073
|
+
listChanged: external_exports.boolean().optional()
|
|
11074
|
+
}).optional()
|
|
11075
|
+
});
|
|
11065
11076
|
var InitializeResultSchema = ResultSchema.extend({
|
|
11066
11077
|
/**
|
|
11067
11078
|
* 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.
|
|
@@ -11074,7 +11085,7 @@ var InitializeResultSchema = ResultSchema.extend({
|
|
|
11074
11085
|
*
|
|
11075
11086
|
* 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.
|
|
11076
11087
|
*/
|
|
11077
|
-
instructions: external_exports.
|
|
11088
|
+
instructions: external_exports.string().optional()
|
|
11078
11089
|
});
|
|
11079
11090
|
var InitializedNotificationSchema = NotificationSchema.extend({
|
|
11080
11091
|
method: external_exports.literal("notifications/initialized")
|
|
@@ -11095,24 +11106,26 @@ var ProgressSchema = external_exports.object({
|
|
|
11095
11106
|
* An optional message describing the current progress.
|
|
11096
11107
|
*/
|
|
11097
11108
|
message: external_exports.optional(external_exports.string())
|
|
11098
|
-
})
|
|
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
|
+
});
|
|
11099
11116
|
var ProgressNotificationSchema = NotificationSchema.extend({
|
|
11100
11117
|
method: external_exports.literal("notifications/progress"),
|
|
11101
|
-
params:
|
|
11102
|
-
|
|
11103
|
-
|
|
11104
|
-
|
|
11105
|
-
|
|
11106
|
-
|
|
11118
|
+
params: ProgressNotificationParamsSchema
|
|
11119
|
+
});
|
|
11120
|
+
var PaginatedRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
11121
|
+
/**
|
|
11122
|
+
* An opaque token representing the current pagination position.
|
|
11123
|
+
* If provided, the server should return results starting after this cursor.
|
|
11124
|
+
*/
|
|
11125
|
+
cursor: CursorSchema.optional()
|
|
11107
11126
|
});
|
|
11108
11127
|
var PaginatedRequestSchema = RequestSchema.extend({
|
|
11109
|
-
params:
|
|
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()
|
|
11128
|
+
params: PaginatedRequestParamsSchema.optional()
|
|
11116
11129
|
});
|
|
11117
11130
|
var PaginatedResultSchema = ResultSchema.extend({
|
|
11118
11131
|
/**
|
|
@@ -11134,8 +11147,8 @@ var ResourceContentsSchema = external_exports.object({
|
|
|
11134
11147
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
11135
11148
|
* for notes on _meta usage.
|
|
11136
11149
|
*/
|
|
11137
|
-
_meta: external_exports.
|
|
11138
|
-
})
|
|
11150
|
+
_meta: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
11151
|
+
});
|
|
11139
11152
|
var TextResourceContentsSchema = ResourceContentsSchema.extend({
|
|
11140
11153
|
/**
|
|
11141
11154
|
* The text of the item. This must only be set if the item can actually be represented as text (not binary data).
|
|
@@ -11210,14 +11223,18 @@ var ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({
|
|
|
11210
11223
|
var ListResourceTemplatesResultSchema = PaginatedResultSchema.extend({
|
|
11211
11224
|
resourceTemplates: external_exports.array(ResourceTemplateSchema)
|
|
11212
11225
|
});
|
|
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;
|
|
11213
11235
|
var ReadResourceRequestSchema = RequestSchema.extend({
|
|
11214
11236
|
method: external_exports.literal("resources/read"),
|
|
11215
|
-
params:
|
|
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
|
-
})
|
|
11237
|
+
params: ReadResourceRequestParamsSchema
|
|
11221
11238
|
});
|
|
11222
11239
|
var ReadResourceResultSchema = ResultSchema.extend({
|
|
11223
11240
|
contents: external_exports.array(external_exports.union([TextResourceContentsSchema, BlobResourceContentsSchema]))
|
|
@@ -11225,32 +11242,25 @@ var ReadResourceResultSchema = ResultSchema.extend({
|
|
|
11225
11242
|
var ResourceListChangedNotificationSchema = NotificationSchema.extend({
|
|
11226
11243
|
method: external_exports.literal("notifications/resources/list_changed")
|
|
11227
11244
|
});
|
|
11245
|
+
var SubscribeRequestParamsSchema = ResourceRequestParamsSchema;
|
|
11228
11246
|
var SubscribeRequestSchema = RequestSchema.extend({
|
|
11229
11247
|
method: external_exports.literal("resources/subscribe"),
|
|
11230
|
-
params:
|
|
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
|
-
})
|
|
11248
|
+
params: SubscribeRequestParamsSchema
|
|
11236
11249
|
});
|
|
11250
|
+
var UnsubscribeRequestParamsSchema = ResourceRequestParamsSchema;
|
|
11237
11251
|
var UnsubscribeRequestSchema = RequestSchema.extend({
|
|
11238
11252
|
method: external_exports.literal("resources/unsubscribe"),
|
|
11239
|
-
params:
|
|
11240
|
-
|
|
11241
|
-
|
|
11242
|
-
|
|
11243
|
-
|
|
11244
|
-
|
|
11253
|
+
params: UnsubscribeRequestParamsSchema
|
|
11254
|
+
});
|
|
11255
|
+
var ResourceUpdatedNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
11256
|
+
/**
|
|
11257
|
+
* The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to.
|
|
11258
|
+
*/
|
|
11259
|
+
uri: external_exports.string()
|
|
11245
11260
|
});
|
|
11246
11261
|
var ResourceUpdatedNotificationSchema = NotificationSchema.extend({
|
|
11247
11262
|
method: external_exports.literal("notifications/resources/updated"),
|
|
11248
|
-
params:
|
|
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
|
-
})
|
|
11263
|
+
params: ResourceUpdatedNotificationParamsSchema
|
|
11254
11264
|
});
|
|
11255
11265
|
var PromptArgumentSchema = external_exports.object({
|
|
11256
11266
|
/**
|
|
@@ -11265,7 +11275,7 @@ var PromptArgumentSchema = external_exports.object({
|
|
|
11265
11275
|
* Whether this argument must be provided.
|
|
11266
11276
|
*/
|
|
11267
11277
|
required: external_exports.optional(external_exports.boolean())
|
|
11268
|
-
})
|
|
11278
|
+
});
|
|
11269
11279
|
var PromptSchema = BaseMetadataSchema.extend({
|
|
11270
11280
|
/**
|
|
11271
11281
|
* An optional description of what this prompt provides
|
|
@@ -11287,18 +11297,19 @@ var ListPromptsRequestSchema = PaginatedRequestSchema.extend({
|
|
|
11287
11297
|
var ListPromptsResultSchema = PaginatedResultSchema.extend({
|
|
11288
11298
|
prompts: external_exports.array(PromptSchema)
|
|
11289
11299
|
});
|
|
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
|
+
});
|
|
11290
11310
|
var GetPromptRequestSchema = RequestSchema.extend({
|
|
11291
11311
|
method: external_exports.literal("prompts/get"),
|
|
11292
|
-
params:
|
|
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
|
-
})
|
|
11312
|
+
params: GetPromptRequestParamsSchema
|
|
11302
11313
|
});
|
|
11303
11314
|
var TextContentSchema = external_exports.object({
|
|
11304
11315
|
type: external_exports.literal("text"),
|
|
@@ -11310,8 +11321,8 @@ var TextContentSchema = external_exports.object({
|
|
|
11310
11321
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
11311
11322
|
* for notes on _meta usage.
|
|
11312
11323
|
*/
|
|
11313
|
-
_meta: external_exports.
|
|
11314
|
-
})
|
|
11324
|
+
_meta: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
11325
|
+
});
|
|
11315
11326
|
var ImageContentSchema = external_exports.object({
|
|
11316
11327
|
type: external_exports.literal("image"),
|
|
11317
11328
|
/**
|
|
@@ -11326,8 +11337,8 @@ var ImageContentSchema = external_exports.object({
|
|
|
11326
11337
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
11327
11338
|
* for notes on _meta usage.
|
|
11328
11339
|
*/
|
|
11329
|
-
_meta: external_exports.
|
|
11330
|
-
})
|
|
11340
|
+
_meta: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
11341
|
+
});
|
|
11331
11342
|
var AudioContentSchema = external_exports.object({
|
|
11332
11343
|
type: external_exports.literal("audio"),
|
|
11333
11344
|
/**
|
|
@@ -11342,8 +11353,8 @@ var AudioContentSchema = external_exports.object({
|
|
|
11342
11353
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
11343
11354
|
* for notes on _meta usage.
|
|
11344
11355
|
*/
|
|
11345
|
-
_meta: external_exports.
|
|
11346
|
-
})
|
|
11356
|
+
_meta: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
11357
|
+
});
|
|
11347
11358
|
var EmbeddedResourceSchema = external_exports.object({
|
|
11348
11359
|
type: external_exports.literal("resource"),
|
|
11349
11360
|
resource: external_exports.union([TextResourceContentsSchema, BlobResourceContentsSchema]),
|
|
@@ -11351,8 +11362,8 @@ var EmbeddedResourceSchema = external_exports.object({
|
|
|
11351
11362
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
11352
11363
|
* for notes on _meta usage.
|
|
11353
11364
|
*/
|
|
11354
|
-
_meta: external_exports.
|
|
11355
|
-
})
|
|
11365
|
+
_meta: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
11366
|
+
});
|
|
11356
11367
|
var ResourceLinkSchema = ResourceSchema.extend({
|
|
11357
11368
|
type: external_exports.literal("resource_link")
|
|
11358
11369
|
});
|
|
@@ -11366,7 +11377,7 @@ var ContentBlockSchema = external_exports.union([
|
|
|
11366
11377
|
var PromptMessageSchema = external_exports.object({
|
|
11367
11378
|
role: external_exports.enum(["user", "assistant"]),
|
|
11368
11379
|
content: ContentBlockSchema
|
|
11369
|
-
})
|
|
11380
|
+
});
|
|
11370
11381
|
var GetPromptResultSchema = ResultSchema.extend({
|
|
11371
11382
|
/**
|
|
11372
11383
|
* An optional description for the prompt.
|
|
@@ -11381,13 +11392,13 @@ var ToolAnnotationsSchema = external_exports.object({
|
|
|
11381
11392
|
/**
|
|
11382
11393
|
* A human-readable title for the tool.
|
|
11383
11394
|
*/
|
|
11384
|
-
title: external_exports.
|
|
11395
|
+
title: external_exports.string().optional(),
|
|
11385
11396
|
/**
|
|
11386
11397
|
* If true, the tool does not modify its environment.
|
|
11387
11398
|
*
|
|
11388
11399
|
* Default: false
|
|
11389
11400
|
*/
|
|
11390
|
-
readOnlyHint: external_exports.
|
|
11401
|
+
readOnlyHint: external_exports.boolean().optional(),
|
|
11391
11402
|
/**
|
|
11392
11403
|
* If true, the tool may perform destructive updates to its environment.
|
|
11393
11404
|
* If false, the tool performs only additive updates.
|
|
@@ -11396,7 +11407,7 @@ var ToolAnnotationsSchema = external_exports.object({
|
|
|
11396
11407
|
*
|
|
11397
11408
|
* Default: true
|
|
11398
11409
|
*/
|
|
11399
|
-
destructiveHint: external_exports.
|
|
11410
|
+
destructiveHint: external_exports.boolean().optional(),
|
|
11400
11411
|
/**
|
|
11401
11412
|
* If true, calling the tool repeatedly with the same arguments
|
|
11402
11413
|
* will have no additional effect on the its environment.
|
|
@@ -11405,7 +11416,7 @@ var ToolAnnotationsSchema = external_exports.object({
|
|
|
11405
11416
|
*
|
|
11406
11417
|
* Default: false
|
|
11407
11418
|
*/
|
|
11408
|
-
idempotentHint: external_exports.
|
|
11419
|
+
idempotentHint: external_exports.boolean().optional(),
|
|
11409
11420
|
/**
|
|
11410
11421
|
* If true, this tool may interact with an "open world" of external
|
|
11411
11422
|
* entities. If false, the tool's domain of interaction is closed.
|
|
@@ -11414,30 +11425,34 @@ var ToolAnnotationsSchema = external_exports.object({
|
|
|
11414
11425
|
*
|
|
11415
11426
|
* Default: true
|
|
11416
11427
|
*/
|
|
11417
|
-
openWorldHint: external_exports.
|
|
11418
|
-
})
|
|
11428
|
+
openWorldHint: external_exports.boolean().optional()
|
|
11429
|
+
});
|
|
11419
11430
|
var ToolSchema = BaseMetadataSchema.extend({
|
|
11420
11431
|
/**
|
|
11421
11432
|
* A human-readable description of the tool.
|
|
11422
11433
|
*/
|
|
11423
|
-
description: external_exports.
|
|
11434
|
+
description: external_exports.string().optional(),
|
|
11424
11435
|
/**
|
|
11425
11436
|
* A JSON Schema object defining the expected parameters for the tool.
|
|
11426
11437
|
*/
|
|
11427
11438
|
inputSchema: external_exports.object({
|
|
11428
11439
|
type: external_exports.literal("object"),
|
|
11429
|
-
properties: external_exports.
|
|
11440
|
+
properties: external_exports.record(external_exports.string(), AssertObjectSchema).optional(),
|
|
11430
11441
|
required: external_exports.optional(external_exports.array(external_exports.string()))
|
|
11431
|
-
})
|
|
11442
|
+
}),
|
|
11432
11443
|
/**
|
|
11433
11444
|
* An optional JSON Schema object defining the structure of the tool's output returned in
|
|
11434
11445
|
* the structuredContent field of a CallToolResult.
|
|
11435
11446
|
*/
|
|
11436
|
-
outputSchema: external_exports.
|
|
11447
|
+
outputSchema: external_exports.object({
|
|
11437
11448
|
type: external_exports.literal("object"),
|
|
11438
|
-
properties: external_exports.
|
|
11439
|
-
required: external_exports.optional(external_exports.array(external_exports.string()))
|
|
11440
|
-
|
|
11449
|
+
properties: external_exports.record(external_exports.string(), AssertObjectSchema).optional(),
|
|
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(),
|
|
11441
11456
|
/**
|
|
11442
11457
|
* Optional additional tool information.
|
|
11443
11458
|
*/
|
|
@@ -11446,7 +11461,7 @@ var ToolSchema = BaseMetadataSchema.extend({
|
|
|
11446
11461
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
11447
11462
|
* for notes on _meta usage.
|
|
11448
11463
|
*/
|
|
11449
|
-
_meta: external_exports.
|
|
11464
|
+
_meta: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
11450
11465
|
}).merge(IconsSchema);
|
|
11451
11466
|
var ListToolsRequestSchema = PaginatedRequestSchema.extend({
|
|
11452
11467
|
method: external_exports.literal("tools/list")
|
|
@@ -11467,7 +11482,7 @@ var CallToolResultSchema = ResultSchema.extend({
|
|
|
11467
11482
|
*
|
|
11468
11483
|
* If the Tool defines an outputSchema, this field MUST be present in the result, and contain a JSON object that matches the schema.
|
|
11469
11484
|
*/
|
|
11470
|
-
structuredContent: external_exports.
|
|
11485
|
+
structuredContent: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
11471
11486
|
/**
|
|
11472
11487
|
* Whether the tool call ended in an error.
|
|
11473
11488
|
*
|
|
@@ -11487,49 +11502,58 @@ var CallToolResultSchema = ResultSchema.extend({
|
|
|
11487
11502
|
var CompatibilityCallToolResultSchema = CallToolResultSchema.or(ResultSchema.extend({
|
|
11488
11503
|
toolResult: external_exports.unknown()
|
|
11489
11504
|
}));
|
|
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
|
+
});
|
|
11490
11515
|
var CallToolRequestSchema = RequestSchema.extend({
|
|
11491
11516
|
method: external_exports.literal("tools/call"),
|
|
11492
|
-
params:
|
|
11493
|
-
name: external_exports.string(),
|
|
11494
|
-
arguments: external_exports.optional(external_exports.record(external_exports.unknown()))
|
|
11495
|
-
})
|
|
11517
|
+
params: CallToolRequestParamsSchema
|
|
11496
11518
|
});
|
|
11497
11519
|
var ToolListChangedNotificationSchema = NotificationSchema.extend({
|
|
11498
11520
|
method: external_exports.literal("notifications/tools/list_changed")
|
|
11499
11521
|
});
|
|
11500
11522
|
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
|
+
});
|
|
11501
11529
|
var SetLevelRequestSchema = RequestSchema.extend({
|
|
11502
11530
|
method: external_exports.literal("logging/setLevel"),
|
|
11503
|
-
params:
|
|
11504
|
-
|
|
11505
|
-
|
|
11506
|
-
|
|
11507
|
-
|
|
11508
|
-
|
|
11531
|
+
params: SetLevelRequestParamsSchema
|
|
11532
|
+
});
|
|
11533
|
+
var LoggingMessageNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
11534
|
+
/**
|
|
11535
|
+
* The severity of this log message.
|
|
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()
|
|
11509
11546
|
});
|
|
11510
11547
|
var LoggingMessageNotificationSchema = NotificationSchema.extend({
|
|
11511
11548
|
method: external_exports.literal("notifications/message"),
|
|
11512
|
-
params:
|
|
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
|
-
})
|
|
11549
|
+
params: LoggingMessageNotificationParamsSchema
|
|
11526
11550
|
});
|
|
11527
11551
|
var ModelHintSchema = external_exports.object({
|
|
11528
11552
|
/**
|
|
11529
11553
|
* A hint for a model name.
|
|
11530
11554
|
*/
|
|
11531
11555
|
name: external_exports.string().optional()
|
|
11532
|
-
})
|
|
11556
|
+
});
|
|
11533
11557
|
var ModelPreferencesSchema = external_exports.object({
|
|
11534
11558
|
/**
|
|
11535
11559
|
* Optional hints to use for model selection.
|
|
@@ -11547,38 +11571,41 @@ var ModelPreferencesSchema = external_exports.object({
|
|
|
11547
11571
|
* How much to prioritize intelligence and capabilities when selecting a model.
|
|
11548
11572
|
*/
|
|
11549
11573
|
intelligencePriority: external_exports.optional(external_exports.number().min(0).max(1))
|
|
11550
|
-
})
|
|
11574
|
+
});
|
|
11551
11575
|
var SamplingMessageSchema = external_exports.object({
|
|
11552
11576
|
role: external_exports.enum(["user", "assistant"]),
|
|
11553
11577
|
content: external_exports.union([TextContentSchema, ImageContentSchema, AudioContentSchema])
|
|
11554
|
-
})
|
|
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
|
+
});
|
|
11555
11606
|
var CreateMessageRequestSchema = RequestSchema.extend({
|
|
11556
11607
|
method: external_exports.literal("sampling/createMessage"),
|
|
11557
|
-
params:
|
|
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
|
-
})
|
|
11608
|
+
params: CreateMessageRequestParamsSchema
|
|
11582
11609
|
});
|
|
11583
11610
|
var CreateMessageResultSchema = ResultSchema.extend({
|
|
11584
11611
|
/**
|
|
@@ -11594,59 +11621,114 @@ var CreateMessageResultSchema = ResultSchema.extend({
|
|
|
11594
11621
|
});
|
|
11595
11622
|
var BooleanSchemaSchema = external_exports.object({
|
|
11596
11623
|
type: external_exports.literal("boolean"),
|
|
11597
|
-
title: external_exports.
|
|
11598
|
-
description: external_exports.
|
|
11599
|
-
default: external_exports.
|
|
11600
|
-
})
|
|
11624
|
+
title: external_exports.string().optional(),
|
|
11625
|
+
description: external_exports.string().optional(),
|
|
11626
|
+
default: external_exports.boolean().optional()
|
|
11627
|
+
});
|
|
11601
11628
|
var StringSchemaSchema = external_exports.object({
|
|
11602
11629
|
type: external_exports.literal("string"),
|
|
11603
|
-
title: external_exports.
|
|
11604
|
-
description: external_exports.
|
|
11605
|
-
minLength: external_exports.
|
|
11606
|
-
maxLength: external_exports.
|
|
11607
|
-
format: external_exports.
|
|
11608
|
-
|
|
11630
|
+
title: external_exports.string().optional(),
|
|
11631
|
+
description: external_exports.string().optional(),
|
|
11632
|
+
minLength: external_exports.number().optional(),
|
|
11633
|
+
maxLength: external_exports.number().optional(),
|
|
11634
|
+
format: external_exports.enum(["email", "uri", "date", "date-time"]).optional(),
|
|
11635
|
+
default: external_exports.string().optional()
|
|
11636
|
+
});
|
|
11609
11637
|
var NumberSchemaSchema = external_exports.object({
|
|
11610
11638
|
type: external_exports.enum(["number", "integer"]),
|
|
11611
|
-
title: external_exports.
|
|
11612
|
-
description: external_exports.
|
|
11613
|
-
minimum: external_exports.
|
|
11614
|
-
maximum: external_exports.
|
|
11615
|
-
|
|
11616
|
-
|
|
11639
|
+
title: external_exports.string().optional(),
|
|
11640
|
+
description: external_exports.string().optional(),
|
|
11641
|
+
minimum: external_exports.number().optional(),
|
|
11642
|
+
maximum: external_exports.number().optional(),
|
|
11643
|
+
default: external_exports.number().optional()
|
|
11644
|
+
});
|
|
11645
|
+
var UntitledSingleSelectEnumSchemaSchema = external_exports.object({
|
|
11617
11646
|
type: external_exports.literal("string"),
|
|
11618
|
-
title: external_exports.
|
|
11619
|
-
description: external_exports.
|
|
11647
|
+
title: external_exports.string().optional(),
|
|
11648
|
+
description: external_exports.string().optional(),
|
|
11620
11649
|
enum: external_exports.array(external_exports.string()),
|
|
11621
|
-
|
|
11622
|
-
})
|
|
11623
|
-
var
|
|
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({
|
|
11663
|
+
type: external_exports.literal("string"),
|
|
11664
|
+
title: external_exports.string().optional(),
|
|
11665
|
+
description: external_exports.string().optional(),
|
|
11666
|
+
enum: external_exports.array(external_exports.string()),
|
|
11667
|
+
enumNames: external_exports.array(external_exports.string()).optional(),
|
|
11668
|
+
default: external_exports.string().optional()
|
|
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
|
+
});
|
|
11624
11715
|
var ElicitRequestSchema = RequestSchema.extend({
|
|
11625
11716
|
method: external_exports.literal("elicitation/create"),
|
|
11626
|
-
params:
|
|
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
|
-
})
|
|
11717
|
+
params: ElicitRequestParamsSchema
|
|
11640
11718
|
});
|
|
11641
11719
|
var ElicitResultSchema = ResultSchema.extend({
|
|
11642
11720
|
/**
|
|
11643
|
-
* The user
|
|
11721
|
+
* The user action in response to the elicitation.
|
|
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
|
|
11644
11725
|
*/
|
|
11645
11726
|
action: external_exports.enum(["accept", "decline", "cancel"]),
|
|
11646
11727
|
/**
|
|
11647
|
-
* The
|
|
11728
|
+
* The submitted form data, only present when action is "accept".
|
|
11729
|
+
* Contains values matching the requested schema.
|
|
11648
11730
|
*/
|
|
11649
|
-
content: external_exports.
|
|
11731
|
+
content: external_exports.record(external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean(), external_exports.array(external_exports.string())])).optional()
|
|
11650
11732
|
});
|
|
11651
11733
|
var ResourceTemplateReferenceSchema = external_exports.object({
|
|
11652
11734
|
type: external_exports.literal("ref/resource"),
|
|
@@ -11654,39 +11736,50 @@ var ResourceTemplateReferenceSchema = external_exports.object({
|
|
|
11654
11736
|
* The URI or URI template of the resource.
|
|
11655
11737
|
*/
|
|
11656
11738
|
uri: external_exports.string()
|
|
11657
|
-
})
|
|
11739
|
+
});
|
|
11658
11740
|
var PromptReferenceSchema = external_exports.object({
|
|
11659
11741
|
type: external_exports.literal("ref/prompt"),
|
|
11660
11742
|
/**
|
|
11661
11743
|
* The name of the prompt or prompt template
|
|
11662
11744
|
*/
|
|
11663
11745
|
name: external_exports.string()
|
|
11664
|
-
})
|
|
11665
|
-
var
|
|
11666
|
-
|
|
11667
|
-
|
|
11668
|
-
|
|
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({
|
|
11669
11753
|
/**
|
|
11670
|
-
* The argument
|
|
11754
|
+
* The name of the argument
|
|
11671
11755
|
*/
|
|
11672
|
-
|
|
11673
|
-
|
|
11674
|
-
|
|
11675
|
-
|
|
11676
|
-
|
|
11677
|
-
|
|
11678
|
-
|
|
11679
|
-
|
|
11680
|
-
|
|
11681
|
-
|
|
11682
|
-
|
|
11683
|
-
|
|
11684
|
-
|
|
11685
|
-
|
|
11686
|
-
|
|
11687
|
-
|
|
11688
|
-
})
|
|
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
|
+
});
|
|
11769
|
+
var CompleteRequestSchema = RequestSchema.extend({
|
|
11770
|
+
method: external_exports.literal("completion/complete"),
|
|
11771
|
+
params: CompleteRequestParamsSchema
|
|
11689
11772
|
});
|
|
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
|
+
}
|
|
11690
11783
|
var CompleteResultSchema = ResultSchema.extend({
|
|
11691
11784
|
completion: external_exports.object({
|
|
11692
11785
|
/**
|
|
@@ -11711,13 +11804,13 @@ var RootSchema = external_exports.object({
|
|
|
11711
11804
|
/**
|
|
11712
11805
|
* An optional name for the root.
|
|
11713
11806
|
*/
|
|
11714
|
-
name: external_exports.
|
|
11807
|
+
name: external_exports.string().optional(),
|
|
11715
11808
|
/**
|
|
11716
11809
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
11717
11810
|
* for notes on _meta usage.
|
|
11718
11811
|
*/
|
|
11719
|
-
_meta: external_exports.
|
|
11720
|
-
})
|
|
11812
|
+
_meta: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
11813
|
+
});
|
|
11721
11814
|
var ListRootsRequestSchema = RequestSchema.extend({
|
|
11722
11815
|
method: external_exports.literal("roots/list")
|
|
11723
11816
|
});
|
|
@@ -11880,7 +11973,7 @@ import { fileURLToPath } from "node:url";
|
|
|
11880
11973
|
// package.json
|
|
11881
11974
|
var package_default = {
|
|
11882
11975
|
name: "@workday/canvas-kit-mcp",
|
|
11883
|
-
version: "14.1.
|
|
11976
|
+
version: "14.1.17",
|
|
11884
11977
|
description: "MCP package for Canvas Kit",
|
|
11885
11978
|
author: "Workday, Inc. (https://www.workday.com)",
|
|
11886
11979
|
license: "Apache-2.0",
|
|
@@ -11888,7 +11981,7 @@ var package_default = {
|
|
|
11888
11981
|
sideEffects: false,
|
|
11889
11982
|
repository: {
|
|
11890
11983
|
type: "git",
|
|
11891
|
-
url: "https://github.com/
|
|
11984
|
+
url: "https://github.com/Workday/canvas-kit.git",
|
|
11892
11985
|
directory: "modules/mcp"
|
|
11893
11986
|
},
|
|
11894
11987
|
bin: {
|
|
@@ -11926,7 +12019,7 @@ var package_default = {
|
|
|
11926
12019
|
"@modelcontextprotocol/sdk": "^1.20.2"
|
|
11927
12020
|
},
|
|
11928
12021
|
devDependencies: {
|
|
11929
|
-
"@types/node": "^
|
|
12022
|
+
"@types/node": "^22.0.0",
|
|
11930
12023
|
esbuild: "^0.25.11",
|
|
11931
12024
|
mkdirp: "^1.0.3",
|
|
11932
12025
|
rimraf: "^5.0.0",
|
|
@@ -12316,15 +12409,24 @@ var Protocol = class {
|
|
|
12316
12409
|
this._notificationHandlers.delete(method);
|
|
12317
12410
|
}
|
|
12318
12411
|
};
|
|
12412
|
+
function isPlainObject(value) {
|
|
12413
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
12414
|
+
}
|
|
12319
12415
|
function mergeCapabilities(base, additional) {
|
|
12320
|
-
|
|
12321
|
-
|
|
12322
|
-
|
|
12416
|
+
const result = { ...base };
|
|
12417
|
+
for (const key in additional) {
|
|
12418
|
+
const k = key;
|
|
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 };
|
|
12323
12425
|
} else {
|
|
12324
|
-
|
|
12426
|
+
result[k] = addValue;
|
|
12325
12427
|
}
|
|
12326
|
-
|
|
12327
|
-
|
|
12428
|
+
}
|
|
12429
|
+
return result;
|
|
12328
12430
|
}
|
|
12329
12431
|
|
|
12330
12432
|
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
|
|
@@ -12496,9 +12598,9 @@ var Server = class extends Protocol {
|
|
|
12496
12598
|
}
|
|
12497
12599
|
assertRequestHandlerCapability(method) {
|
|
12498
12600
|
switch (method) {
|
|
12499
|
-
case "
|
|
12500
|
-
if (!this._capabilities.
|
|
12501
|
-
throw new Error(`Server does not support
|
|
12601
|
+
case "completion/complete":
|
|
12602
|
+
if (!this._capabilities.completions) {
|
|
12603
|
+
throw new Error(`Server does not support completions (required for ${method})`);
|
|
12502
12604
|
}
|
|
12503
12605
|
break;
|
|
12504
12606
|
case "logging/setLevel":
|
|
@@ -13953,6 +14055,64 @@ function processCreateParams2(params) {
|
|
|
13953
14055
|
return { errorMap: customMap, description };
|
|
13954
14056
|
}
|
|
13955
14057
|
|
|
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
|
+
|
|
13956
14116
|
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
|
|
13957
14117
|
var McpServer = class {
|
|
13958
14118
|
constructor(serverInfo, options) {
|
|
@@ -14079,8 +14239,10 @@ var McpServer = class {
|
|
|
14079
14239
|
this.server.setRequestHandler(CompleteRequestSchema, async (request) => {
|
|
14080
14240
|
switch (request.params.ref.type) {
|
|
14081
14241
|
case "ref/prompt":
|
|
14242
|
+
assertCompleteRequestPrompt(request);
|
|
14082
14243
|
return this.handlePromptCompletion(request, request.params.ref);
|
|
14083
14244
|
case "ref/resource":
|
|
14245
|
+
assertCompleteRequestResourceTemplate(request);
|
|
14084
14246
|
return this.handleResourceCompletion(request, request.params.ref);
|
|
14085
14247
|
default:
|
|
14086
14248
|
throw new McpError(ErrorCode.InvalidParams, `Invalid completion reference: ${request.params.ref}`);
|
|
@@ -14369,11 +14531,12 @@ var McpServer = class {
|
|
|
14369
14531
|
return registeredPrompt;
|
|
14370
14532
|
}
|
|
14371
14533
|
_createRegisteredTool(name, title, description, inputSchema, outputSchema, annotations, _meta, callback) {
|
|
14534
|
+
validateAndWarnToolName(name);
|
|
14372
14535
|
const registeredTool = {
|
|
14373
14536
|
title,
|
|
14374
14537
|
description,
|
|
14375
|
-
inputSchema:
|
|
14376
|
-
outputSchema:
|
|
14538
|
+
inputSchema: getZodSchemaObject(inputSchema),
|
|
14539
|
+
outputSchema: getZodSchemaObject(outputSchema),
|
|
14377
14540
|
annotations,
|
|
14378
14541
|
_meta,
|
|
14379
14542
|
callback,
|
|
@@ -14383,6 +14546,9 @@ var McpServer = class {
|
|
|
14383
14546
|
remove: () => registeredTool.update({ name: null }),
|
|
14384
14547
|
update: (updates) => {
|
|
14385
14548
|
if (typeof updates.name !== "undefined" && updates.name !== name) {
|
|
14549
|
+
if (typeof updates.name === "string") {
|
|
14550
|
+
validateAndWarnToolName(updates.name);
|
|
14551
|
+
}
|
|
14386
14552
|
delete this._registeredTools[name];
|
|
14387
14553
|
if (updates.name)
|
|
14388
14554
|
this._registeredTools[updates.name] = registeredTool;
|
|
@@ -14533,6 +14699,15 @@ function isZodRawShape(obj) {
|
|
|
14533
14699
|
function isZodTypeLike(value) {
|
|
14534
14700
|
return value !== null && typeof value === "object" && "parse" in value && typeof value.parse === "function" && "safeParse" in value && typeof value.safeParse === "function";
|
|
14535
14701
|
}
|
|
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
|
+
}
|
|
14536
14711
|
function promptArgumentsFromSchema(schema) {
|
|
14537
14712
|
return Object.entries(schema.shape).map(([name, field]) => ({
|
|
14538
14713
|
name,
|