@wildix/wim-tools-client 0.0.34 → 0.0.35

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.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ToolVariableType = exports.ToolVariableHandler = exports.ToolHandler = exports.ToolWebhookMethod = exports.ToolWebhookAuth = exports.ToolEmailHandler = exports.ToolChatRecipient = exports.ToolExecutionServerException = exports.ToolExecutionException = exports.McpConnectionException = exports.ValidationException = exports.NotFoundException = exports.ForbiddenException = exports.AlreadyExistException = void 0;
3
+ exports.ToolVariableType = exports.ToolVariableInstructionType = exports.ToolHandler = exports.ToolWebhookMethod = exports.ToolWebhookAuth = exports.ToolEmailHandler = exports.ToolChatRecipient = exports.ToolExecutionServerException = exports.ToolExecutionException = exports.McpConnectionException = exports.ToolMcpAuthorization = exports.ValidationException = exports.NotFoundException = exports.ForbiddenException = exports.AlreadyExistException = void 0;
4
4
  const ToolsServiceException_1 = require("./ToolsServiceException");
5
5
  class AlreadyExistException extends ToolsServiceException_1.ToolsServiceException {
6
6
  name = "AlreadyExistException";
@@ -54,6 +54,18 @@ class ValidationException extends ToolsServiceException_1.ToolsServiceException
54
54
  }
55
55
  }
56
56
  exports.ValidationException = ValidationException;
57
+ var ToolMcpAuthorization;
58
+ (function (ToolMcpAuthorization) {
59
+ ToolMcpAuthorization.visit = (value, visitor) => {
60
+ if (value.apiKey !== undefined)
61
+ return visitor.apiKey(value.apiKey);
62
+ if (value.bearerToken !== undefined)
63
+ return visitor.bearerToken(value.bearerToken);
64
+ if (value.customHeaders !== undefined)
65
+ return visitor.customHeaders(value.customHeaders);
66
+ return visitor._(value.$unknown[0], value.$unknown[1]);
67
+ };
68
+ })(ToolMcpAuthorization || (exports.ToolMcpAuthorization = ToolMcpAuthorization = {}));
57
69
  class McpConnectionException extends ToolsServiceException_1.ToolsServiceException {
58
70
  name = "McpConnectionException";
59
71
  $fault = "server";
@@ -154,18 +166,11 @@ var ToolHandler;
154
166
  return visitor._(value.$unknown[0], value.$unknown[1]);
155
167
  };
156
168
  })(ToolHandler || (exports.ToolHandler = ToolHandler = {}));
157
- var ToolVariableHandler;
158
- (function (ToolVariableHandler) {
159
- ToolVariableHandler.visit = (value, visitor) => {
160
- if (value.auto !== undefined)
161
- return visitor.auto(value.auto);
162
- if (value.guided !== undefined)
163
- return visitor.guided(value.guided);
164
- if (value.predefined !== undefined)
165
- return visitor.predefined(value.predefined);
166
- return visitor._(value.$unknown[0], value.$unknown[1]);
167
- };
168
- })(ToolVariableHandler || (exports.ToolVariableHandler = ToolVariableHandler = {}));
169
+ exports.ToolVariableInstructionType = {
170
+ AUTO: "auto",
171
+ GUIDED: "guided",
172
+ PREDEFINED: "predefined",
173
+ };
169
174
  exports.ToolVariableType = {
170
175
  BOOLEAN: "boolean",
171
176
  NUMBER: "number",
@@ -17,7 +17,7 @@ const se_CreateMcpConnectionCommand = async (input, context) => {
17
17
  });
18
18
  let body;
