@studiometa/productive-mcp 0.10.11 → 0.10.12
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/auth.js.map +1 -1
- package/dist/crypto.js +3 -3
- package/dist/crypto.js.map +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/handlers/activities.d.ts +3 -99
- package/dist/handlers/activities.d.ts.map +1 -1
- package/dist/handlers/attachments.d.ts +3 -99
- package/dist/handlers/attachments.d.ts.map +1 -1
- package/dist/handlers/bookings.d.ts +3 -99
- package/dist/handlers/bookings.d.ts.map +1 -1
- package/dist/handlers/comments.d.ts +3 -99
- package/dist/handlers/comments.d.ts.map +1 -1
- package/dist/handlers/companies.d.ts +3 -99
- package/dist/handlers/companies.d.ts.map +1 -1
- package/dist/handlers/custom-fields.d.ts +3 -99
- package/dist/handlers/custom-fields.d.ts.map +1 -1
- package/dist/handlers/deals.d.ts +3 -99
- package/dist/handlers/deals.d.ts.map +1 -1
- package/dist/handlers/discussions.d.ts +3 -99
- package/dist/handlers/discussions.d.ts.map +1 -1
- package/dist/handlers/pages.d.ts +3 -99
- package/dist/handlers/pages.d.ts.map +1 -1
- package/dist/handlers/projects.d.ts +3 -99
- package/dist/handlers/projects.d.ts.map +1 -1
- package/dist/handlers/search.d.ts +1 -1
- package/dist/handlers/search.d.ts.map +1 -1
- package/dist/handlers/services.d.ts +3 -99
- package/dist/handlers/services.d.ts.map +1 -1
- package/dist/handlers/tasks.d.ts +3 -99
- package/dist/handlers/tasks.d.ts.map +1 -1
- package/dist/handlers/time.d.ts +3 -99
- package/dist/handlers/time.d.ts.map +1 -1
- package/dist/handlers/timers.d.ts +3 -99
- package/dist/handlers/timers.d.ts.map +1 -1
- package/dist/{handlers-B9FASjNJ.js → handlers-DonE83xo.js} +2 -3
- package/dist/handlers-DonE83xo.js.map +1 -0
- package/dist/handlers.js +1 -1
- package/dist/{http-B3J8ZV4I.js → http-QQVUnV2e.js} +729 -25
- package/dist/{http-B3J8ZV4I.js.map → http-QQVUnV2e.js.map} +1 -1
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/oauth.js.map +1 -1
- package/dist/server.js +2 -2
- package/dist/server.js.map +1 -1
- package/dist/{stdio-BpKd5pcS.js → stdio-CRD2nJPs.js} +2 -2
- package/dist/{stdio-BpKd5pcS.js.map → stdio-CRD2nJPs.js.map} +1 -1
- package/dist/stdio.js +1 -1
- package/dist/tools.js.map +1 -1
- package/dist/{version-Dm6m3p60.js → version-DMEaGciu.js} +3 -3
- package/dist/{version-Dm6m3p60.js.map → version-DMEaGciu.js.map} +1 -1
- package/package.json +6 -6
- package/dist/handlers-B9FASjNJ.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as INSTRUCTIONS, i as readResource, n as listResourceTemplates, r as listResources, t as VERSION } from "./version-
|
|
2
|
-
import { _ as union, a as boolean, c as intersection, d as number, f as object, g as string, h as record, i as array, l as literal, m as preprocess, n as _enum, o as custom, p as optional, r as _null, s as discriminatedUnion, t as executeToolWithCredentials, u as looseObject, v as unknown, y as datetime } from "./handlers-
|
|
3
|
-
import { a as handlePrompt, t as getAvailablePrompts } from "./stdio-
|
|
1
|
+
import { a as INSTRUCTIONS, i as readResource, n as listResourceTemplates, r as listResources, t as VERSION } from "./version-DMEaGciu.js";
|
|
2
|
+
import { _ as union, a as boolean, c as intersection, d as number, f as object, g as string, h as record, i as array, l as literal, m as preprocess, n as _enum, o as custom, p as optional, r as _null, s as discriminatedUnion, t as executeToolWithCredentials, u as looseObject, v as unknown, y as datetime } from "./handlers-DonE83xo.js";
|
|
3
|
+
import { a as handlePrompt, t as getAvailablePrompts } from "./stdio-CRD2nJPs.js";
|
|
4
4
|
import { TOOLS } from "./tools.js";
|
|
5
5
|
import { parseAuthHeader } from "./auth.js";
|
|
6
6
|
import { authorizeGetHandler, authorizePostHandler, oauthMetadataHandler, registerHandler, tokenHandler } from "./oauth.js";
|
|
@@ -494,7 +494,13 @@ var ProgressTokenSchema = union([string(), number().int()]);
|
|
|
494
494
|
*/
|
|
495
495
|
var CursorSchema = string();
|
|
496
496
|
looseObject({
|
|
497
|
+
/**
|
|
498
|
+
* Requested duration in milliseconds to retain task from creation.
|
|
499
|
+
*/
|
|
497
500
|
ttl: number().optional(),
|
|
501
|
+
/**
|
|
502
|
+
* Time in milliseconds to wait between task status requests.
|
|
503
|
+
*/
|
|
498
504
|
pollInterval: number().optional()
|
|
499
505
|
});
|
|
500
506
|
var TaskMetadataSchema = object({ ttl: number().optional() });
|
|
@@ -504,27 +510,56 @@ var TaskMetadataSchema = object({ ttl: number().optional() });
|
|
|
504
510
|
*/
|
|
505
511
|
var RelatedTaskMetadataSchema = object({ taskId: string() });
|
|
506
512
|
var RequestMetaSchema = looseObject({
|
|
513
|
+
/**
|
|
514
|
+
* 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.
|
|
515
|
+
*/
|
|
507
516
|
progressToken: ProgressTokenSchema.optional(),
|
|
517
|
+
/**
|
|
518
|
+
* If specified, this request is related to the provided task.
|
|
519
|
+
*/
|
|
508
520
|
[RELATED_TASK_META_KEY]: RelatedTaskMetadataSchema.optional()
|
|
509
521
|
});
|
|
510
522
|
/**
|
|
511
523
|
* Common params for any request.
|
|
512
524
|
*/
|
|
513
|
-
var BaseRequestParamsSchema = object({
|
|
525
|
+
var BaseRequestParamsSchema = object({
|
|
526
|
+
/**
|
|
527
|
+
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
|
|
528
|
+
*/
|
|
529
|
+
_meta: RequestMetaSchema.optional() });
|
|
514
530
|
/**
|
|
515
531
|
* Common params for any task-augmented request.
|
|
516
532
|
*/
|
|
517
|
-
var TaskAugmentedRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
533
|
+
var TaskAugmentedRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
534
|
+
/**
|
|
535
|
+
* If specified, the caller is requesting task-augmented execution for this request.
|
|
536
|
+
* The request will return a CreateTaskResult immediately, and the actual result can be
|
|
537
|
+
* retrieved later via tasks/result.
|
|
538
|
+
*
|
|
539
|
+
* Task augmentation is subject to capability negotiation - receivers MUST declare support
|
|
540
|
+
* for task augmentation of specific request types in their capabilities.
|
|
541
|
+
*/
|
|
542
|
+
task: TaskMetadataSchema.optional() });
|
|
518
543
|
var RequestSchema = object({
|
|
519
544
|
method: string(),
|
|
520
545
|
params: BaseRequestParamsSchema.loose().optional()
|
|
521
546
|
});
|
|
522
|
-
var NotificationsParamsSchema = object({
|
|
547
|
+
var NotificationsParamsSchema = object({
|
|
548
|
+
/**
|
|
549
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
550
|
+
* for notes on _meta usage.
|
|
551
|
+
*/
|
|
552
|
+
_meta: RequestMetaSchema.optional() });
|
|
523
553
|
var NotificationSchema = object({
|
|
524
554
|
method: string(),
|
|
525
555
|
params: NotificationsParamsSchema.loose().optional()
|
|
526
556
|
});
|
|
527
|
-
var ResultSchema = looseObject({
|
|
557
|
+
var ResultSchema = looseObject({
|
|
558
|
+
/**
|
|
559
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
560
|
+
* for notes on _meta usage.
|
|
561
|
+
*/
|
|
562
|
+
_meta: RequestMetaSchema.optional() });
|
|
528
563
|
/**
|
|
529
564
|
* A uniquely identifying ID for a request in JSON-RPC.
|
|
530
565
|
*/
|
|
@@ -581,8 +616,17 @@ var JSONRPCErrorResponseSchema = object({
|
|
|
581
616
|
jsonrpc: literal("2.0"),
|
|
582
617
|
id: RequestIdSchema.optional(),
|
|
583
618
|
error: object({
|
|
619
|
+
/**
|
|
620
|
+
* The error type that occurred.
|
|
621
|
+
*/
|
|
584
622
|
code: number().int(),
|
|
623
|
+
/**
|
|
624
|
+
* A short description of the error. The message SHOULD be limited to a concise single sentence.
|
|
625
|
+
*/
|
|
585
626
|
message: string(),
|
|
627
|
+
/**
|
|
628
|
+
* Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
|
|
629
|
+
*/
|
|
586
630
|
data: unknown().optional()
|
|
587
631
|
})
|
|
588
632
|
}).strict();
|
|
@@ -605,7 +649,15 @@ union([JSONRPCResultResponseSchema, JSONRPCErrorResponseSchema]);
|
|
|
605
649
|
*/
|
|
606
650
|
var EmptyResultSchema = ResultSchema.strict();
|
|
607
651
|
var CancelledNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
652
|
+
/**
|
|
653
|
+
* The ID of the request to cancel.
|
|
654
|
+
*
|
|
655
|
+
* This MUST correspond to the ID of a request previously issued in the same direction.
|
|
656
|
+
*/
|
|
608
657
|
requestId: RequestIdSchema.optional(),
|
|
658
|
+
/**
|
|
659
|
+
* An optional string describing the reason for the cancellation. This MAY be logged or presented to the user.
|
|
660
|
+
*/
|
|
609
661
|
reason: string().optional()
|
|
610
662
|
});
|
|
611
663
|
/**
|
|
@@ -625,17 +677,57 @@ var CancelledNotificationSchema = NotificationSchema.extend({
|
|
|
625
677
|
* Base schema to add `icons` property.
|
|
626
678
|
*
|
|
627
679
|
*/
|
|
628
|
-
var IconsSchema = object({
|
|
680
|
+
var IconsSchema = object({
|
|
681
|
+
/**
|
|
682
|
+
* Optional set of sized icons that the client can display in a user interface.
|
|
683
|
+
*
|
|
684
|
+
* Clients that support rendering icons MUST support at least the following MIME types:
|
|
685
|
+
* - `image/png` - PNG images (safe, universal compatibility)
|
|
686
|
+
* - `image/jpeg` (and `image/jpg`) - JPEG images (safe, universal compatibility)
|
|
687
|
+
*
|
|
688
|
+
* Clients that support rendering icons SHOULD also support:
|
|
689
|
+
* - `image/svg+xml` - SVG images (scalable but requires security precautions)
|
|
690
|
+
* - `image/webp` - WebP images (modern, efficient format)
|
|
691
|
+
*/
|
|
692
|
+
icons: array(object({
|
|
693
|
+
/**
|
|
694
|
+
* URL or data URI for the icon.
|
|
695
|
+
*/
|
|
629
696
|
src: string(),
|
|
697
|
+
/**
|
|
698
|
+
* Optional MIME type for the icon.
|
|
699
|
+
*/
|
|
630
700
|
mimeType: string().optional(),
|
|
701
|
+
/**
|
|
702
|
+
* Optional array of strings that specify sizes at which the icon can be used.
|
|
703
|
+
* Each string should be in WxH format (e.g., `"48x48"`, `"96x96"`) or `"any"` for scalable formats like SVG.
|
|
704
|
+
*
|
|
705
|
+
* If not provided, the client should assume that the icon can be used at any size.
|
|
706
|
+
*/
|
|
631
707
|
sizes: array(string()).optional(),
|
|
708
|
+
/**
|
|
709
|
+
* Optional specifier for the theme this icon is designed for. `light` indicates
|
|
710
|
+
* the icon is designed to be used with a light background, and `dark` indicates
|
|
711
|
+
* the icon is designed to be used with a dark background.
|
|
712
|
+
*
|
|
713
|
+
* If not provided, the client should assume the icon can be used with any theme.
|
|
714
|
+
*/
|
|
632
715
|
theme: _enum(["light", "dark"]).optional()
|
|
633
716
|
})).optional() });
|
|
634
717
|
/**
|
|
635
718
|
* Base metadata interface for common properties across resources, tools, prompts, and implementations.
|
|
636
719
|
*/
|
|
637
720
|
var BaseMetadataSchema = object({
|
|
721
|
+
/** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
|
|
638
722
|
name: string(),
|
|
723
|
+
/**
|
|
724
|
+
* Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
|
|
725
|
+
* even by those unfamiliar with domain-specific terminology.
|
|
726
|
+
*
|
|
727
|
+
* If not provided, the name should be used for display (except for Tool,
|
|
728
|
+
* where `annotations.title` should be given precedence over using `name`,
|
|
729
|
+
* if present).
|
|
730
|
+
*/
|
|
639
731
|
title: string().optional()
|
|
640
732
|
});
|
|
641
733
|
/**
|
|
@@ -645,7 +737,17 @@ var ImplementationSchema = BaseMetadataSchema.extend({
|
|
|
645
737
|
...BaseMetadataSchema.shape,
|
|
646
738
|
...IconsSchema.shape,
|
|
647
739
|
version: string(),
|
|
740
|
+
/**
|
|
741
|
+
* An optional URL of the website for this implementation.
|
|
742
|
+
*/
|
|
648
743
|
websiteUrl: string().optional(),
|
|
744
|
+
/**
|
|
745
|
+
* An optional human-readable description of what this implementation does.
|
|
746
|
+
*
|
|
747
|
+
* This can be used by clients or servers to provide context about their purpose
|
|
748
|
+
* and capabilities. For example, a server might describe the types of resources
|
|
749
|
+
* or tools it provides, while a client might describe its intended use case.
|
|
750
|
+
*/
|
|
649
751
|
description: string().optional()
|
|
650
752
|
});
|
|
651
753
|
var ElicitationCapabilitySchema = preprocess((value) => {
|
|
@@ -661,10 +763,25 @@ var ElicitationCapabilitySchema = preprocess((value) => {
|
|
|
661
763
|
* Task capabilities for clients, indicating which request types support task creation.
|
|
662
764
|
*/
|
|
663
765
|
var ClientTasksCapabilitySchema = looseObject({
|
|
766
|
+
/**
|
|
767
|
+
* Present if the client supports listing tasks.
|
|
768
|
+
*/
|
|
664
769
|
list: AssertObjectSchema.optional(),
|
|
770
|
+
/**
|
|
771
|
+
* Present if the client supports cancelling tasks.
|
|
772
|
+
*/
|
|
665
773
|
cancel: AssertObjectSchema.optional(),
|
|
774
|
+
/**
|
|
775
|
+
* Capabilities for task creation on specific request types.
|
|
776
|
+
*/
|
|
666
777
|
requests: looseObject({
|
|
778
|
+
/**
|
|
779
|
+
* Task support for sampling requests.
|
|
780
|
+
*/
|
|
667
781
|
sampling: looseObject({ createMessage: AssertObjectSchema.optional() }).optional(),
|
|
782
|
+
/**
|
|
783
|
+
* Task support for elicitation requests.
|
|
784
|
+
*/
|
|
668
785
|
elicitation: looseObject({ create: AssertObjectSchema.optional() }).optional()
|
|
669
786
|
}).optional()
|
|
670
787
|
});
|
|
@@ -672,25 +789,70 @@ var ClientTasksCapabilitySchema = looseObject({
|
|
|
672
789
|
* Task capabilities for servers, indicating which request types support task creation.
|
|
673
790
|
*/
|
|
674
791
|
var ServerTasksCapabilitySchema = looseObject({
|
|
792
|
+
/**
|
|
793
|
+
* Present if the server supports listing tasks.
|
|
794
|
+
*/
|
|
675
795
|
list: AssertObjectSchema.optional(),
|
|
796
|
+
/**
|
|
797
|
+
* Present if the server supports cancelling tasks.
|
|
798
|
+
*/
|
|
676
799
|
cancel: AssertObjectSchema.optional(),
|
|
677
|
-
|
|
800
|
+
/**
|
|
801
|
+
* Capabilities for task creation on specific request types.
|
|
802
|
+
*/
|
|
803
|
+
requests: looseObject({
|
|
804
|
+
/**
|
|
805
|
+
* Task support for tool requests.
|
|
806
|
+
*/
|
|
807
|
+
tools: looseObject({ call: AssertObjectSchema.optional() }).optional() }).optional()
|
|
678
808
|
});
|
|
679
809
|
/**
|
|
680
810
|
* Capabilities a client may support. Known capabilities are defined here, in this schema, but this is not a closed set: any client can define its own, additional capabilities.
|
|
681
811
|
*/
|
|
682
812
|
var ClientCapabilitiesSchema = object({
|
|
813
|
+
/**
|
|
814
|
+
* Experimental, non-standard capabilities that the client supports.
|
|
815
|
+
*/
|
|
683
816
|
experimental: record(string(), AssertObjectSchema).optional(),
|
|
817
|
+
/**
|
|
818
|
+
* Present if the client supports sampling from an LLM.
|
|
819
|
+
*/
|
|
684
820
|
sampling: object({
|
|
821
|
+
/**
|
|
822
|
+
* Present if the client supports context inclusion via includeContext parameter.
|
|
823
|
+
* If not declared, servers SHOULD only use `includeContext: "none"` (or omit it).
|
|
824
|
+
*/
|
|
685
825
|
context: AssertObjectSchema.optional(),
|
|
826
|
+
/**
|
|
827
|
+
* Present if the client supports tool use via tools and toolChoice parameters.
|
|
828
|
+
*/
|
|
686
829
|
tools: AssertObjectSchema.optional()
|
|
687
830
|
}).optional(),
|
|
831
|
+
/**
|
|
832
|
+
* Present if the client supports eliciting user input.
|
|
833
|
+
*/
|
|
688
834
|
elicitation: ElicitationCapabilitySchema.optional(),
|
|
689
|
-
|
|
835
|
+
/**
|
|
836
|
+
* Present if the client supports listing roots.
|
|
837
|
+
*/
|
|
838
|
+
roots: object({
|
|
839
|
+
/**
|
|
840
|
+
* Whether the client supports issuing notifications for changes to the roots list.
|
|
841
|
+
*/
|
|
842
|
+
listChanged: boolean().optional() }).optional(),
|
|
843
|
+
/**
|
|
844
|
+
* Present if the client supports task creation.
|
|
845
|
+
*/
|
|
690
846
|
tasks: ClientTasksCapabilitySchema.optional(),
|
|
847
|
+
/**
|
|
848
|
+
* Extensions that the client supports. Keys are extension identifiers (vendor-prefix/extension-name).
|
|
849
|
+
*/
|
|
691
850
|
extensions: record(string(), AssertObjectSchema).optional()
|
|
692
851
|
});
|
|
693
852
|
var InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
853
|
+
/**
|
|
854
|
+
* The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well.
|
|
855
|
+
*/
|
|
694
856
|
protocolVersion: string(),
|
|
695
857
|
capabilities: ClientCapabilitiesSchema,
|
|
696
858
|
clientInfo: ImplementationSchema
|
|
@@ -707,25 +869,71 @@ var isInitializeRequest = (value) => InitializeRequestSchema.safeParse(value).su
|
|
|
707
869
|
* Capabilities that a server may support. Known capabilities are defined here, in this schema, but this is not a closed set: any server can define its own, additional capabilities.
|
|
708
870
|
*/
|
|
709
871
|
var ServerCapabilitiesSchema = object({
|
|
872
|
+
/**
|
|
873
|
+
* Experimental, non-standard capabilities that the server supports.
|
|
874
|
+
*/
|
|
710
875
|
experimental: record(string(), AssertObjectSchema).optional(),
|
|
876
|
+
/**
|
|
877
|
+
* Present if the server supports sending log messages to the client.
|
|
878
|
+
*/
|
|
711
879
|
logging: AssertObjectSchema.optional(),
|
|
880
|
+
/**
|
|
881
|
+
* Present if the server supports sending completions to the client.
|
|
882
|
+
*/
|
|
712
883
|
completions: AssertObjectSchema.optional(),
|
|
713
|
-
|
|
884
|
+
/**
|
|
885
|
+
* Present if the server offers any prompt templates.
|
|
886
|
+
*/
|
|
887
|
+
prompts: object({
|
|
888
|
+
/**
|
|
889
|
+
* Whether this server supports issuing notifications for changes to the prompt list.
|
|
890
|
+
*/
|
|
891
|
+
listChanged: boolean().optional() }).optional(),
|
|
892
|
+
/**
|
|
893
|
+
* Present if the server offers any resources to read.
|
|
894
|
+
*/
|
|
714
895
|
resources: object({
|
|
896
|
+
/**
|
|
897
|
+
* Whether this server supports clients subscribing to resource updates.
|
|
898
|
+
*/
|
|
715
899
|
subscribe: boolean().optional(),
|
|
900
|
+
/**
|
|
901
|
+
* Whether this server supports issuing notifications for changes to the resource list.
|
|
902
|
+
*/
|
|
716
903
|
listChanged: boolean().optional()
|
|
717
904
|
}).optional(),
|
|
718
|
-
|
|
905
|
+
/**
|
|
906
|
+
* Present if the server offers any tools to call.
|
|
907
|
+
*/
|
|
908
|
+
tools: object({
|
|
909
|
+
/**
|
|
910
|
+
* Whether this server supports issuing notifications for changes to the tool list.
|
|
911
|
+
*/
|
|
912
|
+
listChanged: boolean().optional() }).optional(),
|
|
913
|
+
/**
|
|
914
|
+
* Present if the server supports task creation.
|
|
915
|
+
*/
|
|
719
916
|
tasks: ServerTasksCapabilitySchema.optional(),
|
|
917
|
+
/**
|
|
918
|
+
* Extensions that the server supports. Keys are extension identifiers (vendor-prefix/extension-name).
|
|
919
|
+
*/
|
|
720
920
|
extensions: record(string(), AssertObjectSchema).optional()
|
|
721
921
|
});
|
|
722
922
|
/**
|
|
723
923
|
* After receiving an initialize request from the client, the server sends this response.
|
|
724
924
|
*/
|
|
725
925
|
var InitializeResultSchema = ResultSchema.extend({
|
|
926
|
+
/**
|
|
927
|
+
* 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.
|
|
928
|
+
*/
|
|
726
929
|
protocolVersion: string(),
|
|
727
930
|
capabilities: ServerCapabilitiesSchema,
|
|
728
931
|
serverInfo: ImplementationSchema,
|
|
932
|
+
/**
|
|
933
|
+
* Instructions describing how to use the server and its features.
|
|
934
|
+
*
|
|
935
|
+
* 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.
|
|
936
|
+
*/
|
|
729
937
|
instructions: string().optional()
|
|
730
938
|
});
|
|
731
939
|
/**
|
|
@@ -743,13 +951,25 @@ var PingRequestSchema = RequestSchema.extend({
|
|
|
743
951
|
params: BaseRequestParamsSchema.optional()
|
|
744
952
|
});
|
|
745
953
|
var ProgressSchema = object({
|
|
954
|
+
/**
|
|
955
|
+
* The progress thus far. This should increase every time progress is made, even if the total is unknown.
|
|
956
|
+
*/
|
|
746
957
|
progress: number(),
|
|
958
|
+
/**
|
|
959
|
+
* Total number of items to process (or total progress required), if known.
|
|
960
|
+
*/
|
|
747
961
|
total: optional(number()),
|
|
962
|
+
/**
|
|
963
|
+
* An optional message describing the current progress.
|
|
964
|
+
*/
|
|
748
965
|
message: optional(string())
|
|
749
966
|
});
|
|
750
967
|
var ProgressNotificationParamsSchema = object({
|
|
751
968
|
...NotificationsParamsSchema.shape,
|
|
752
969
|
...ProgressSchema.shape,
|
|
970
|
+
/**
|
|
971
|
+
* The progress token which was given in the initial request, used to associate this notification with the request that is proceeding.
|
|
972
|
+
*/
|
|
753
973
|
progressToken: ProgressTokenSchema
|
|
754
974
|
});
|
|
755
975
|
/**
|
|
@@ -761,9 +981,19 @@ var ProgressNotificationSchema = NotificationSchema.extend({
|
|
|
761
981
|
method: literal("notifications/progress"),
|
|
762
982
|
params: ProgressNotificationParamsSchema
|
|
763
983
|
});
|
|
764
|
-
var PaginatedRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
984
|
+
var PaginatedRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
985
|
+
/**
|
|
986
|
+
* An opaque token representing the current pagination position.
|
|
987
|
+
* If provided, the server should return results starting after this cursor.
|
|
988
|
+
*/
|
|
989
|
+
cursor: CursorSchema.optional() });
|
|
765
990
|
var PaginatedRequestSchema = RequestSchema.extend({ params: PaginatedRequestParamsSchema.optional() });
|
|
766
|
-
var PaginatedResultSchema = ResultSchema.extend({
|
|
991
|
+
var PaginatedResultSchema = ResultSchema.extend({
|
|
992
|
+
/**
|
|
993
|
+
* An opaque token representing the pagination position after the last returned result.
|
|
994
|
+
* If present, there may be more results available.
|
|
995
|
+
*/
|
|
996
|
+
nextCursor: CursorSchema.optional() });
|
|
767
997
|
/**
|
|
768
998
|
* The status of a task.
|
|
769
999
|
* */
|
|
@@ -780,10 +1010,23 @@ var TaskStatusSchema = _enum([
|
|
|
780
1010
|
var TaskSchema = object({
|
|
781
1011
|
taskId: string(),
|
|
782
1012
|
status: TaskStatusSchema,
|
|
1013
|
+
/**
|
|
1014
|
+
* Time in milliseconds to keep task results available after completion.
|
|
1015
|
+
* If null, the task has unlimited lifetime until manually cleaned up.
|
|
1016
|
+
*/
|
|
783
1017
|
ttl: union([number(), _null()]),
|
|
1018
|
+
/**
|
|
1019
|
+
* ISO 8601 timestamp when the task was created.
|
|
1020
|
+
*/
|
|
784
1021
|
createdAt: string(),
|
|
1022
|
+
/**
|
|
1023
|
+
* ISO 8601 timestamp when the task was last updated.
|
|
1024
|
+
*/
|
|
785
1025
|
lastUpdatedAt: string(),
|
|
786
1026
|
pollInterval: optional(number()),
|
|
1027
|
+
/**
|
|
1028
|
+
* Optional diagnostic message for failed tasks or other status information.
|
|
1029
|
+
*/
|
|
787
1030
|
statusMessage: optional(string())
|
|
788
1031
|
});
|
|
789
1032
|
/**
|
|
@@ -840,11 +1083,25 @@ ResultSchema.merge(TaskSchema);
|
|
|
840
1083
|
* The contents of a specific resource or sub-resource.
|
|
841
1084
|
*/
|
|
842
1085
|
var ResourceContentsSchema = object({
|
|
1086
|
+
/**
|
|
1087
|
+
* The URI of this resource.
|
|
1088
|
+
*/
|
|
843
1089
|
uri: string(),
|
|
1090
|
+
/**
|
|
1091
|
+
* The MIME type of this resource, if known.
|
|
1092
|
+
*/
|
|
844
1093
|
mimeType: optional(string()),
|
|
1094
|
+
/**
|
|
1095
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
1096
|
+
* for notes on _meta usage.
|
|
1097
|
+
*/
|
|
845
1098
|
_meta: record(string(), unknown()).optional()
|
|
846
1099
|
});
|
|
847
|
-
var TextResourceContentsSchema = ResourceContentsSchema.extend({
|
|
1100
|
+
var TextResourceContentsSchema = ResourceContentsSchema.extend({
|
|
1101
|
+
/**
|
|
1102
|
+
* The text of the item. This must only be set if the item can actually be represented as text (not binary data).
|
|
1103
|
+
*/
|
|
1104
|
+
text: string() });
|
|
848
1105
|
/**
|
|
849
1106
|
* A Zod schema for validating Base64 strings that is more performant and
|
|
850
1107
|
* robust for very large inputs than the default regex-based check. It avoids
|
|
@@ -858,7 +1115,11 @@ var Base64Schema = string().refine((val) => {
|
|
|
858
1115
|
return false;
|
|
859
1116
|
}
|
|
860
1117
|
}, { message: "Invalid Base64 string" });
|
|
861
|
-
var BlobResourceContentsSchema = ResourceContentsSchema.extend({
|
|
1118
|
+
var BlobResourceContentsSchema = ResourceContentsSchema.extend({
|
|
1119
|
+
/**
|
|
1120
|
+
* A base64-encoded string representing the binary data of the item.
|
|
1121
|
+
*/
|
|
1122
|
+
blob: Base64Schema });
|
|
862
1123
|
/**
|
|
863
1124
|
* The sender or recipient of messages and data in a conversation.
|
|
864
1125
|
*/
|
|
@@ -867,8 +1128,17 @@ var RoleSchema = _enum(["user", "assistant"]);
|
|
|
867
1128
|
* Optional annotations providing clients additional context about a resource.
|
|
868
1129
|
*/
|
|
869
1130
|
var AnnotationsSchema = object({
|
|
1131
|
+
/**
|
|
1132
|
+
* Intended audience(s) for the resource.
|
|
1133
|
+
*/
|
|
870
1134
|
audience: array(RoleSchema).optional(),
|
|
1135
|
+
/**
|
|
1136
|
+
* Importance hint for the resource, from 0 (least) to 1 (most).
|
|
1137
|
+
*/
|
|
871
1138
|
priority: number().min(0).max(1).optional(),
|
|
1139
|
+
/**
|
|
1140
|
+
* ISO 8601 timestamp for the most recent modification.
|
|
1141
|
+
*/
|
|
872
1142
|
lastModified: datetime({ offset: true }).optional()
|
|
873
1143
|
});
|
|
874
1144
|
/**
|
|
@@ -877,11 +1147,34 @@ var AnnotationsSchema = object({
|
|
|
877
1147
|
var ResourceSchema = object({
|
|
878
1148
|
...BaseMetadataSchema.shape,
|
|
879
1149
|
...IconsSchema.shape,
|
|
1150
|
+
/**
|
|
1151
|
+
* The URI of this resource.
|
|
1152
|
+
*/
|
|
880
1153
|
uri: string(),
|
|
1154
|
+
/**
|
|
1155
|
+
* A description of what this resource represents.
|
|
1156
|
+
*
|
|
1157
|
+
* This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
|
|
1158
|
+
*/
|
|
881
1159
|
description: optional(string()),
|
|
1160
|
+
/**
|
|
1161
|
+
* The MIME type of this resource, if known.
|
|
1162
|
+
*/
|
|
882
1163
|
mimeType: optional(string()),
|
|
1164
|
+
/**
|
|
1165
|
+
* The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.
|
|
1166
|
+
*
|
|
1167
|
+
* This can be used by Hosts to display file sizes and estimate context window usage.
|
|
1168
|
+
*/
|
|
883
1169
|
size: optional(number()),
|
|
1170
|
+
/**
|
|
1171
|
+
* Optional annotations for the client.
|
|
1172
|
+
*/
|
|
884
1173
|
annotations: AnnotationsSchema.optional(),
|
|
1174
|
+
/**
|
|
1175
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
1176
|
+
* for notes on _meta usage.
|
|
1177
|
+
*/
|
|
885
1178
|
_meta: optional(looseObject({}))
|
|
886
1179
|
});
|
|
887
1180
|
/**
|
|
@@ -890,10 +1183,28 @@ var ResourceSchema = object({
|
|
|
890
1183
|
var ResourceTemplateSchema = object({
|
|
891
1184
|
...BaseMetadataSchema.shape,
|
|
892
1185
|
...IconsSchema.shape,
|
|
1186
|
+
/**
|
|
1187
|
+
* A URI template (according to RFC 6570) that can be used to construct resource URIs.
|
|
1188
|
+
*/
|
|
893
1189
|
uriTemplate: string(),
|
|
1190
|
+
/**
|
|
1191
|
+
* A description of what this template is for.
|
|
1192
|
+
*
|
|
1193
|
+
* This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
|
|
1194
|
+
*/
|
|
894
1195
|
description: optional(string()),
|
|
1196
|
+
/**
|
|
1197
|
+
* The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type.
|
|
1198
|
+
*/
|
|
895
1199
|
mimeType: optional(string()),
|
|
1200
|
+
/**
|
|
1201
|
+
* Optional annotations for the client.
|
|
1202
|
+
*/
|
|
896
1203
|
annotations: AnnotationsSchema.optional(),
|
|
1204
|
+
/**
|
|
1205
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
1206
|
+
* for notes on _meta usage.
|
|
1207
|
+
*/
|
|
897
1208
|
_meta: optional(looseObject({}))
|
|
898
1209
|
});
|
|
899
1210
|
/**
|
|
@@ -912,7 +1223,13 @@ var ListResourceTemplatesRequestSchema$1 = PaginatedRequestSchema.extend({ metho
|
|
|
912
1223
|
* The server's response to a resources/templates/list request from the client.
|
|
913
1224
|
*/
|
|
914
1225
|
var ListResourceTemplatesResultSchema = PaginatedResultSchema.extend({ resourceTemplates: array(ResourceTemplateSchema) });
|
|
915
|
-
var ResourceRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
1226
|
+
var ResourceRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
1227
|
+
/**
|
|
1228
|
+
* The URI of the resource to read. The URI can use any protocol; it is up to the server how to interpret it.
|
|
1229
|
+
*
|
|
1230
|
+
* @format uri
|
|
1231
|
+
*/
|
|
1232
|
+
uri: string() });
|
|
916
1233
|
/**
|
|
917
1234
|
* Parameters for a `resources/read` request.
|
|
918
1235
|
*/
|
|
@@ -954,7 +1271,11 @@ var UnsubscribeRequestSchema = RequestSchema.extend({
|
|
|
954
1271
|
/**
|
|
955
1272
|
* Parameters for a `notifications/resources/updated` notification.
|
|
956
1273
|
*/
|
|
957
|
-
var ResourceUpdatedNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
1274
|
+
var ResourceUpdatedNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
1275
|
+
/**
|
|
1276
|
+
* The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to.
|
|
1277
|
+
*/
|
|
1278
|
+
uri: string() });
|
|
958
1279
|
/**
|
|
959
1280
|
* A notification from the server to the client, informing it that a resource has changed and may need to be read again. This should only be sent if the client previously sent a resources/subscribe request.
|
|
960
1281
|
*/
|
|
@@ -966,8 +1287,17 @@ var ResourceUpdatedNotificationSchema = NotificationSchema.extend({
|
|
|
966
1287
|
* Describes an argument that a prompt can accept.
|
|
967
1288
|
*/
|
|
968
1289
|
var PromptArgumentSchema = object({
|
|
1290
|
+
/**
|
|
1291
|
+
* The name of the argument.
|
|
1292
|
+
*/
|
|
969
1293
|
name: string(),
|
|
1294
|
+
/**
|
|
1295
|
+
* A human-readable description of the argument.
|
|
1296
|
+
*/
|
|
970
1297
|
description: optional(string()),
|
|
1298
|
+
/**
|
|
1299
|
+
* Whether this argument must be provided.
|
|
1300
|
+
*/
|
|
971
1301
|
required: optional(boolean())
|
|
972
1302
|
});
|
|
973
1303
|
/**
|
|
@@ -976,8 +1306,18 @@ var PromptArgumentSchema = object({
|
|
|
976
1306
|
var PromptSchema = object({
|
|
977
1307
|
...BaseMetadataSchema.shape,
|
|
978
1308
|
...IconsSchema.shape,
|
|
1309
|
+
/**
|
|
1310
|
+
* An optional description of what this prompt provides
|
|
1311
|
+
*/
|
|
979
1312
|
description: optional(string()),
|
|
1313
|
+
/**
|
|
1314
|
+
* A list of arguments to use for templating the prompt.
|
|
1315
|
+
*/
|
|
980
1316
|
arguments: optional(array(PromptArgumentSchema)),
|
|
1317
|
+
/**
|
|
1318
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
1319
|
+
* for notes on _meta usage.
|
|
1320
|
+
*/
|
|
981
1321
|
_meta: optional(looseObject({}))
|
|
982
1322
|
});
|
|
983
1323
|
/**
|
|
@@ -992,7 +1332,13 @@ var ListPromptsResultSchema = PaginatedResultSchema.extend({ prompts: array(Prom
|
|
|
992
1332
|
* Parameters for a `prompts/get` request.
|
|
993
1333
|
*/
|
|
994
1334
|
var GetPromptRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
1335
|
+
/**
|
|
1336
|
+
* The name of the prompt or prompt template.
|
|
1337
|
+
*/
|
|
995
1338
|
name: string(),
|
|
1339
|
+
/**
|
|
1340
|
+
* Arguments to use for templating the prompt.
|
|
1341
|
+
*/
|
|
996
1342
|
arguments: record(string(), string()).optional()
|
|
997
1343
|
});
|
|
998
1344
|
/**
|
|
@@ -1007,8 +1353,18 @@ var GetPromptRequestSchema$1 = RequestSchema.extend({
|
|
|
1007
1353
|
*/
|
|
1008
1354
|
var TextContentSchema = object({
|
|
1009
1355
|
type: literal("text"),
|
|
1356
|
+
/**
|
|
1357
|
+
* The text content of the message.
|
|
1358
|
+
*/
|
|
1010
1359
|
text: string(),
|
|
1360
|
+
/**
|
|
1361
|
+
* Optional annotations for the client.
|
|
1362
|
+
*/
|
|
1011
1363
|
annotations: AnnotationsSchema.optional(),
|
|
1364
|
+
/**
|
|
1365
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
1366
|
+
* for notes on _meta usage.
|
|
1367
|
+
*/
|
|
1012
1368
|
_meta: record(string(), unknown()).optional()
|
|
1013
1369
|
});
|
|
1014
1370
|
/**
|
|
@@ -1016,9 +1372,22 @@ var TextContentSchema = object({
|
|
|
1016
1372
|
*/
|
|
1017
1373
|
var ImageContentSchema = object({
|
|
1018
1374
|
type: literal("image"),
|
|
1375
|
+
/**
|
|
1376
|
+
* The base64-encoded image data.
|
|
1377
|
+
*/
|
|
1019
1378
|
data: Base64Schema,
|
|
1379
|
+
/**
|
|
1380
|
+
* The MIME type of the image. Different providers may support different image types.
|
|
1381
|
+
*/
|
|
1020
1382
|
mimeType: string(),
|
|
1383
|
+
/**
|
|
1384
|
+
* Optional annotations for the client.
|
|
1385
|
+
*/
|
|
1021
1386
|
annotations: AnnotationsSchema.optional(),
|
|
1387
|
+
/**
|
|
1388
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
1389
|
+
* for notes on _meta usage.
|
|
1390
|
+
*/
|
|
1022
1391
|
_meta: record(string(), unknown()).optional()
|
|
1023
1392
|
});
|
|
1024
1393
|
/**
|
|
@@ -1026,9 +1395,22 @@ var ImageContentSchema = object({
|
|
|
1026
1395
|
*/
|
|
1027
1396
|
var AudioContentSchema = object({
|
|
1028
1397
|
type: literal("audio"),
|
|
1398
|
+
/**
|
|
1399
|
+
* The base64-encoded audio data.
|
|
1400
|
+
*/
|
|
1029
1401
|
data: Base64Schema,
|
|
1402
|
+
/**
|
|
1403
|
+
* The MIME type of the audio. Different providers may support different audio types.
|
|
1404
|
+
*/
|
|
1030
1405
|
mimeType: string(),
|
|
1406
|
+
/**
|
|
1407
|
+
* Optional annotations for the client.
|
|
1408
|
+
*/
|
|
1031
1409
|
annotations: AnnotationsSchema.optional(),
|
|
1410
|
+
/**
|
|
1411
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
1412
|
+
* for notes on _meta usage.
|
|
1413
|
+
*/
|
|
1032
1414
|
_meta: record(string(), unknown()).optional()
|
|
1033
1415
|
});
|
|
1034
1416
|
/**
|
|
@@ -1037,9 +1419,25 @@ var AudioContentSchema = object({
|
|
|
1037
1419
|
*/
|
|
1038
1420
|
var ToolUseContentSchema = object({
|
|
1039
1421
|
type: literal("tool_use"),
|
|
1422
|
+
/**
|
|
1423
|
+
* The name of the tool to invoke.
|
|
1424
|
+
* Must match a tool name from the request's tools array.
|
|
1425
|
+
*/
|
|
1040
1426
|
name: string(),
|
|
1427
|
+
/**
|
|
1428
|
+
* Unique identifier for this tool call.
|
|
1429
|
+
* Used to correlate with ToolResultContent in subsequent messages.
|
|
1430
|
+
*/
|
|
1041
1431
|
id: string(),
|
|
1432
|
+
/**
|
|
1433
|
+
* Arguments to pass to the tool.
|
|
1434
|
+
* Must conform to the tool's inputSchema.
|
|
1435
|
+
*/
|
|
1042
1436
|
input: record(string(), unknown()),
|
|
1437
|
+
/**
|
|
1438
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
1439
|
+
* for notes on _meta usage.
|
|
1440
|
+
*/
|
|
1043
1441
|
_meta: record(string(), unknown()).optional()
|
|
1044
1442
|
});
|
|
1045
1443
|
/**
|
|
@@ -1048,7 +1446,14 @@ var ToolUseContentSchema = object({
|
|
|
1048
1446
|
var EmbeddedResourceSchema = object({
|
|
1049
1447
|
type: literal("resource"),
|
|
1050
1448
|
resource: union([TextResourceContentsSchema, BlobResourceContentsSchema]),
|
|
1449
|
+
/**
|
|
1450
|
+
* Optional annotations for the client.
|
|
1451
|
+
*/
|
|
1051
1452
|
annotations: AnnotationsSchema.optional(),
|
|
1453
|
+
/**
|
|
1454
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
1455
|
+
* for notes on _meta usage.
|
|
1456
|
+
*/
|
|
1052
1457
|
_meta: record(string(), unknown()).optional()
|
|
1053
1458
|
});
|
|
1054
1459
|
/**
|
|
@@ -1072,6 +1477,9 @@ var PromptMessageSchema = object({
|
|
|
1072
1477
|
* The server's response to a prompts/get request from the client.
|
|
1073
1478
|
*/
|
|
1074
1479
|
var GetPromptResultSchema = ResultSchema.extend({
|
|
1480
|
+
/**
|
|
1481
|
+
* An optional description for the prompt.
|
|
1482
|
+
*/
|
|
1075
1483
|
description: string().optional(),
|
|
1076
1484
|
messages: array(PromptMessageSchema)
|
|
1077
1485
|
});
|
|
@@ -1093,16 +1501,57 @@ var PromptListChangedNotificationSchema = NotificationSchema.extend({
|
|
|
1093
1501
|
* received from untrusted servers.
|
|
1094
1502
|
*/
|
|
1095
1503
|
var ToolAnnotationsSchema = object({
|
|
1504
|
+
/**
|
|
1505
|
+
* A human-readable title for the tool.
|
|
1506
|
+
*/
|
|
1096
1507
|
title: string().optional(),
|
|
1508
|
+
/**
|
|
1509
|
+
* If true, the tool does not modify its environment.
|
|
1510
|
+
*
|
|
1511
|
+
* Default: false
|
|
1512
|
+
*/
|
|
1097
1513
|
readOnlyHint: boolean().optional(),
|
|
1514
|
+
/**
|
|
1515
|
+
* If true, the tool may perform destructive updates to its environment.
|
|
1516
|
+
* If false, the tool performs only additive updates.
|
|
1517
|
+
*
|
|
1518
|
+
* (This property is meaningful only when `readOnlyHint == false`)
|
|
1519
|
+
*
|
|
1520
|
+
* Default: true
|
|
1521
|
+
*/
|
|
1098
1522
|
destructiveHint: boolean().optional(),
|
|
1523
|
+
/**
|
|
1524
|
+
* If true, calling the tool repeatedly with the same arguments
|
|
1525
|
+
* will have no additional effect on the its environment.
|
|
1526
|
+
*
|
|
1527
|
+
* (This property is meaningful only when `readOnlyHint == false`)
|
|
1528
|
+
*
|
|
1529
|
+
* Default: false
|
|
1530
|
+
*/
|
|
1099
1531
|
idempotentHint: boolean().optional(),
|
|
1532
|
+
/**
|
|
1533
|
+
* If true, this tool may interact with an "open world" of external
|
|
1534
|
+
* entities. If false, the tool's domain of interaction is closed.
|
|
1535
|
+
* For example, the world of a web search tool is open, whereas that
|
|
1536
|
+
* of a memory tool is not.
|
|
1537
|
+
*
|
|
1538
|
+
* Default: true
|
|
1539
|
+
*/
|
|
1100
1540
|
openWorldHint: boolean().optional()
|
|
1101
1541
|
});
|
|
1102
1542
|
/**
|
|
1103
1543
|
* Execution-related properties for a tool.
|
|
1104
1544
|
*/
|
|
1105
|
-
var ToolExecutionSchema = object({
|
|
1545
|
+
var ToolExecutionSchema = object({
|
|
1546
|
+
/**
|
|
1547
|
+
* Indicates the tool's preference for task-augmented execution.
|
|
1548
|
+
* - "required": Clients MUST invoke the tool as a task
|
|
1549
|
+
* - "optional": Clients MAY invoke the tool as a task or normal request
|
|
1550
|
+
* - "forbidden": Clients MUST NOT attempt to invoke the tool as a task
|
|
1551
|
+
*
|
|
1552
|
+
* If not present, defaults to "forbidden".
|
|
1553
|
+
*/
|
|
1554
|
+
taskSupport: _enum([
|
|
1106
1555
|
"required",
|
|
1107
1556
|
"optional",
|
|
1108
1557
|
"forbidden"
|
|
@@ -1113,19 +1562,41 @@ var ToolExecutionSchema = object({ taskSupport: _enum([
|
|
|
1113
1562
|
var ToolSchema = object({
|
|
1114
1563
|
...BaseMetadataSchema.shape,
|
|
1115
1564
|
...IconsSchema.shape,
|
|
1565
|
+
/**
|
|
1566
|
+
* A human-readable description of the tool.
|
|
1567
|
+
*/
|
|
1116
1568
|
description: string().optional(),
|
|
1569
|
+
/**
|
|
1570
|
+
* A JSON Schema 2020-12 object defining the expected parameters for the tool.
|
|
1571
|
+
* Must have type: 'object' at the root level per MCP spec.
|
|
1572
|
+
*/
|
|
1117
1573
|
inputSchema: object({
|
|
1118
1574
|
type: literal("object"),
|
|
1119
1575
|
properties: record(string(), AssertObjectSchema).optional(),
|
|
1120
1576
|
required: array(string()).optional()
|
|
1121
1577
|
}).catchall(unknown()),
|
|
1578
|
+
/**
|
|
1579
|
+
* An optional JSON Schema 2020-12 object defining the structure of the tool's output
|
|
1580
|
+
* returned in the structuredContent field of a CallToolResult.
|
|
1581
|
+
* Must have type: 'object' at the root level per MCP spec.
|
|
1582
|
+
*/
|
|
1122
1583
|
outputSchema: object({
|
|
1123
1584
|
type: literal("object"),
|
|
1124
1585
|
properties: record(string(), AssertObjectSchema).optional(),
|
|
1125
1586
|
required: array(string()).optional()
|
|
1126
1587
|
}).catchall(unknown()).optional(),
|
|
1588
|
+
/**
|
|
1589
|
+
* Optional additional tool information.
|
|
1590
|
+
*/
|
|
1127
1591
|
annotations: ToolAnnotationsSchema.optional(),
|
|
1592
|
+
/**
|
|
1593
|
+
* Execution-related properties for this tool.
|
|
1594
|
+
*/
|
|
1128
1595
|
execution: ToolExecutionSchema.optional(),
|
|
1596
|
+
/**
|
|
1597
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
1598
|
+
* for notes on _meta usage.
|
|
1599
|
+
*/
|
|
1129
1600
|
_meta: record(string(), unknown()).optional()
|
|
1130
1601
|
});
|
|
1131
1602
|
/**
|
|
@@ -1140,8 +1611,33 @@ var ListToolsResultSchema = PaginatedResultSchema.extend({ tools: array(ToolSche
|
|
|
1140
1611
|
* The server's response to a tool call.
|
|
1141
1612
|
*/
|
|
1142
1613
|
var CallToolResultSchema = ResultSchema.extend({
|
|
1614
|
+
/**
|
|
1615
|
+
* A list of content objects that represent the result of the tool call.
|
|
1616
|
+
*
|
|
1617
|
+
* If the Tool does not define an outputSchema, this field MUST be present in the result.
|
|
1618
|
+
* For backwards compatibility, this field is always present, but it may be empty.
|
|
1619
|
+
*/
|
|
1143
1620
|
content: array(ContentBlockSchema).default([]),
|
|
1621
|
+
/**
|
|
1622
|
+
* An object containing structured tool output.
|
|
1623
|
+
*
|
|
1624
|
+
* If the Tool defines an outputSchema, this field MUST be present in the result, and contain a JSON object that matches the schema.
|
|
1625
|
+
*/
|
|
1144
1626
|
structuredContent: record(string(), unknown()).optional(),
|
|
1627
|
+
/**
|
|
1628
|
+
* Whether the tool call ended in an error.
|
|
1629
|
+
*
|
|
1630
|
+
* If not set, this is assumed to be false (the call was successful).
|
|
1631
|
+
*
|
|
1632
|
+
* Any errors that originate from the tool SHOULD be reported inside the result
|
|
1633
|
+
* object, with `isError` set to true, _not_ as an MCP protocol-level error
|
|
1634
|
+
* response. Otherwise, the LLM would not be able to see that an error occurred
|
|
1635
|
+
* and self-correct.
|
|
1636
|
+
*
|
|
1637
|
+
* However, any errors in _finding_ the tool, an error indicating that the
|
|
1638
|
+
* server does not support tool calls, or any other exceptional conditions,
|
|
1639
|
+
* should be reported as an MCP error response.
|
|
1640
|
+
*/
|
|
1145
1641
|
isError: boolean().optional()
|
|
1146
1642
|
});
|
|
1147
1643
|
CallToolResultSchema.or(ResultSchema.extend({ toolResult: unknown() }));
|
|
@@ -1149,7 +1645,13 @@ CallToolResultSchema.or(ResultSchema.extend({ toolResult: unknown() }));
|
|
|
1149
1645
|
* Parameters for a `tools/call` request.
|
|
1150
1646
|
*/
|
|
1151
1647
|
var CallToolRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
1648
|
+
/**
|
|
1649
|
+
* The name of the tool to call.
|
|
1650
|
+
*/
|
|
1152
1651
|
name: string(),
|
|
1652
|
+
/**
|
|
1653
|
+
* Arguments to pass to the tool.
|
|
1654
|
+
*/
|
|
1153
1655
|
arguments: record(string(), unknown()).optional()
|
|
1154
1656
|
});
|
|
1155
1657
|
/**
|
|
@@ -1167,7 +1669,23 @@ var ToolListChangedNotificationSchema = NotificationSchema.extend({
|
|
|
1167
1669
|
params: NotificationsParamsSchema.optional()
|
|
1168
1670
|
});
|
|
1169
1671
|
object({
|
|
1672
|
+
/**
|
|
1673
|
+
* If true, the list will be refreshed automatically when a list changed notification is received.
|
|
1674
|
+
* The callback will be called with the updated list.
|
|
1675
|
+
*
|
|
1676
|
+
* If false, the callback will be called with null items, allowing manual refresh.
|
|
1677
|
+
*
|
|
1678
|
+
* @default true
|
|
1679
|
+
*/
|
|
1170
1680
|
autoRefresh: boolean().default(true),
|
|
1681
|
+
/**
|
|
1682
|
+
* Debounce time in milliseconds for list changed notification processing.
|
|
1683
|
+
*
|
|
1684
|
+
* Multiple notifications received within this timeframe will only trigger one refresh.
|
|
1685
|
+
* Set to 0 to disable debouncing.
|
|
1686
|
+
*
|
|
1687
|
+
* @default 300
|
|
1688
|
+
*/
|
|
1171
1689
|
debounceMs: number().int().nonnegative().default(300)
|
|
1172
1690
|
});
|
|
1173
1691
|
/**
|
|
@@ -1186,7 +1704,11 @@ var LoggingLevelSchema = _enum([
|
|
|
1186
1704
|
/**
|
|
1187
1705
|
* Parameters for a `logging/setLevel` request.
|
|
1188
1706
|
*/
|
|
1189
|
-
var SetLevelRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
1707
|
+
var SetLevelRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
1708
|
+
/**
|
|
1709
|
+
* 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.
|
|
1710
|
+
*/
|
|
1711
|
+
level: LoggingLevelSchema });
|
|
1190
1712
|
/**
|
|
1191
1713
|
* A request from the client to the server, to enable or adjust logging.
|
|
1192
1714
|
*/
|
|
@@ -1198,8 +1720,17 @@ var SetLevelRequestSchema = RequestSchema.extend({
|
|
|
1198
1720
|
* Parameters for a `notifications/message` notification.
|
|
1199
1721
|
*/
|
|
1200
1722
|
var LoggingMessageNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
1723
|
+
/**
|
|
1724
|
+
* The severity of this log message.
|
|
1725
|
+
*/
|
|
1201
1726
|
level: LoggingLevelSchema,
|
|
1727
|
+
/**
|
|
1728
|
+
* An optional name of the logger issuing this message.
|
|
1729
|
+
*/
|
|
1202
1730
|
logger: string().optional(),
|
|
1731
|
+
/**
|
|
1732
|
+
* The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here.
|
|
1733
|
+
*/
|
|
1203
1734
|
data: unknown()
|
|
1204
1735
|
});
|
|
1205
1736
|
/**
|
|
@@ -1213,15 +1744,38 @@ var LoggingMessageNotificationSchema = NotificationSchema.extend({
|
|
|
1213
1744
|
* The server's preferences for model selection, requested of the client during sampling.
|
|
1214
1745
|
*/
|
|
1215
1746
|
var ModelPreferencesSchema = object({
|
|
1216
|
-
|
|
1747
|
+
/**
|
|
1748
|
+
* Optional hints to use for model selection.
|
|
1749
|
+
*/
|
|
1750
|
+
hints: array(object({
|
|
1751
|
+
/**
|
|
1752
|
+
* A hint for a model name.
|
|
1753
|
+
*/
|
|
1754
|
+
name: string().optional() })).optional(),
|
|
1755
|
+
/**
|
|
1756
|
+
* How much to prioritize cost when selecting a model.
|
|
1757
|
+
*/
|
|
1217
1758
|
costPriority: number().min(0).max(1).optional(),
|
|
1759
|
+
/**
|
|
1760
|
+
* How much to prioritize sampling speed (latency) when selecting a model.
|
|
1761
|
+
*/
|
|
1218
1762
|
speedPriority: number().min(0).max(1).optional(),
|
|
1763
|
+
/**
|
|
1764
|
+
* How much to prioritize intelligence and capabilities when selecting a model.
|
|
1765
|
+
*/
|
|
1219
1766
|
intelligencePriority: number().min(0).max(1).optional()
|
|
1220
1767
|
});
|
|
1221
1768
|
/**
|
|
1222
1769
|
* Controls tool usage behavior in sampling requests.
|
|
1223
1770
|
*/
|
|
1224
|
-
var ToolChoiceSchema = object({
|
|
1771
|
+
var ToolChoiceSchema = object({
|
|
1772
|
+
/**
|
|
1773
|
+
* Controls when tools are used:
|
|
1774
|
+
* - "auto": Model decides whether to use tools (default)
|
|
1775
|
+
* - "required": Model MUST use at least one tool before completing
|
|
1776
|
+
* - "none": Model MUST NOT use any tools
|
|
1777
|
+
*/
|
|
1778
|
+
mode: _enum([
|
|
1225
1779
|
"auto",
|
|
1226
1780
|
"required",
|
|
1227
1781
|
"none"
|
|
@@ -1236,6 +1790,10 @@ var ToolResultContentSchema = object({
|
|
|
1236
1790
|
content: array(ContentBlockSchema).default([]),
|
|
1237
1791
|
structuredContent: object({}).loose().optional(),
|
|
1238
1792
|
isError: boolean().optional(),
|
|
1793
|
+
/**
|
|
1794
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
1795
|
+
* for notes on _meta usage.
|
|
1796
|
+
*/
|
|
1239
1797
|
_meta: record(string(), unknown()).optional()
|
|
1240
1798
|
});
|
|
1241
1799
|
/**
|
|
@@ -1264,6 +1822,10 @@ var SamplingMessageContentBlockSchema = discriminatedUnion("type", [
|
|
|
1264
1822
|
var SamplingMessageSchema = object({
|
|
1265
1823
|
role: RoleSchema,
|
|
1266
1824
|
content: union([SamplingMessageContentBlockSchema, array(SamplingMessageContentBlockSchema)]),
|
|
1825
|
+
/**
|
|
1826
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
1827
|
+
* for notes on _meta usage.
|
|
1828
|
+
*/
|
|
1267
1829
|
_meta: record(string(), unknown()).optional()
|
|
1268
1830
|
});
|
|
1269
1831
|
/**
|
|
@@ -1271,18 +1833,48 @@ var SamplingMessageSchema = object({
|
|
|
1271
1833
|
*/
|
|
1272
1834
|
var CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
1273
1835
|
messages: array(SamplingMessageSchema),
|
|
1836
|
+
/**
|
|
1837
|
+
* The server's preferences for which model to select. The client MAY modify or omit this request.
|
|
1838
|
+
*/
|
|
1274
1839
|
modelPreferences: ModelPreferencesSchema.optional(),
|
|
1840
|
+
/**
|
|
1841
|
+
* An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt.
|
|
1842
|
+
*/
|
|
1275
1843
|
systemPrompt: string().optional(),
|
|
1844
|
+
/**
|
|
1845
|
+
* A request to include context from one or more MCP servers (including the caller), to be attached to the prompt.
|
|
1846
|
+
* The client MAY ignore this request.
|
|
1847
|
+
*
|
|
1848
|
+
* Default is "none". Values "thisServer" and "allServers" are soft-deprecated. Servers SHOULD only use these values if the client
|
|
1849
|
+
* declares ClientCapabilities.sampling.context. These values may be removed in future spec releases.
|
|
1850
|
+
*/
|
|
1276
1851
|
includeContext: _enum([
|
|
1277
1852
|
"none",
|
|
1278
1853
|
"thisServer",
|
|
1279
1854
|
"allServers"
|
|
1280
1855
|
]).optional(),
|
|
1281
1856
|
temperature: number().optional(),
|
|
1857
|
+
/**
|
|
1858
|
+
* The requested maximum number of tokens to sample (to prevent runaway completions).
|
|
1859
|
+
*
|
|
1860
|
+
* The client MAY choose to sample fewer tokens than the requested maximum.
|
|
1861
|
+
*/
|
|
1282
1862
|
maxTokens: number().int(),
|
|
1283
1863
|
stopSequences: array(string()).optional(),
|
|
1864
|
+
/**
|
|
1865
|
+
* Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific.
|
|
1866
|
+
*/
|
|
1284
1867
|
metadata: AssertObjectSchema.optional(),
|
|
1868
|
+
/**
|
|
1869
|
+
* Tools that the model may use during generation.
|
|
1870
|
+
* The client MUST return an error if this field is provided but ClientCapabilities.sampling.tools is not declared.
|
|
1871
|
+
*/
|
|
1285
1872
|
tools: array(ToolSchema).optional(),
|
|
1873
|
+
/**
|
|
1874
|
+
* Controls how the model uses tools.
|
|
1875
|
+
* The client MUST return an error if this field is provided but ClientCapabilities.sampling.tools is not declared.
|
|
1876
|
+
* Default is `{ mode: "auto" }`.
|
|
1877
|
+
*/
|
|
1286
1878
|
toolChoice: ToolChoiceSchema.optional()
|
|
1287
1879
|
});
|
|
1288
1880
|
/**
|
|
@@ -1298,13 +1890,29 @@ var CreateMessageRequestSchema = RequestSchema.extend({
|
|
|
1298
1890
|
* Used when the request does not include tools.
|
|
1299
1891
|
*/
|
|
1300
1892
|
var CreateMessageResultSchema = ResultSchema.extend({
|
|
1893
|
+
/**
|
|
1894
|
+
* The name of the model that generated the message.
|
|
1895
|
+
*/
|
|
1301
1896
|
model: string(),
|
|
1897
|
+
/**
|
|
1898
|
+
* The reason why sampling stopped, if known.
|
|
1899
|
+
*
|
|
1900
|
+
* Standard values:
|
|
1901
|
+
* - "endTurn": Natural end of the assistant's turn
|
|
1902
|
+
* - "stopSequence": A stop sequence was encountered
|
|
1903
|
+
* - "maxTokens": Maximum token limit was reached
|
|
1904
|
+
*
|
|
1905
|
+
* This field is an open string to allow for provider-specific stop reasons.
|
|
1906
|
+
*/
|
|
1302
1907
|
stopReason: optional(_enum([
|
|
1303
1908
|
"endTurn",
|
|
1304
1909
|
"stopSequence",
|
|
1305
1910
|
"maxTokens"
|
|
1306
1911
|
]).or(string())),
|
|
1307
1912
|
role: RoleSchema,
|
|
1913
|
+
/**
|
|
1914
|
+
* Response content. Single content block (text, image, or audio).
|
|
1915
|
+
*/
|
|
1308
1916
|
content: SamplingContentSchema
|
|
1309
1917
|
});
|
|
1310
1918
|
/**
|
|
@@ -1312,7 +1920,21 @@ var CreateMessageResultSchema = ResultSchema.extend({
|
|
|
1312
1920
|
* This version supports array content for tool use flows.
|
|
1313
1921
|
*/
|
|
1314
1922
|
var CreateMessageResultWithToolsSchema = ResultSchema.extend({
|
|
1923
|
+
/**
|
|
1924
|
+
* The name of the model that generated the message.
|
|
1925
|
+
*/
|
|
1315
1926
|
model: string(),
|
|
1927
|
+
/**
|
|
1928
|
+
* The reason why sampling stopped, if known.
|
|
1929
|
+
*
|
|
1930
|
+
* Standard values:
|
|
1931
|
+
* - "endTurn": Natural end of the assistant's turn
|
|
1932
|
+
* - "stopSequence": A stop sequence was encountered
|
|
1933
|
+
* - "maxTokens": Maximum token limit was reached
|
|
1934
|
+
* - "toolUse": The model wants to use one or more tools
|
|
1935
|
+
*
|
|
1936
|
+
* This field is an open string to allow for provider-specific stop reasons.
|
|
1937
|
+
*/
|
|
1316
1938
|
stopReason: optional(_enum([
|
|
1317
1939
|
"endTurn",
|
|
1318
1940
|
"stopSequence",
|
|
@@ -1320,6 +1942,9 @@ var CreateMessageResultWithToolsSchema = ResultSchema.extend({
|
|
|
1320
1942
|
"toolUse"
|
|
1321
1943
|
]).or(string())),
|
|
1322
1944
|
role: RoleSchema,
|
|
1945
|
+
/**
|
|
1946
|
+
* Response content. May be a single block or array. May include ToolUseContent if stopReason is "toolUse".
|
|
1947
|
+
*/
|
|
1323
1948
|
content: union([SamplingMessageContentBlockSchema, array(SamplingMessageContentBlockSchema)])
|
|
1324
1949
|
});
|
|
1325
1950
|
/**
|
|
@@ -1428,17 +2053,42 @@ var PrimitiveSchemaDefinitionSchema = union([
|
|
|
1428
2053
|
* The parameters for a request to elicit additional information from the user via the client.
|
|
1429
2054
|
*/
|
|
1430
2055
|
var ElicitRequestParamsSchema = union([TaskAugmentedRequestParamsSchema.extend({
|
|
2056
|
+
/**
|
|
2057
|
+
* The elicitation mode.
|
|
2058
|
+
*
|
|
2059
|
+
* Optional for backward compatibility. Clients MUST treat missing mode as "form".
|
|
2060
|
+
*/
|
|
1431
2061
|
mode: literal("form").optional(),
|
|
2062
|
+
/**
|
|
2063
|
+
* The message to present to the user describing what information is being requested.
|
|
2064
|
+
*/
|
|
1432
2065
|
message: string(),
|
|
2066
|
+
/**
|
|
2067
|
+
* A restricted subset of JSON Schema.
|
|
2068
|
+
* Only top-level properties are allowed, without nesting.
|
|
2069
|
+
*/
|
|
1433
2070
|
requestedSchema: object({
|
|
1434
2071
|
type: literal("object"),
|
|
1435
2072
|
properties: record(string(), PrimitiveSchemaDefinitionSchema),
|
|
1436
2073
|
required: array(string()).optional()
|
|
1437
2074
|
})
|
|
1438
2075
|
}), TaskAugmentedRequestParamsSchema.extend({
|
|
2076
|
+
/**
|
|
2077
|
+
* The elicitation mode.
|
|
2078
|
+
*/
|
|
1439
2079
|
mode: literal("url"),
|
|
2080
|
+
/**
|
|
2081
|
+
* The message to present to the user explaining why the interaction is needed.
|
|
2082
|
+
*/
|
|
1440
2083
|
message: string(),
|
|
2084
|
+
/**
|
|
2085
|
+
* The ID of the elicitation, which must be unique within the context of the server.
|
|
2086
|
+
* The client MUST treat this ID as an opaque value.
|
|
2087
|
+
*/
|
|
1441
2088
|
elicitationId: string(),
|
|
2089
|
+
/**
|
|
2090
|
+
* The URL that the user should navigate to.
|
|
2091
|
+
*/
|
|
1442
2092
|
url: string().url()
|
|
1443
2093
|
})]);
|
|
1444
2094
|
/**
|
|
@@ -1455,7 +2105,11 @@ var ElicitRequestSchema = RequestSchema.extend({
|
|
|
1455
2105
|
*
|
|
1456
2106
|
* @category notifications/elicitation/complete
|
|
1457
2107
|
*/
|
|
1458
|
-
var ElicitationCompleteNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
2108
|
+
var ElicitationCompleteNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
2109
|
+
/**
|
|
2110
|
+
* The ID of the elicitation that completed.
|
|
2111
|
+
*/
|
|
2112
|
+
elicitationId: string() });
|
|
1459
2113
|
/**
|
|
1460
2114
|
* A notification from the server to the client, informing it of a completion of an out-of-band elicitation request.
|
|
1461
2115
|
*
|
|
@@ -1469,11 +2123,23 @@ var ElicitationCompleteNotificationSchema = NotificationSchema.extend({
|
|
|
1469
2123
|
* The client's response to an elicitation/create request from the server.
|
|
1470
2124
|
*/
|
|
1471
2125
|
var ElicitResultSchema = ResultSchema.extend({
|
|
2126
|
+
/**
|
|
2127
|
+
* The user action in response to the elicitation.
|
|
2128
|
+
* - "accept": User submitted the form/confirmed the action
|
|
2129
|
+
* - "decline": User explicitly decline the action
|
|
2130
|
+
* - "cancel": User dismissed without making an explicit choice
|
|
2131
|
+
*/
|
|
1472
2132
|
action: _enum([
|
|
1473
2133
|
"accept",
|
|
1474
2134
|
"decline",
|
|
1475
2135
|
"cancel"
|
|
1476
2136
|
]),
|
|
2137
|
+
/**
|
|
2138
|
+
* The submitted form data, only present when action is "accept".
|
|
2139
|
+
* Contains values matching the requested schema.
|
|
2140
|
+
* Per MCP spec, content is "typically omitted" for decline/cancel actions.
|
|
2141
|
+
* We normalize null to undefined for leniency while maintaining type compatibility.
|
|
2142
|
+
*/
|
|
1477
2143
|
content: preprocess((val) => val === null ? void 0 : val, record(string(), union([
|
|
1478
2144
|
string(),
|
|
1479
2145
|
number(),
|
|
@@ -1486,6 +2152,9 @@ var ElicitResultSchema = ResultSchema.extend({
|
|
|
1486
2152
|
*/
|
|
1487
2153
|
var ResourceTemplateReferenceSchema = object({
|
|
1488
2154
|
type: literal("ref/resource"),
|
|
2155
|
+
/**
|
|
2156
|
+
* The URI or URI template of the resource.
|
|
2157
|
+
*/
|
|
1489
2158
|
uri: string()
|
|
1490
2159
|
});
|
|
1491
2160
|
/**
|
|
@@ -1493,6 +2162,9 @@ var ResourceTemplateReferenceSchema = object({
|
|
|
1493
2162
|
*/
|
|
1494
2163
|
var PromptReferenceSchema = object({
|
|
1495
2164
|
type: literal("ref/prompt"),
|
|
2165
|
+
/**
|
|
2166
|
+
* The name of the prompt or prompt template
|
|
2167
|
+
*/
|
|
1496
2168
|
name: string()
|
|
1497
2169
|
});
|
|
1498
2170
|
/**
|
|
@@ -1500,11 +2172,24 @@ var PromptReferenceSchema = object({
|
|
|
1500
2172
|
*/
|
|
1501
2173
|
var CompleteRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
1502
2174
|
ref: union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
|
|
2175
|
+
/**
|
|
2176
|
+
* The argument's information
|
|
2177
|
+
*/
|
|
1503
2178
|
argument: object({
|
|
2179
|
+
/**
|
|
2180
|
+
* The name of the argument
|
|
2181
|
+
*/
|
|
1504
2182
|
name: string(),
|
|
2183
|
+
/**
|
|
2184
|
+
* The value of the argument to use for completion matching.
|
|
2185
|
+
*/
|
|
1505
2186
|
value: string()
|
|
1506
2187
|
}),
|
|
1507
|
-
context: object({
|
|
2188
|
+
context: object({
|
|
2189
|
+
/**
|
|
2190
|
+
* Previously-resolved variables in a URI template or prompt.
|
|
2191
|
+
*/
|
|
2192
|
+
arguments: record(string(), string()).optional() }).optional()
|
|
1508
2193
|
});
|
|
1509
2194
|
/**
|
|
1510
2195
|
* A request from the client to the server, to ask for completion options.
|
|
@@ -1517,16 +2202,35 @@ var CompleteRequestSchema = RequestSchema.extend({
|
|
|
1517
2202
|
* The server's response to a completion/complete request
|
|
1518
2203
|
*/
|
|
1519
2204
|
var CompleteResultSchema = ResultSchema.extend({ completion: looseObject({
|
|
2205
|
+
/**
|
|
2206
|
+
* An array of completion values. Must not exceed 100 items.
|
|
2207
|
+
*/
|
|
1520
2208
|
values: array(string()).max(100),
|
|
2209
|
+
/**
|
|
2210
|
+
* The total number of completion options available. This can exceed the number of values actually sent in the response.
|
|
2211
|
+
*/
|
|
1521
2212
|
total: optional(number().int()),
|
|
2213
|
+
/**
|
|
2214
|
+
* Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown.
|
|
2215
|
+
*/
|
|
1522
2216
|
hasMore: optional(boolean())
|
|
1523
2217
|
}) });
|
|
1524
2218
|
/**
|
|
1525
2219
|
* Represents a root directory or file that the server can operate on.
|
|
1526
2220
|
*/
|
|
1527
2221
|
var RootSchema = object({
|
|
2222
|
+
/**
|
|
2223
|
+
* The URI identifying the root. This *must* start with file:// for now.
|
|
2224
|
+
*/
|
|
1528
2225
|
uri: string().startsWith("file://"),
|
|
2226
|
+
/**
|
|
2227
|
+
* An optional name for the root.
|
|
2228
|
+
*/
|
|
1529
2229
|
name: string().optional(),
|
|
2230
|
+
/**
|
|
2231
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
2232
|
+
* for notes on _meta usage.
|
|
2233
|
+
*/
|
|
1530
2234
|
_meta: record(string(), unknown()).optional()
|
|
1531
2235
|
});
|
|
1532
2236
|
/**
|
|
@@ -2531,4 +3235,4 @@ function createHttpApp() {
|
|
|
2531
3235
|
//#endregion
|
|
2532
3236
|
export { handleToolsList as a, handleInitialize as i, createHttpMcpServer as n, jsonRpcError as o, createHttpMcpTransport as r, jsonRpcSuccess as s, createHttpApp as t };
|
|
2533
3237
|
|
|
2534
|
-
//# sourceMappingURL=http-
|
|
3238
|
+
//# sourceMappingURL=http-QQVUnV2e.js.map
|