tuix-mcp-host-client 0.0.147 → 0.0.149
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/.openapi-generator/FILES +6 -8
- package/apis/ClientApi.js +65 -66
- package/apis/ClientApi.js.map +1 -1
- package/apis/ClientApi.ts +119 -117
- package/docs/{ToolMatchDTO.md → CallMCPServerToolDTO.md} +10 -12
- package/docs/{UpdateMCPServerDTO.md → CallMCPServerToolResultDTO.md} +6 -8
- package/docs/ClientApi.md +97 -94
- package/docs/{ToolDTO.md → MCPServerToolDTO.md} +8 -8
- package/models/CallMCPServerToolDTO.js +53 -0
- package/models/CallMCPServerToolDTO.js.map +1 -0
- package/models/CallMCPServerToolDTO.ts +75 -0
- package/models/CallMCPServerToolResultDTO.js +49 -0
- package/models/CallMCPServerToolResultDTO.js.map +1 -0
- package/models/CallMCPServerToolResultDTO.ts +63 -0
- package/models/MCPServerToolDTO.js +57 -0
- package/models/MCPServerToolDTO.js.map +1 -0
- package/models/{ToolDTO.ts → MCPServerToolDTO.ts} +17 -19
- package/models/index.js +3 -4
- package/models/index.js.map +1 -1
- package/models/index.ts +3 -4
- package/package.json +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/docs/SearchToolsResponseDTO.md +0 -44
- package/models/SearchToolsResponseDTO.js +0 -69
- package/models/SearchToolsResponseDTO.js.map +0 -1
- package/models/SearchToolsResponseDTO.ts +0 -112
- package/models/ToolDTO.js +0 -61
- package/models/ToolDTO.js.map +0 -1
- package/models/ToolMatchDTO.js +0 -71
- package/models/ToolMatchDTO.js.map +0 -1
- package/models/ToolMatchDTO.ts +0 -96
- package/models/UpdateMCPServerDTO.js +0 -51
- package/models/UpdateMCPServerDTO.js.map +0 -1
- package/models/UpdateMCPServerDTO.ts +0 -69
package/apis/ClientApi.ts
CHANGED
|
@@ -33,6 +33,16 @@ import {
|
|
|
33
33
|
ApplicationMCPServerDTOFromJSON,
|
|
34
34
|
ApplicationMCPServerDTOToJSON,
|
|
35
35
|
} from '../models/ApplicationMCPServerDTO';
|
|
36
|
+
import {
|
|
37
|
+
type CallMCPServerToolDTO,
|
|
38
|
+
CallMCPServerToolDTOFromJSON,
|
|
39
|
+
CallMCPServerToolDTOToJSON,
|
|
40
|
+
} from '../models/CallMCPServerToolDTO';
|
|
41
|
+
import {
|
|
42
|
+
type CallMCPServerToolResultDTO,
|
|
43
|
+
CallMCPServerToolResultDTOFromJSON,
|
|
44
|
+
CallMCPServerToolResultDTOToJSON,
|
|
45
|
+
} from '../models/CallMCPServerToolResultDTO';
|
|
36
46
|
import {
|
|
37
47
|
type CreateAPIKeyRequestDTO,
|
|
38
48
|
CreateAPIKeyRequestDTOFromJSON,
|
|
@@ -78,6 +88,11 @@ import {
|
|
|
78
88
|
MCPServerStatusDTOFromJSON,
|
|
79
89
|
MCPServerStatusDTOToJSON,
|
|
80
90
|
} from '../models/MCPServerStatusDTO';
|
|
91
|
+
import {
|
|
92
|
+
type MCPServerToolDTO,
|
|
93
|
+
MCPServerToolDTOFromJSON,
|
|
94
|
+
MCPServerToolDTOToJSON,
|
|
95
|
+
} from '../models/MCPServerToolDTO';
|
|
81
96
|
import {
|
|
82
97
|
type PaginatedApplicationsDTO,
|
|
83
98
|
PaginatedApplicationsDTOFromJSON,
|
|
@@ -88,21 +103,11 @@ import {
|
|
|
88
103
|
PaginatedMCPServerDTOFromJSON,
|
|
89
104
|
PaginatedMCPServerDTOToJSON,
|
|
90
105
|
} from '../models/PaginatedMCPServerDTO';
|
|
91
|
-
import {
|
|
92
|
-
type SearchToolsResponseDTO,
|
|
93
|
-
SearchToolsResponseDTOFromJSON,
|
|
94
|
-
SearchToolsResponseDTOToJSON,
|
|
95
|
-
} from '../models/SearchToolsResponseDTO';
|
|
96
106
|
import {
|
|
97
107
|
type UpdateApplicationDTO,
|
|
98
108
|
UpdateApplicationDTOFromJSON,
|
|
99
109
|
UpdateApplicationDTOToJSON,
|
|
100
110
|
} from '../models/UpdateApplicationDTO';
|
|
101
|
-
import {
|
|
102
|
-
type UpdateMCPServerDTO,
|
|
103
|
-
UpdateMCPServerDTOFromJSON,
|
|
104
|
-
UpdateMCPServerDTOToJSON,
|
|
105
|
-
} from '../models/UpdateMCPServerDTO';
|
|
106
111
|
|
|
107
112
|
export interface ApiKeysGetRequest {
|
|
108
113
|
/**
|
|
@@ -140,6 +145,21 @@ export interface AttachMCPServerRequest {
|
|
|
140
145
|
applicationMCPServerDTO: ApplicationMCPServerDTO;
|
|
141
146
|
}
|
|
142
147
|
|
|
148
|
+
export interface CallMCPServerToolRequest {
|
|
149
|
+
/**
|
|
150
|
+
* MCP Server ID
|
|
151
|
+
*/
|
|
152
|
+
mcpServerId: string;
|
|
153
|
+
/**
|
|
154
|
+
* Tool name to call
|
|
155
|
+
*/
|
|
156
|
+
toolName: string;
|
|
157
|
+
/**
|
|
158
|
+
*
|
|
159
|
+
*/
|
|
160
|
+
callMCPServerToolDTO: CallMCPServerToolDTO;
|
|
161
|
+
}
|
|
162
|
+
|
|
143
163
|
export interface CreateAccountRequest {
|
|
144
164
|
/**
|
|
145
165
|
*
|
|
@@ -264,19 +284,15 @@ export interface GetMCPServersByApplicationRequest {
|
|
|
264
284
|
pageSize?: number;
|
|
265
285
|
}
|
|
266
286
|
|
|
267
|
-
export interface
|
|
287
|
+
export interface ListMCPServerToolsRequest {
|
|
268
288
|
/**
|
|
269
|
-
*
|
|
270
|
-
*/
|
|
271
|
-
applicationId: string;
|
|
272
|
-
/**
|
|
273
|
-
* Search query
|
|
289
|
+
* MCP Server ID
|
|
274
290
|
*/
|
|
275
|
-
|
|
291
|
+
mcpServerId: string;
|
|
276
292
|
/**
|
|
277
|
-
*
|
|
293
|
+
* Downstream authorization token for the MCP server
|
|
278
294
|
*/
|
|
279
|
-
|
|
295
|
+
xDownstreamAuthorization?: string;
|
|
280
296
|
}
|
|
281
297
|
|
|
282
298
|
export interface UpdateApplicationRequest {
|
|
@@ -290,17 +306,6 @@ export interface UpdateApplicationRequest {
|
|
|
290
306
|
updateApplicationDTO: UpdateApplicationDTO;
|
|
291
307
|
}
|
|
292
308
|
|
|
293
|
-
export interface UpdateMCPServerRequest {
|
|
294
|
-
/**
|
|
295
|
-
* MCP Server ID
|
|
296
|
-
*/
|
|
297
|
-
mcpServerId: string;
|
|
298
|
-
/**
|
|
299
|
-
*
|
|
300
|
-
*/
|
|
301
|
-
updateMCPServerDTO: UpdateMCPServerDTO;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
309
|
/**
|
|
305
310
|
*
|
|
306
311
|
*/
|
|
@@ -504,6 +509,71 @@ export class ClientApi extends runtime.BaseAPI {
|
|
|
504
509
|
await this.attachMCPServerRaw(requestParameters, initOverrides);
|
|
505
510
|
}
|
|
506
511
|
|
|
512
|
+
/**
|
|
513
|
+
* Creates request options for callMCPServerTool without sending the request
|
|
514
|
+
*/
|
|
515
|
+
async callMCPServerToolRequestOpts(requestParameters: CallMCPServerToolRequest): Promise<runtime.RequestOpts> {
|
|
516
|
+
if (requestParameters['mcpServerId'] == null) {
|
|
517
|
+
throw new runtime.RequiredError(
|
|
518
|
+
'mcpServerId',
|
|
519
|
+
'Required parameter "mcpServerId" was null or undefined when calling callMCPServerTool().'
|
|
520
|
+
);
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
if (requestParameters['toolName'] == null) {
|
|
524
|
+
throw new runtime.RequiredError(
|
|
525
|
+
'toolName',
|
|
526
|
+
'Required parameter "toolName" was null or undefined when calling callMCPServerTool().'
|
|
527
|
+
);
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
if (requestParameters['callMCPServerToolDTO'] == null) {
|
|
531
|
+
throw new runtime.RequiredError(
|
|
532
|
+
'callMCPServerToolDTO',
|
|
533
|
+
'Required parameter "callMCPServerToolDTO" was null or undefined when calling callMCPServerTool().'
|
|
534
|
+
);
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
const queryParameters: any = {};
|
|
538
|
+
|
|
539
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
540
|
+
|
|
541
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
let urlPath = `/mcp-servers/{mcpServerId}/tools/{toolName}/executions`;
|
|
545
|
+
urlPath = urlPath.replace('{mcpServerId}', encodeURIComponent(String(requestParameters['mcpServerId'])));
|
|
546
|
+
urlPath = urlPath.replace('{toolName}', encodeURIComponent(String(requestParameters['toolName'])));
|
|
547
|
+
|
|
548
|
+
return {
|
|
549
|
+
path: urlPath,
|
|
550
|
+
method: 'POST',
|
|
551
|
+
headers: headerParameters,
|
|
552
|
+
query: queryParameters,
|
|
553
|
+
body: CallMCPServerToolDTOToJSON(requestParameters['callMCPServerToolDTO']),
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* Send a JSON-RPC tools/call request to a deployed MCP server and return its result
|
|
559
|
+
* Call a tool of an MCP server
|
|
560
|
+
*/
|
|
561
|
+
async callMCPServerToolRaw(requestParameters: CallMCPServerToolRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CallMCPServerToolResultDTO>> {
|
|
562
|
+
const requestOptions = await this.callMCPServerToolRequestOpts(requestParameters);
|
|
563
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
564
|
+
|
|
565
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CallMCPServerToolResultDTOFromJSON(jsonValue));
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* Send a JSON-RPC tools/call request to a deployed MCP server and return its result
|
|
570
|
+
* Call a tool of an MCP server
|
|
571
|
+
*/
|
|
572
|
+
async callMCPServerTool(requestParameters: CallMCPServerToolRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CallMCPServerToolResultDTO> {
|
|
573
|
+
const response = await this.callMCPServerToolRaw(requestParameters, initOverrides);
|
|
574
|
+
return await response.value();
|
|
575
|
+
}
|
|
576
|
+
|
|
507
577
|
/**
|
|
508
578
|
* Creates request options for createAccount without sending the request
|
|
509
579
|
*/
|
|
@@ -1147,38 +1217,27 @@ export class ClientApi extends runtime.BaseAPI {
|
|
|
1147
1217
|
}
|
|
1148
1218
|
|
|
1149
1219
|
/**
|
|
1150
|
-
* Creates request options for
|
|
1220
|
+
* Creates request options for listMCPServerTools without sending the request
|
|
1151
1221
|
*/
|
|
1152
|
-
async
|
|
1153
|
-
if (requestParameters['
|
|
1154
|
-
throw new runtime.RequiredError(
|
|
1155
|
-
'applicationId',
|
|
1156
|
-
'Required parameter "applicationId" was null or undefined when calling searchApplicationTools().'
|
|
1157
|
-
);
|
|
1158
|
-
}
|
|
1159
|
-
|
|
1160
|
-
if (requestParameters['query'] == null) {
|
|
1222
|
+
async listMCPServerToolsRequestOpts(requestParameters: ListMCPServerToolsRequest): Promise<runtime.RequestOpts> {
|
|
1223
|
+
if (requestParameters['mcpServerId'] == null) {
|
|
1161
1224
|
throw new runtime.RequiredError(
|
|
1162
|
-
'
|
|
1163
|
-
'Required parameter "
|
|
1225
|
+
'mcpServerId',
|
|
1226
|
+
'Required parameter "mcpServerId" was null or undefined when calling listMCPServerTools().'
|
|
1164
1227
|
);
|
|
1165
1228
|
}
|
|
1166
1229
|
|
|
1167
1230
|
const queryParameters: any = {};
|
|
1168
1231
|
|
|
1169
|
-
|
|
1170
|
-
queryParameters['query'] = requestParameters['query'];
|
|
1171
|
-
}
|
|
1232
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1172
1233
|
|
|
1173
|
-
if (requestParameters['
|
|
1174
|
-
|
|
1234
|
+
if (requestParameters['xDownstreamAuthorization'] != null) {
|
|
1235
|
+
headerParameters['X-Downstream-Authorization'] = String(requestParameters['xDownstreamAuthorization']);
|
|
1175
1236
|
}
|
|
1176
1237
|
|
|
1177
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
1178
|
-
|
|
1179
1238
|
|
|
1180
|
-
let urlPath = `/
|
|
1181
|
-
urlPath = urlPath.replace('{
|
|
1239
|
+
let urlPath = `/mcp-servers/{mcpServerId}/tools`;
|
|
1240
|
+
urlPath = urlPath.replace('{mcpServerId}', encodeURIComponent(String(requestParameters['mcpServerId'])));
|
|
1182
1241
|
|
|
1183
1242
|
return {
|
|
1184
1243
|
path: urlPath,
|
|
@@ -1189,22 +1248,22 @@ export class ClientApi extends runtime.BaseAPI {
|
|
|
1189
1248
|
}
|
|
1190
1249
|
|
|
1191
1250
|
/**
|
|
1192
|
-
*
|
|
1193
|
-
*
|
|
1251
|
+
* Send a JSON-RPC tools/list request to a deployed MCP server and return its tools with their roles
|
|
1252
|
+
* List tools of an MCP server
|
|
1194
1253
|
*/
|
|
1195
|
-
async
|
|
1196
|
-
const requestOptions = await this.
|
|
1254
|
+
async listMCPServerToolsRaw(requestParameters: ListMCPServerToolsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<MCPServerToolDTO>>> {
|
|
1255
|
+
const requestOptions = await this.listMCPServerToolsRequestOpts(requestParameters);
|
|
1197
1256
|
const response = await this.request(requestOptions, initOverrides);
|
|
1198
1257
|
|
|
1199
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
1258
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(MCPServerToolDTOFromJSON));
|
|
1200
1259
|
}
|
|
1201
1260
|
|
|
1202
1261
|
/**
|
|
1203
|
-
*
|
|
1204
|
-
*
|
|
1262
|
+
* Send a JSON-RPC tools/list request to a deployed MCP server and return its tools with their roles
|
|
1263
|
+
* List tools of an MCP server
|
|
1205
1264
|
*/
|
|
1206
|
-
async
|
|
1207
|
-
const response = await this.
|
|
1265
|
+
async listMCPServerTools(requestParameters: ListMCPServerToolsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<MCPServerToolDTO>> {
|
|
1266
|
+
const response = await this.listMCPServerToolsRaw(requestParameters, initOverrides);
|
|
1208
1267
|
return await response.value();
|
|
1209
1268
|
}
|
|
1210
1269
|
|
|
@@ -1265,63 +1324,6 @@ export class ClientApi extends runtime.BaseAPI {
|
|
|
1265
1324
|
return await response.value();
|
|
1266
1325
|
}
|
|
1267
1326
|
|
|
1268
|
-
/**
|
|
1269
|
-
* Creates request options for updateMCPServer without sending the request
|
|
1270
|
-
*/
|
|
1271
|
-
async updateMCPServerRequestOpts(requestParameters: UpdateMCPServerRequest): Promise<runtime.RequestOpts> {
|
|
1272
|
-
if (requestParameters['mcpServerId'] == null) {
|
|
1273
|
-
throw new runtime.RequiredError(
|
|
1274
|
-
'mcpServerId',
|
|
1275
|
-
'Required parameter "mcpServerId" was null or undefined when calling updateMCPServer().'
|
|
1276
|
-
);
|
|
1277
|
-
}
|
|
1278
|
-
|
|
1279
|
-
if (requestParameters['updateMCPServerDTO'] == null) {
|
|
1280
|
-
throw new runtime.RequiredError(
|
|
1281
|
-
'updateMCPServerDTO',
|
|
1282
|
-
'Required parameter "updateMCPServerDTO" was null or undefined when calling updateMCPServer().'
|
|
1283
|
-
);
|
|
1284
|
-
}
|
|
1285
|
-
|
|
1286
|
-
const queryParameters: any = {};
|
|
1287
|
-
|
|
1288
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
1289
|
-
|
|
1290
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
let urlPath = `/mcp-servers/{mcpServerId}`;
|
|
1294
|
-
urlPath = urlPath.replace('{mcpServerId}', encodeURIComponent(String(requestParameters['mcpServerId'])));
|
|
1295
|
-
|
|
1296
|
-
return {
|
|
1297
|
-
path: urlPath,
|
|
1298
|
-
method: 'PATCH',
|
|
1299
|
-
headers: headerParameters,
|
|
1300
|
-
query: queryParameters,
|
|
1301
|
-
body: UpdateMCPServerDTOToJSON(requestParameters['updateMCPServerDTO']),
|
|
1302
|
-
};
|
|
1303
|
-
}
|
|
1304
|
-
|
|
1305
|
-
/**
|
|
1306
|
-
* Update an existing MCP server for the authenticated account
|
|
1307
|
-
* Update an existing MCP server
|
|
1308
|
-
*/
|
|
1309
|
-
async updateMCPServerRaw(requestParameters: UpdateMCPServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MCPServerDTO>> {
|
|
1310
|
-
const requestOptions = await this.updateMCPServerRequestOpts(requestParameters);
|
|
1311
|
-
const response = await this.request(requestOptions, initOverrides);
|
|
1312
|
-
|
|
1313
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => MCPServerDTOFromJSON(jsonValue));
|
|
1314
|
-
}
|
|
1315
|
-
|
|
1316
|
-
/**
|
|
1317
|
-
* Update an existing MCP server for the authenticated account
|
|
1318
|
-
* Update an existing MCP server
|
|
1319
|
-
*/
|
|
1320
|
-
async updateMCPServer(requestParameters: UpdateMCPServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MCPServerDTO> {
|
|
1321
|
-
const response = await this.updateMCPServerRaw(requestParameters, initOverrides);
|
|
1322
|
-
return await response.value();
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
1327
|
}
|
|
1326
1328
|
|
|
1327
1329
|
/**
|
|
@@ -1,28 +1,26 @@
|
|
|
1
1
|
|
|
2
|
-
#
|
|
2
|
+
# CallMCPServerToolDTO
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
|
-
`
|
|
10
|
-
`
|
|
11
|
-
`
|
|
12
|
-
`toolName` | string
|
|
9
|
+
`arguments` | { [key: string]: any; }
|
|
10
|
+
`authToken` | string
|
|
11
|
+
`sessionId` | string
|
|
13
12
|
|
|
14
13
|
## Example
|
|
15
14
|
|
|
16
15
|
```typescript
|
|
17
|
-
import type {
|
|
16
|
+
import type { CallMCPServerToolDTO } from ''
|
|
18
17
|
|
|
19
18
|
// TODO: Update the object below with actual values
|
|
20
19
|
const example = {
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
} satisfies ToolMatchDTO
|
|
20
|
+
"arguments": null,
|
|
21
|
+
"authToken": null,
|
|
22
|
+
"sessionId": null,
|
|
23
|
+
} satisfies CallMCPServerToolDTO
|
|
26
24
|
|
|
27
25
|
console.log(example)
|
|
28
26
|
|
|
@@ -31,7 +29,7 @@ const exampleJSON: string = JSON.stringify(example)
|
|
|
31
29
|
console.log(exampleJSON)
|
|
32
30
|
|
|
33
31
|
// Parse the JSON string back to an object
|
|
34
|
-
const exampleParsed = JSON.parse(exampleJSON) as
|
|
32
|
+
const exampleParsed = JSON.parse(exampleJSON) as CallMCPServerToolDTO
|
|
35
33
|
console.log(exampleParsed)
|
|
36
34
|
```
|
|
37
35
|
|
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
|
|
2
|
-
#
|
|
2
|
+
# CallMCPServerToolResultDTO
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
|
-
`
|
|
10
|
-
`url` | string
|
|
9
|
+
`result` | any
|
|
11
10
|
|
|
12
11
|
## Example
|
|
13
12
|
|
|
14
13
|
```typescript
|
|
15
|
-
import type {
|
|
14
|
+
import type { CallMCPServerToolResultDTO } from ''
|
|
16
15
|
|
|
17
16
|
// TODO: Update the object below with actual values
|
|
18
17
|
const example = {
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
} satisfies UpdateMCPServerDTO
|
|
18
|
+
"result": null,
|
|
19
|
+
} satisfies CallMCPServerToolResultDTO
|
|
22
20
|
|
|
23
21
|
console.log(example)
|
|
24
22
|
|
|
@@ -27,7 +25,7 @@ const exampleJSON: string = JSON.stringify(example)
|
|
|
27
25
|
console.log(exampleJSON)
|
|
28
26
|
|
|
29
27
|
// Parse the JSON string back to an object
|
|
30
|
-
const exampleParsed = JSON.parse(exampleJSON) as
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as CallMCPServerToolResultDTO
|
|
31
29
|
console.log(exampleParsed)
|
|
32
30
|
```
|
|
33
31
|
|
package/docs/ClientApi.md
CHANGED
|
@@ -8,6 +8,7 @@ All URIs are relative to *http://localhost:3000*
|
|
|
8
8
|
| [**apiKeysIdDelete**](ClientApi.md#apikeysiddelete) | **DELETE** /api-keys/{id} | Delete an API key |
|
|
9
9
|
| [**apiKeysPost**](ClientApi.md#apikeyspost) | **POST** /api-keys | Create a new API key |
|
|
10
10
|
| [**attachMCPServer**](ClientApi.md#attachmcpserver) | **POST** /applications/{applicationId}/mcp-servers | Attach MCP server to application |
|
|
11
|
+
| [**callMCPServerTool**](ClientApi.md#callmcpservertool) | **POST** /mcp-servers/{mcpServerId}/tools/{toolName}/executions | Call a tool of an MCP server |
|
|
11
12
|
| [**createAccount**](ClientApi.md#createaccount) | **POST** /accounts | Creates a new account |
|
|
12
13
|
| [**createApplication**](ClientApi.md#createapplication) | **POST** /applications | Create a new application |
|
|
13
14
|
| [**createMCPServer**](ClientApi.md#createmcpserver) | **POST** /mcp-servers | Create a new MCP server |
|
|
@@ -21,9 +22,8 @@ All URIs are relative to *http://localhost:3000*
|
|
|
21
22
|
| [**getMCPServerStatus**](ClientApi.md#getmcpserverstatus) | **GET** /mcp-servers/{mcpServerId}/status | Get MCP server generation status |
|
|
22
23
|
| [**getMCPServers**](ClientApi.md#getmcpservers) | **GET** /mcp-servers | List MCP servers for account |
|
|
23
24
|
| [**getMCPServersByApplication**](ClientApi.md#getmcpserversbyapplication) | **GET** /applications/{applicationId}/mcp-servers | List MCP servers for an application |
|
|
24
|
-
| [**
|
|
25
|
+
| [**listMCPServerTools**](ClientApi.md#listmcpservertools) | **GET** /mcp-servers/{mcpServerId}/tools | List tools of an MCP server |
|
|
25
26
|
| [**updateApplication**](ClientApi.md#updateapplication) | **PATCH** /applications/{applicationId} | Update an application |
|
|
26
|
-
| [**updateMCPServer**](ClientApi.md#updatemcpserver) | **PATCH** /mcp-servers/{mcpServerId} | Update an existing MCP server |
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
@@ -317,6 +317,85 @@ No authorization required
|
|
|
317
317
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
318
318
|
|
|
319
319
|
|
|
320
|
+
## callMCPServerTool
|
|
321
|
+
|
|
322
|
+
> CallMCPServerToolResultDTO callMCPServerTool(mcpServerId, toolName, callMCPServerToolDTO)
|
|
323
|
+
|
|
324
|
+
Call a tool of an MCP server
|
|
325
|
+
|
|
326
|
+
Send a JSON-RPC tools/call request to a deployed MCP server and return its result
|
|
327
|
+
|
|
328
|
+
### Example
|
|
329
|
+
|
|
330
|
+
```ts
|
|
331
|
+
import {
|
|
332
|
+
Configuration,
|
|
333
|
+
ClientApi,
|
|
334
|
+
} from '';
|
|
335
|
+
import type { CallMCPServerToolRequest } from '';
|
|
336
|
+
|
|
337
|
+
async function example() {
|
|
338
|
+
console.log("🚀 Testing SDK...");
|
|
339
|
+
const api = new ClientApi();
|
|
340
|
+
|
|
341
|
+
const body = {
|
|
342
|
+
// string | MCP Server ID
|
|
343
|
+
mcpServerId: mcpServerId_example,
|
|
344
|
+
// string | Tool name to call
|
|
345
|
+
toolName: toolName_example,
|
|
346
|
+
// CallMCPServerToolDTO | Tool call data
|
|
347
|
+
callMCPServerToolDTO: ...,
|
|
348
|
+
} satisfies CallMCPServerToolRequest;
|
|
349
|
+
|
|
350
|
+
try {
|
|
351
|
+
const data = await api.callMCPServerTool(body);
|
|
352
|
+
console.log(data);
|
|
353
|
+
} catch (error) {
|
|
354
|
+
console.error(error);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
// Run the test
|
|
359
|
+
example().catch(console.error);
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
### Parameters
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
| Name | Type | Description | Notes |
|
|
366
|
+
|------------- | ------------- | ------------- | -------------|
|
|
367
|
+
| **mcpServerId** | `string` | MCP Server ID | [Defaults to `undefined`] |
|
|
368
|
+
| **toolName** | `string` | Tool name to call | [Defaults to `undefined`] |
|
|
369
|
+
| **callMCPServerToolDTO** | [CallMCPServerToolDTO](CallMCPServerToolDTO.md) | Tool call data | |
|
|
370
|
+
|
|
371
|
+
### Return type
|
|
372
|
+
|
|
373
|
+
[**CallMCPServerToolResultDTO**](CallMCPServerToolResultDTO.md)
|
|
374
|
+
|
|
375
|
+
### Authorization
|
|
376
|
+
|
|
377
|
+
No authorization required
|
|
378
|
+
|
|
379
|
+
### HTTP request headers
|
|
380
|
+
|
|
381
|
+
- **Content-Type**: `application/json`
|
|
382
|
+
- **Accept**: `application/json`
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
### HTTP response details
|
|
386
|
+
| Status code | Description | Response headers |
|
|
387
|
+
|-------------|-------------|------------------|
|
|
388
|
+
| **200** | Tool call result | - |
|
|
389
|
+
| **400** | Bad Request | - |
|
|
390
|
+
| **401** | Unauthorized | - |
|
|
391
|
+
| **402** | Payment Required | - |
|
|
392
|
+
| **404** | Not Found | - |
|
|
393
|
+
| **500** | Internal Server Error | - |
|
|
394
|
+
| **502** | Bad Gateway | - |
|
|
395
|
+
|
|
396
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
397
|
+
|
|
398
|
+
|
|
320
399
|
## createAccount
|
|
321
400
|
|
|
322
401
|
> AccountDTO createAccount(createAccountDTO)
|
|
@@ -1269,13 +1348,13 @@ No authorization required
|
|
|
1269
1348
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1270
1349
|
|
|
1271
1350
|
|
|
1272
|
-
##
|
|
1351
|
+
## listMCPServerTools
|
|
1273
1352
|
|
|
1274
|
-
>
|
|
1353
|
+
> Array<MCPServerToolDTO> listMCPServerTools(mcpServerId, xDownstreamAuthorization)
|
|
1275
1354
|
|
|
1276
|
-
|
|
1355
|
+
List tools of an MCP server
|
|
1277
1356
|
|
|
1278
|
-
|
|
1357
|
+
Send a JSON-RPC tools/list request to a deployed MCP server and return its tools with their roles
|
|
1279
1358
|
|
|
1280
1359
|
### Example
|
|
1281
1360
|
|
|
@@ -1284,23 +1363,21 @@ import {
|
|
|
1284
1363
|
Configuration,
|
|
1285
1364
|
ClientApi,
|
|
1286
1365
|
} from '';
|
|
1287
|
-
import type {
|
|
1366
|
+
import type { ListMCPServerToolsRequest } from '';
|
|
1288
1367
|
|
|
1289
1368
|
async function example() {
|
|
1290
1369
|
console.log("🚀 Testing SDK...");
|
|
1291
1370
|
const api = new ClientApi();
|
|
1292
1371
|
|
|
1293
1372
|
const body = {
|
|
1294
|
-
// string |
|
|
1295
|
-
|
|
1296
|
-
// string |
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
role: role_example,
|
|
1300
|
-
} satisfies SearchApplicationToolsRequest;
|
|
1373
|
+
// string | MCP Server ID
|
|
1374
|
+
mcpServerId: mcpServerId_example,
|
|
1375
|
+
// string | Downstream authorization token for the MCP server (optional)
|
|
1376
|
+
xDownstreamAuthorization: xDownstreamAuthorization_example,
|
|
1377
|
+
} satisfies ListMCPServerToolsRequest;
|
|
1301
1378
|
|
|
1302
1379
|
try {
|
|
1303
|
-
const data = await api.
|
|
1380
|
+
const data = await api.listMCPServerTools(body);
|
|
1304
1381
|
console.log(data);
|
|
1305
1382
|
} catch (error) {
|
|
1306
1383
|
console.error(error);
|
|
@@ -1316,13 +1393,12 @@ example().catch(console.error);
|
|
|
1316
1393
|
|
|
1317
1394
|
| Name | Type | Description | Notes |
|
|
1318
1395
|
|------------- | ------------- | ------------- | -------------|
|
|
1319
|
-
| **
|
|
1320
|
-
| **
|
|
1321
|
-
| **role** | `string` | Role to simulate; when omitted no role filtering is applied | [Optional] [Defaults to `undefined`] |
|
|
1396
|
+
| **mcpServerId** | `string` | MCP Server ID | [Defaults to `undefined`] |
|
|
1397
|
+
| **xDownstreamAuthorization** | `string` | Downstream authorization token for the MCP server | [Optional] [Defaults to `undefined`] |
|
|
1322
1398
|
|
|
1323
1399
|
### Return type
|
|
1324
1400
|
|
|
1325
|
-
[**
|
|
1401
|
+
[**Array<MCPServerToolDTO>**](MCPServerToolDTO.md)
|
|
1326
1402
|
|
|
1327
1403
|
### Authorization
|
|
1328
1404
|
|
|
@@ -1337,12 +1413,13 @@ No authorization required
|
|
|
1337
1413
|
### HTTP response details
|
|
1338
1414
|
| Status code | Description | Response headers |
|
|
1339
1415
|
|-------------|-------------|------------------|
|
|
1340
|
-
| **200** |
|
|
1416
|
+
| **200** | Tools exposed by the MCP server | - |
|
|
1341
1417
|
| **400** | Bad Request | - |
|
|
1342
1418
|
| **401** | Unauthorized | - |
|
|
1343
1419
|
| **402** | Payment Required | - |
|
|
1344
1420
|
| **404** | Not Found | - |
|
|
1345
1421
|
| **500** | Internal Server Error | - |
|
|
1422
|
+
| **502** | Bad Gateway | - |
|
|
1346
1423
|
|
|
1347
1424
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1348
1425
|
|
|
@@ -1422,77 +1499,3 @@ No authorization required
|
|
|
1422
1499
|
|
|
1423
1500
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1424
1501
|
|
|
1425
|
-
|
|
1426
|
-
## updateMCPServer
|
|
1427
|
-
|
|
1428
|
-
> MCPServerDTO updateMCPServer(mcpServerId, updateMCPServerDTO)
|
|
1429
|
-
|
|
1430
|
-
Update an existing MCP server
|
|
1431
|
-
|
|
1432
|
-
Update an existing MCP server for the authenticated account
|
|
1433
|
-
|
|
1434
|
-
### Example
|
|
1435
|
-
|
|
1436
|
-
```ts
|
|
1437
|
-
import {
|
|
1438
|
-
Configuration,
|
|
1439
|
-
ClientApi,
|
|
1440
|
-
} from '';
|
|
1441
|
-
import type { UpdateMCPServerRequest } from '';
|
|
1442
|
-
|
|
1443
|
-
async function example() {
|
|
1444
|
-
console.log("🚀 Testing SDK...");
|
|
1445
|
-
const api = new ClientApi();
|
|
1446
|
-
|
|
1447
|
-
const body = {
|
|
1448
|
-
// string | MCP Server ID
|
|
1449
|
-
mcpServerId: mcpServerId_example,
|
|
1450
|
-
// UpdateMCPServerDTO | MCP server update data
|
|
1451
|
-
updateMCPServerDTO: ...,
|
|
1452
|
-
} satisfies UpdateMCPServerRequest;
|
|
1453
|
-
|
|
1454
|
-
try {
|
|
1455
|
-
const data = await api.updateMCPServer(body);
|
|
1456
|
-
console.log(data);
|
|
1457
|
-
} catch (error) {
|
|
1458
|
-
console.error(error);
|
|
1459
|
-
}
|
|
1460
|
-
}
|
|
1461
|
-
|
|
1462
|
-
// Run the test
|
|
1463
|
-
example().catch(console.error);
|
|
1464
|
-
```
|
|
1465
|
-
|
|
1466
|
-
### Parameters
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
| Name | Type | Description | Notes |
|
|
1470
|
-
|------------- | ------------- | ------------- | -------------|
|
|
1471
|
-
| **mcpServerId** | `string` | MCP Server ID | [Defaults to `undefined`] |
|
|
1472
|
-
| **updateMCPServerDTO** | [UpdateMCPServerDTO](UpdateMCPServerDTO.md) | MCP server update data | |
|
|
1473
|
-
|
|
1474
|
-
### Return type
|
|
1475
|
-
|
|
1476
|
-
[**MCPServerDTO**](MCPServerDTO.md)
|
|
1477
|
-
|
|
1478
|
-
### Authorization
|
|
1479
|
-
|
|
1480
|
-
No authorization required
|
|
1481
|
-
|
|
1482
|
-
### HTTP request headers
|
|
1483
|
-
|
|
1484
|
-
- **Content-Type**: `application/json`
|
|
1485
|
-
- **Accept**: `application/json`
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
### HTTP response details
|
|
1489
|
-
| Status code | Description | Response headers |
|
|
1490
|
-
|-------------|-------------|------------------|
|
|
1491
|
-
| **200** | Updated MCP server | - |
|
|
1492
|
-
| **400** | Bad Request | - |
|
|
1493
|
-
| **401** | Unauthorized | - |
|
|
1494
|
-
| **402** | Payment Required | - |
|
|
1495
|
-
| **500** | Internal Server Error | - |
|
|
1496
|
-
|
|
1497
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1498
|
-
|