19
19
  body = JSON.stringify((0, smithy_client_1.take)(input, {
20
- 'apiKey': [],
20
+ 'authorization': _ => (0, smithy_client_1._json)(_),
21
21
  'description': [],
22
22
  'name': [],
23
23
  'serverUrl': [],
@@ -218,7 +218,7 @@ const se_UpdateMcpConnectionCommand = async (input, context) => {
218
218
  });
219
219
  let body;
220
220
  body = JSON.stringify((0, smithy_client_1.take)(input, {
221
- 'apiKey': [],
221
+ 'authorization': _ => (0, smithy_client_1._json)(_),
222
222
  'description': [],
223
223
  'name': [],
224
224
  'serverUrl': [],
@@ -47,6 +47,18 @@ export class ValidationException extends __BaseException {
47
47
  Object.setPrototypeOf(this, ValidationException.prototype);
48
48
  }
49
49
  }
50
+ export var ToolMcpAuthorization;
51
+ (function (ToolMcpAuthorization) {
52
+ ToolMcpAuthorization.visit = (value, visitor) => {
53
+ if (value.apiKey !== undefined)
54
+ return visitor.apiKey(value.apiKey);
55
+ if (value.bearerToken !== undefined)
56
+ return visitor.bearerToken(value.bearerToken);
57
+ if (value.customHeaders !== undefined)
58
+ return visitor.customHeaders(value.customHeaders);
59
+ return visitor._(value.$unknown[0], value.$unknown[1]);
60
+ };
61
+ })(ToolMcpAuthorization || (ToolMcpAuthorization = {}));
50
62
  export class McpConnectionException extends __BaseException {
51
63
  name = "McpConnectionException";
52
64
  $fault = "server";
@@ -144,18 +156,11 @@ export var ToolHandler;
144
156
  return visitor._(value.$unknown[0], value.$unknown[1]);
145
157
  };
146
158
  })(ToolHandler || (ToolHandler = {}));
147
- export var ToolVariableHandler;
148
- (function (ToolVariableHandler) {
149
- ToolVariableHandler.visit = (value, visitor) => {
150
- if (value.auto !== undefined)
151
- return visitor.auto(value.auto);
152
- if (value.guided !== undefined)
153
- return visitor.guided(value.guided);
154
- if (value.predefined !== undefined)
155
- return visitor.predefined(value.predefined);
156
- return visitor._(value.$unknown[0], value.$unknown[1]);
157
- };
158
- })(ToolVariableHandler || (ToolVariableHandler = {}));
159
+ export const ToolVariableInstructionType = {
160
+ AUTO: "auto",
161
+ GUIDED: "guided",
162
+ PREDEFINED: "predefined",
163
+ };
159
164
  export const ToolVariableType = {
160
165
  BOOLEAN: "boolean",
161
166
  NUMBER: "number",
@@ -14,7 +14,7 @@ export const se_CreateMcpConnectionCommand = async (input, context) => {
14
14
  });
15
15
  let body;
16
16
  body = JSON.stringify(take(input, {
17
- 'apiKey': [],
17
+ 'authorization': _ => _json(_),
18
18
  'description': [],
19
19
  'name': [],
20
20
  'serverUrl': [],
@@ -204,7 +204,7 @@ export const se_UpdateMcpConnectionCommand = async (input, context) => {
204
204
  });
205
205
  let body;
206
206
  body = JSON.stringify(take(input, {
207
- 'apiKey': [],
207
+ 'authorization': _ => _json(_),
208
208
  'description': [],
209
209
  'name': [],
210
210
  'serverUrl': [],
@@ -39,7 +39,20 @@ declare const CreateMcpConnectionCommand_base: {
39
39
  * name: "STRING_VALUE", // required
40
40
  * description: "STRING_VALUE",
41
41
  * serverUrl: "STRING_VALUE", // required
42
- * apiKey: "STRING_VALUE", // required
42
+ * authorization: { // ToolMcpAuthorization Union: only one key present
43
+ * apiKey: { // ApiKeyAuthorization
44
+ * apiKey: "STRING_VALUE", // required
45
+ * paramName: "STRING_VALUE",
46
+ * },
47
+ * bearerToken: { // BearerTokenAuthorization
48
+ * token: "STRING_VALUE", // required
49
+ * },
50
+ * customHeaders: { // CustomHeadersAuthorization
51
+ * headers: { // HeadersMap // required
52
+ * "<keys>": "STRING_VALUE",
53
+ * },
54
+ * },
55
+ * },
43
56
  * };
44
57
  * const command = new CreateMcpConnectionCommand(input);
45
58
  * const response = await client.send(command);
@@ -50,7 +63,20 @@ declare const CreateMcpConnectionCommand_base: {
50
63
  * // name: "STRING_VALUE", // required
51
64
  * // description: "STRING_VALUE",
52
65
  * // serverUrl: "STRING_VALUE", // required
53
- * // apiKey: "STRING_VALUE", // required
66
+ * // authorization: { // ToolMcpAuthorization Union: only one key present
67
+ * // apiKey: { // ApiKeyAuthorization
68
+ * // apiKey: "STRING_VALUE", // required
69
+ * // paramName: "STRING_VALUE",
70
+ * // },
71
+ * // bearerToken: { // BearerTokenAuthorization
72
+ * // token: "STRING_VALUE", // required
73
+ * // },
74
+ * // customHeaders: { // CustomHeadersAuthorization
75
+ * // headers: { // HeadersMap // required
76
+ * // "<keys>": "STRING_VALUE",
77
+ * // },
78
+ * // },
79
+ * // },
54
80
  * // createdAt: Number("long"), // required
55
81
  * // updatedAt: Number("long"), // required
56
82
  * // },
@@ -45,14 +45,10 @@ declare const CreateToolCommand_base: {
45
45
  * name: "STRING_VALUE", // required
46
46
  * type: "string" || "number" || "boolean" || "string_array" || "number_array", // required
47
47
  * optional: true || false, // required
48
- * handler: { // ToolVariableHandler Union: only one key present
49
- * auto: {},
50
- * guided: { // ToolVariableGuidedHandler
51
- * description: "STRING_VALUE", // required
52
- * },
53
- * predefined: { // ToolVariablePredefinedHandler
54
- * value: "STRING_VALUE", // required
55
- * },
48
+ * description: "STRING_VALUE",
49
+ * instructions: { // ToolVariableInstructions
50
+ * type: "auto" || "guided" || "predefined", // required
51
+ * value: "STRING_VALUE",
56
52
  * },
57
53
  * },
58
54
  * ],
@@ -147,14 +143,10 @@ declare const CreateToolCommand_base: {
147
143
  * // name: "STRING_VALUE", // required
148
144
  * // type: "string" || "number" || "boolean" || "string_array" || "number_array", // required
149
145
  * // optional: true || false, // required
150
- * // handler: { // ToolVariableHandler Union: only one key present
151
- * // auto: {},
152
- * // guided: { // ToolVariableGuidedHandler
153
- * // description: "STRING_VALUE", // required
154
- * // },
155
- * // predefined: { // ToolVariablePredefinedHandler
156
- * // value: "STRING_VALUE", // required
157
- * // },
146
+ * // description: "STRING_VALUE",
147
+ * // instructions: { // ToolVariableInstructions
148
+ * // type: "auto" || "guided" || "predefined", // required
149
+ * // value: "STRING_VALUE",
158
150
  * // },
159
151
  * // },
160
152
  * // ],
@@ -53,14 +53,10 @@ declare const DescribeToolsCommand_base: {
53
53
  * // name: "STRING_VALUE", // required
54
54
  * // type: "string" || "number" || "boolean" || "string_array" || "number_array", // required
55
55
  * // optional: true || false, // required
56
- * // handler: { // ToolVariableHandler Union: only one key present
57
- * // auto: {},
58
- * // guided: { // ToolVariableGuidedHandler
59
- * // description: "STRING_VALUE", // required
60
- * // },
61
- * // predefined: { // ToolVariablePredefinedHandler
62
- * // value: "STRING_VALUE", // required
63
- * // },
56
+ * // description: "STRING_VALUE",
57
+ * // instructions: { // ToolVariableInstructions
58
+ * // type: "auto" || "guided" || "predefined", // required
59
+ * // value: "STRING_VALUE",
64
60
  * // },
65
61
  * // },
66
62
  * // ],
@@ -47,7 +47,20 @@ declare const GetMcpConnectionCommand_base: {
47
47
  * // name: "STRING_VALUE", // required
48
48
  * // description: "STRING_VALUE",
49
49
  * // serverUrl: "STRING_VALUE", // required
50
- * // apiKey: "STRING_VALUE", // required
50
+ * // authorization: { // ToolMcpAuthorization Union: only one key present
51
+ * // apiKey: { // ApiKeyAuthorization
52
+ * // apiKey: "STRING_VALUE", // required
53
+ * // paramName: "STRING_VALUE",
54
+ * // },
55
+ * // bearerToken: { // BearerTokenAuthorization
56
+ * // token: "STRING_VALUE", // required
57
+ * // },
58
+ * // customHeaders: { // CustomHeadersAuthorization
59
+ * // headers: { // HeadersMap // required
60
+ * // "<keys>": "STRING_VALUE",
61
+ * // },
62
+ * // },
63
+ * // },
51
64
  * // createdAt: Number("long"), // required
52
65
  * // updatedAt: Number("long"), // required
53
66
  * // },
@@ -53,14 +53,10 @@ declare const GetToolCommand_base: {
53
53
  * // name: "STRING_VALUE", // required
54
54
  * // type: "string" || "number" || "boolean" || "string_array" || "number_array", // required
55
55
  * // optional: true || false, // required
56
- * // handler: { // ToolVariableHandler Union: only one key present
57
- * // auto: {},
58
- * // guided: { // ToolVariableGuidedHandler
59
- * // description: "STRING_VALUE", // required
60
- * // },
61
- * // predefined: { // ToolVariablePredefinedHandler
62
- * // value: "STRING_VALUE", // required
63
- * // },
56
+ * // description: "STRING_VALUE",
57
+ * // instructions: { // ToolVariableInstructions
58
+ * // type: "auto" || "guided" || "predefined", // required
59
+ * // value: "STRING_VALUE",
64
60
  * // },
65
61
  * // },
66
62
  * // ],
@@ -47,7 +47,20 @@ declare const ListMcpConnectionsCommand_base: {
47
47
  * // name: "STRING_VALUE", // required
48
48
  * // description: "STRING_VALUE",
49
49
  * // serverUrl: "STRING_VALUE", // required
50
- * // apiKey: "STRING_VALUE", // required
50
+ * // authorization: { // ToolMcpAuthorization Union: only one key present
51
+ * // apiKey: { // ApiKeyAuthorization
52
+ * // apiKey: "STRING_VALUE", // required
53
+ * // paramName: "STRING_VALUE",
54
+ * // },
55
+ * // bearerToken: { // BearerTokenAuthorization
56
+ * // token: "STRING_VALUE", // required
57
+ * // },
58
+ * // customHeaders: { // CustomHeadersAuthorization
59
+ * // headers: { // HeadersMap // required
60
+ * // "<keys>": "STRING_VALUE",
61
+ * // },
62
+ * // },
63
+ * // },
51
64
  * // createdAt: Number("long"), // required
52
65
  * // updatedAt: Number("long"), // required
53
66
  * // },
@@ -53,14 +53,10 @@ declare const ListToolsCommand_base: {
53
53
  * // name: "STRING_VALUE", // required
54
54
  * // type: "string" || "number" || "boolean" || "string_array" || "number_array", // required
55
55
  * // optional: true || false, // required
56
- * // handler: { // ToolVariableHandler Union: only one key present
57
- * // auto: {},
58
- * // guided: { // ToolVariableGuidedHandler
59
- * // description: "STRING_VALUE", // required
60
- * // },
61
- * // predefined: { // ToolVariablePredefinedHandler
62
- * // value: "STRING_VALUE", // required
63
- * // },
56
+ * // description: "STRING_VALUE",
57
+ * // instructions: { // ToolVariableInstructions
58
+ * // type: "auto" || "guided" || "predefined", // required
59
+ * // value: "STRING_VALUE",
64
60
  * // },
65
61
  * // },
66
62
  * // ],
@@ -40,7 +40,20 @@ declare const UpdateMcpConnectionCommand_base: {
40
40
  * name: "STRING_VALUE",
41
41
  * description: "STRING_VALUE",
42
42
  * serverUrl: "STRING_VALUE",
43
- * apiKey: "STRING_VALUE",
43
+ * authorization: { // ToolMcpAuthorization Union: only one key present
44
+ * apiKey: { // ApiKeyAuthorization
45
+ * apiKey: "STRING_VALUE", // required
46
+ * paramName: "STRING_VALUE",
47
+ * },
48
+ * bearerToken: { // BearerTokenAuthorization
49
+ * token: "STRING_VALUE", // required
50
+ * },
51
+ * customHeaders: { // CustomHeadersAuthorization
52
+ * headers: { // HeadersMap // required
53
+ * "<keys>": "STRING_VALUE",
54
+ * },
55
+ * },
56
+ * },
44
57
  * };
45
58
  * const command = new UpdateMcpConnectionCommand(input);
46
59
  * const response = await client.send(command);
@@ -51,7 +64,20 @@ declare const UpdateMcpConnectionCommand_base: {
51
64
  * // name: "STRING_VALUE", // required
52
65
  * // description: "STRING_VALUE",
53
66
  * // serverUrl: "STRING_VALUE", // required
54
- * // apiKey: "STRING_VALUE", // required
67
+ * // authorization: { // ToolMcpAuthorization Union: only one key present
68
+ * // apiKey: { // ApiKeyAuthorization
69
+ * // apiKey: "STRING_VALUE", // required
70
+ * // paramName: "STRING_VALUE",
71
+ * // },
72
+ * // bearerToken: { // BearerTokenAuthorization
73
+ * // token: "STRING_VALUE", // required
74
+ * // },
75
+ * // customHeaders: { // CustomHeadersAuthorization
76
+ * // headers: { // HeadersMap // required
77
+ * // "<keys>": "STRING_VALUE",
78
+ * // },
79
+ * // },
80
+ * // },
55
81
  * // createdAt: Number("long"), // required
56
82
  * // updatedAt: Number("long"), // required
57
83
  * // },
@@ -46,14 +46,10 @@ declare const UpdateToolCommand_base: {
46
46
  * name: "STRING_VALUE", // required
47
47
  * type: "string" || "number" || "boolean" || "string_array" || "number_array", // required
48
48
  * optional: true || false, // required
49
- * handler: { // ToolVariableHandler Union: only one key present
50
- * auto: {},
51
- * guided: { // ToolVariableGuidedHandler
52
- * description: "STRING_VALUE", // required
53
- * },
54
- * predefined: { // ToolVariablePredefinedHandler
55
- * value: "STRING_VALUE", // required
56
- * },
49
+ * description: "STRING_VALUE",
50
+ * instructions: { // ToolVariableInstructions
51
+ * type: "auto" || "guided" || "predefined", // required
52
+ * value: "STRING_VALUE",
57
53
  * },
58
54
  * },
59
55
  * ],
@@ -148,14 +144,10 @@ declare const UpdateToolCommand_base: {
148
144
  * // name: "STRING_VALUE", // required
149
145
  * // type: "string" || "number" || "boolean" || "string_array" || "number_array", // required
150
146
  * // optional: true || false, // required
151
- * // handler: { // ToolVariableHandler Union: only one key present
152
- * // auto: {},
153
- * // guided: { // ToolVariableGuidedHandler
154
- * // description: "STRING_VALUE", // required
155
- * // },
156
- * // predefined: { // ToolVariablePredefinedHandler
157
- * // value: "STRING_VALUE", // required
158
- * // },
147
+ * // description: "STRING_VALUE",
148
+ * // instructions: { // ToolVariableInstructions
149
+ * // type: "auto" || "guided" || "predefined", // required
150
+ * // value: "STRING_VALUE",
159
151
  * // },
160
152
  * // },
161
153
  * // ],
@@ -45,6 +45,96 @@ export declare class ValidationException extends __BaseException {
45
45
  */
46
46
  constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
47
47
  }
48
+ /**
49
+ * @public
50
+ */
51
+ export interface ApiKeyAuthorization {
52
+ /**
53
+ * API key value (e.g., 'tvly-xxx' or just 'my-secret-key')
54
+ * @public
55
+ */
56
+ apiKey: string;
57
+ /**
58
+ * Optional: parameter name for URL-based API keys (e.g., 'tavilyApiKey' for ?tavilyApiKey=value). If not provided, uses Authorization: Bearer header
59
+ * @public
60
+ */
61
+ paramName?: string | undefined;
62
+ }
63
+ /**
64
+ * @public
65
+ */
66
+ export interface BearerTokenAuthorization {
67
+ /**
68
+ * Bearer token value
69
+ * @public
70
+ */
71
+ token: string;
72
+ }
73
+ /**
74
+ * @public
75
+ */
76
+ export interface CustomHeadersAuthorization {
77
+ /**
78
+ * Custom HTTP headers (e.g., \{'Authorization': 'Bearer token', 'X-API-Key': 'key', 'X-Custom': 'value'\})
79
+ * @public
80
+ */
81
+ headers: Record<string, string>;
82
+ }
83
+ /**
84
+ * @public
85
+ */
86
+ export type ToolMcpAuthorization = ToolMcpAuthorization.ApiKeyMember | ToolMcpAuthorization.BearerTokenMember | ToolMcpAuthorization.CustomHeadersMember | ToolMcpAuthorization.$UnknownMember;
87
+ /**
88
+ * @public
89
+ */
90
+ export declare namespace ToolMcpAuthorization {
91
+ /**
92
+ * API key-based authorization
93
+ * @public
94
+ */
95
+ interface ApiKeyMember {
96
+ apiKey: ApiKeyAuthorization;
97
+ bearerToken?: never;
98
+ customHeaders?: never;
99
+ $unknown?: never;
100
+ }
101
+ /**
102
+ * Bearer token authorization
103
+ * @public
104
+ */
105
+ interface BearerTokenMember {
106
+ apiKey?: never;
107
+ bearerToken: BearerTokenAuthorization;
108
+ customHeaders?: never;
109
+ $unknown?: never;
110
+ }
111
+ /**
112
+ * Custom headers authorization
113
+ * @public
114
+ */
115
+ interface CustomHeadersMember {
116
+ apiKey?: never;
117
+ bearerToken?: never;
118
+ customHeaders: CustomHeadersAuthorization;
119
+ $unknown?: never;
120
+ }
121
+ /**
122
+ * @public
123
+ */
124
+ interface $UnknownMember {
125
+ apiKey?: never;
126
+ bearerToken?: never;
127
+ customHeaders?: never;
128
+ $unknown: [string, any];
129
+ }
130
+ interface Visitor<T> {
131
+ apiKey: (value: ApiKeyAuthorization) => T;
132
+ bearerToken: (value: BearerTokenAuthorization) => T;
133
+ customHeaders: (value: CustomHeadersAuthorization) => T;
134
+ _: (name: string, value: any) => T;
135
+ }
136
+ const visit: <T>(value: ToolMcpAuthorization, visitor: Visitor<T>) => T;
137
+ }
48
138
  /**
49
139
  * @public
50
140
  */
@@ -70,10 +160,10 @@ export interface CreateMcpConnectionInput {
70
160
  */
71
161
  serverUrl: string;
72
162
  /**
73
- * API key for MCP server authentication
163
+ * Authorization configuration (API key, bearer token, or custom headers)
74
164
  * @public
75
165
  */
76
- apiKey: string;
166
+ authorization: ToolMcpAuthorization;
77
167
  }
78
168
  /**
79
169
  * @public
@@ -105,10 +195,10 @@ export interface McpConnection {
105
195
  */
106
196
  serverUrl: string;
107
197
  /**
108
- * API key for MCP server authentication (masked in responses)
198
+ * Authorization configuration for the MCP server
109
199
  * @public
110
200
  */
111
- apiKey: string;
201
+ authorization: ToolMcpAuthorization;
112
202
  /**
113
203
  * Timestamp when the connection was created
114
204
  * @public
@@ -710,86 +800,33 @@ export declare namespace ToolHandler {
710
800
  }
711
801
  const visit: <T>(value: ToolHandler, visitor: Visitor<T>) => T;
712
802
  }
713
- /**
714
- * Empty structure - LLM fills automatically based on context
715
- * @public
716
- */
717
- export interface ToolVariableAutoHandler {
718
- }
719
- /**
720
- * @public
721
- */
722
- export interface ToolVariableGuidedHandler {
723
- /**
724
- * Instructions for LLM on how to fill this variable
725
- * @public
726
- */
727
- description: string;
728
- }
729
803
  /**
730
804
  * @public
805
+ * @enum
731
806
  */
732
- export interface ToolVariablePredefinedHandler {
733
- /**
734
- * Fixed value for this variable
735
- * @public
736
- */
737
- value: string;
738
- }
807
+ export declare const ToolVariableInstructionType: {
808
+ readonly AUTO: "auto";
809
+ readonly GUIDED: "guided";
810
+ readonly PREDEFINED: "predefined";
811
+ };
739
812
  /**
740
813
  * @public
741
814
  */
742
- export type ToolVariableHandler = ToolVariableHandler.AutoMember | ToolVariableHandler.GuidedMember | ToolVariableHandler.PredefinedMember | ToolVariableHandler.$UnknownMember;
815
+ export type ToolVariableInstructionType = typeof ToolVariableInstructionType[keyof typeof ToolVariableInstructionType];
743
816
  /**
744
817
  * @public
745
818
  */
746
- export declare namespace ToolVariableHandler {
819
+ export interface ToolVariableInstructions {
747
820
  /**
748
- * LLM fills automatically based on context
821
+ * Type of instruction: auto, guided, or predefined
749
822
  * @public
750
823
  */
751
- interface AutoMember {
752
- auto: ToolVariableAutoHandler;
753
- guided?: never;
754
- predefined?: never;
755
- $unknown?: never;
756
- }
824
+ type: ToolVariableInstructionType;
757
825
  /**
758
- * LLM follows guidance to fill the variable
826
+ * For guided: instruction text. For predefined: fixed value
759
827
  * @public
760
828
  */
761
- interface GuidedMember {
762
- auto?: never;
763
- guided: ToolVariableGuidedHandler;
764
- predefined?: never;
765
- $unknown?: never;
766
- }
767
- /**
768
- * Fixed predefined value
769
- * @public
770
- */
771
- interface PredefinedMember {
772
- auto?: never;
773
- guided?: never;
774
- predefined: ToolVariablePredefinedHandler;
775
- $unknown?: never;
776
- }
777
- /**
778
- * @public
779
- */
780
- interface $UnknownMember {
781
- auto?: never;
782
- guided?: never;
783
- predefined?: never;
784
- $unknown: [string, any];
785
- }
786
- interface Visitor<T> {
787
- auto: (value: ToolVariableAutoHandler) => T;
788
- guided: (value: ToolVariableGuidedHandler) => T;
789
- predefined: (value: ToolVariablePredefinedHandler) => T;
790
- _: (name: string, value: any) => T;
791
- }
792
- const visit: <T>(value: ToolVariableHandler, visitor: Visitor<T>) => T;
829
+ value?: string | undefined;
793
830
  }
794
831
  /**
795
832
  * @public
@@ -826,10 +863,15 @@ export interface ToolVariable {
826
863
  */
827
864
  optional: boolean;
828
865
  /**
829
- * Handler configuration for how this variable should be filled. Optional for backward compatibility.
866
+ * Original description from MCP tool schema (preserved)
867
+ * @public
868
+ */
869
+ description?: string | undefined;
870
+ /**
871
+ * Instructions for how LLM should fill this variable
830
872
  * @public
831
873
  */
832
- handler?: ToolVariableHandler | undefined;
874
+ instructions?: ToolVariableInstructions | undefined;
833
875
  }
834
876
  /**
835
877
  * @public
@@ -1227,10 +1269,10 @@ export interface UpdateMcpConnectionInput {
1227
1269
  */
1228
1270
  serverUrl?: string | undefined;
1229
1271
  /**
1230
- * New API key (requires re-validation)
1272
+ * New authorization configuration (requires re-validation)
1231
1273
  * @public
1232
1274
  */
1233
- apiKey?: string | undefined;
1275
+ authorization?: ToolMcpAuthorization | undefined;
1234
1276
  }
1235
1277
  /**
1236
1278
  * @public
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wildix/wim-tools-client",
3
3
  "description": "@wildix/wim-tools-client client",
4
- "version": "0.0.34",
4
+ "version": "0.0.35",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",