@smithery/api 0.20.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/package.json +1 -1
- package/resources/beta/connect/connect.d.mts +4 -4
- package/resources/beta/connect/connect.d.mts.map +1 -1
- package/resources/beta/connect/connect.d.ts +4 -4
- package/resources/beta/connect/connect.d.ts.map +1 -1
- package/resources/beta/connect/connect.js.map +1 -1
- package/resources/beta/connect/connect.mjs +1 -1
- package/resources/beta/connect/connect.mjs.map +1 -1
- package/resources/beta/connect/connections.d.mts +139 -1
- package/resources/beta/connect/connections.d.mts.map +1 -1
- package/resources/beta/connect/connections.d.ts +139 -1
- package/resources/beta/connect/connections.d.ts.map +1 -1
- package/resources/beta/connect/connections.js +84 -0
- package/resources/beta/connect/connections.js.map +1 -1
- package/resources/beta/connect/connections.mjs +84 -0
- package/resources/beta/connect/connections.mjs.map +1 -1
- package/resources/beta/connect/index.d.mts +2 -2
- package/resources/beta/connect/index.d.mts.map +1 -1
- package/resources/beta/connect/index.d.ts +2 -2
- package/resources/beta/connect/index.d.ts.map +1 -1
- package/resources/beta/connect/index.js.map +1 -1
- package/resources/beta/connect/index.mjs.map +1 -1
- package/resources/beta/connect/rpc.d.mts +42 -1
- package/resources/beta/connect/rpc.d.mts.map +1 -1
- package/resources/beta/connect/rpc.d.ts +42 -1
- package/resources/beta/connect/rpc.d.ts.map +1 -1
- package/resources/beta/connect/rpc.js +21 -0
- package/resources/beta/connect/rpc.js.map +1 -1
- package/resources/beta/connect/rpc.mjs +21 -0
- package/resources/beta/connect/rpc.mjs.map +1 -1
- package/resources/beta/tools.d.mts +10 -0
- package/resources/beta/tools.d.mts.map +1 -1
- package/resources/beta/tools.d.ts +10 -0
- package/resources/beta/tools.d.ts.map +1 -1
- package/resources/beta/tools.js +10 -0
- package/resources/beta/tools.js.map +1 -1
- package/resources/beta/tools.mjs +10 -0
- package/resources/beta/tools.mjs.map +1 -1
- package/src/resources/beta/connect/connect.ts +23 -3
- package/src/resources/beta/connect/connections.ts +174 -1
- package/src/resources/beta/connect/index.ts +6 -1
- package/src/resources/beta/connect/rpc.ts +57 -2
- package/src/resources/beta/tools.ts +10 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { Connect } from "./connect.js";
|
|
2
|
-
export { Connections, type Connection, type ConnectionsListResponse, type CreateConnectionRequest, } from "./connections.js";
|
|
3
|
-
export { Rpc, type JsonRpcRequest, type JsonRpcResponse } from "./rpc.js";
|
|
2
|
+
export { Connections, type Connection, type ConnectionsListResponse, type CreateConnectionRequest, type ConnectionDeleteResponse, type ConnectionCreateParams, type ConnectionRetrieveParams, type ConnectionDeleteParams, type ConnectionSetParams, } from "./connections.js";
|
|
3
|
+
export { Rpc, type JsonRpcRequest, type JsonRpcResponse, type RpcCallParams } from "./rpc.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/connect/index.ts"],"names":[],"mappings":"OAEO,EAAE,OAAO,EAAE;OACX,EACL,WAAW,EACX,KAAK,UAAU,EACf,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/connect/index.ts"],"names":[],"mappings":"OAEO,EAAE,OAAO,EAAE;OACX,EACL,WAAW,EACX,KAAK,UAAU,EACf,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,GACzB;OACM,EAAE,GAAG,EAAE,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/beta/connect/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/beta/connect/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,gDAUuB;AATrB,0GAAA,WAAW,OAAA;AAUb,gCAA2F;AAAlF,0FAAA,GAAG,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/beta/connect/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,OAAO,EAAE;OACX,EACL,WAAW,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/beta/connect/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,OAAO,EAAE;OACX,EACL,WAAW,GASZ;OACM,EAAE,GAAG,EAAiE"}
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
2
4
|
export declare class Rpc extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Execute a JSON-RPC call on an MCP connection. Requires service token with rpc
|
|
7
|
+
* scope.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const jsonRpcResponse = await client.beta.connect.rpc.call(
|
|
12
|
+
* 'connectionId',
|
|
13
|
+
* {
|
|
14
|
+
* namespace: 'namespace',
|
|
15
|
+
* jsonrpc: '2.0',
|
|
16
|
+
* method: 'tools/list',
|
|
17
|
+
* },
|
|
18
|
+
* );
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
call(connectionID: string, params: RpcCallParams, options?: RequestOptions): APIPromise<JsonRpcResponse>;
|
|
3
22
|
}
|
|
4
23
|
export interface JsonRpcRequest {
|
|
5
24
|
jsonrpc: '2.0';
|
|
@@ -18,7 +37,29 @@ export interface JsonRpcResponse {
|
|
|
18
37
|
jsonrpc: '2.0';
|
|
19
38
|
result?: unknown;
|
|
20
39
|
}
|
|
40
|
+
export interface RpcCallParams {
|
|
41
|
+
/**
|
|
42
|
+
* Path param
|
|
43
|
+
*/
|
|
44
|
+
namespace: string;
|
|
45
|
+
/**
|
|
46
|
+
* Body param
|
|
47
|
+
*/
|
|
48
|
+
jsonrpc: '2.0';
|
|
49
|
+
/**
|
|
50
|
+
* Body param: MCP method to call
|
|
51
|
+
*/
|
|
52
|
+
method: string;
|
|
53
|
+
/**
|
|
54
|
+
* Body param
|
|
55
|
+
*/
|
|
56
|
+
id?: string | number;
|
|
57
|
+
/**
|
|
58
|
+
* Body param: Method parameters
|
|
59
|
+
*/
|
|
60
|
+
params?: unknown;
|
|
61
|
+
}
|
|
21
62
|
export declare namespace Rpc {
|
|
22
|
-
export { type JsonRpcRequest as JsonRpcRequest, type JsonRpcResponse as JsonRpcResponse };
|
|
63
|
+
export { type JsonRpcRequest as JsonRpcRequest, type JsonRpcResponse as JsonRpcResponse, type RpcCallParams as RpcCallParams, };
|
|
23
64
|
}
|
|
24
65
|
//# sourceMappingURL=rpc.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/connect/rpc.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"rpc.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/connect/rpc.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,GAAI,SAAQ,WAAW;IAClC;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,eAAe,CAAC;CAIzG;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,KAAK,CAAC;IAEf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAErB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAE3B,OAAO,EAAE,KAAK,CAAC;IAEf,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC;IAEf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAErB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,GAAG,CAAC;IAC3B,OAAO,EACL,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,aAAa,IAAI,aAAa,GACpC,CAAC;CACH"}
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
2
4
|
export declare class Rpc extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Execute a JSON-RPC call on an MCP connection. Requires service token with rpc
|
|
7
|
+
* scope.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const jsonRpcResponse = await client.beta.connect.rpc.call(
|
|
12
|
+
* 'connectionId',
|
|
13
|
+
* {
|
|
14
|
+
* namespace: 'namespace',
|
|
15
|
+
* jsonrpc: '2.0',
|
|
16
|
+
* method: 'tools/list',
|
|
17
|
+
* },
|
|
18
|
+
* );
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
call(connectionID: string, params: RpcCallParams, options?: RequestOptions): APIPromise<JsonRpcResponse>;
|
|
3
22
|
}
|
|
4
23
|
export interface JsonRpcRequest {
|
|
5
24
|
jsonrpc: '2.0';
|
|
@@ -18,7 +37,29 @@ export interface JsonRpcResponse {
|
|
|
18
37
|
jsonrpc: '2.0';
|
|
19
38
|
result?: unknown;
|
|
20
39
|
}
|
|
40
|
+
export interface RpcCallParams {
|
|
41
|
+
/**
|
|
42
|
+
* Path param
|
|
43
|
+
*/
|
|
44
|
+
namespace: string;
|
|
45
|
+
/**
|
|
46
|
+
* Body param
|
|
47
|
+
*/
|
|
48
|
+
jsonrpc: '2.0';
|
|
49
|
+
/**
|
|
50
|
+
* Body param: MCP method to call
|
|
51
|
+
*/
|
|
52
|
+
method: string;
|
|
53
|
+
/**
|
|
54
|
+
* Body param
|
|
55
|
+
*/
|
|
56
|
+
id?: string | number;
|
|
57
|
+
/**
|
|
58
|
+
* Body param: Method parameters
|
|
59
|
+
*/
|
|
60
|
+
params?: unknown;
|
|
61
|
+
}
|
|
21
62
|
export declare namespace Rpc {
|
|
22
|
-
export { type JsonRpcRequest as JsonRpcRequest, type JsonRpcResponse as JsonRpcResponse };
|
|
63
|
+
export { type JsonRpcRequest as JsonRpcRequest, type JsonRpcResponse as JsonRpcResponse, type RpcCallParams as RpcCallParams, };
|
|
23
64
|
}
|
|
24
65
|
//# sourceMappingURL=rpc.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/connect/rpc.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/connect/rpc.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,GAAI,SAAQ,WAAW;IAClC;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,eAAe,CAAC;CAIzG;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,KAAK,CAAC;IAEf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAErB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAE3B,OAAO,EAAE,KAAK,CAAC;IAEf,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC;IAEf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAErB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,GAAG,CAAC;IAC3B,OAAO,EACL,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,aAAa,IAAI,aAAa,GACpC,CAAC;CACH"}
|
|
@@ -3,7 +3,28 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Rpc = void 0;
|
|
5
5
|
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
const path_1 = require("../../../internal/utils/path.js");
|
|
6
7
|
class Rpc extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Execute a JSON-RPC call on an MCP connection. Requires service token with rpc
|
|
10
|
+
* scope.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const jsonRpcResponse = await client.beta.connect.rpc.call(
|
|
15
|
+
* 'connectionId',
|
|
16
|
+
* {
|
|
17
|
+
* namespace: 'namespace',
|
|
18
|
+
* jsonrpc: '2.0',
|
|
19
|
+
* method: 'tools/list',
|
|
20
|
+
* },
|
|
21
|
+
* );
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
call(connectionID, params, options) {
|
|
25
|
+
const { namespace, ...body } = params;
|
|
26
|
+
return this._client.post((0, path_1.path) `/connect/${namespace}/${connectionID}/rpc`, { body, ...options });
|
|
27
|
+
}
|
|
7
28
|
}
|
|
8
29
|
exports.Rpc = Rpc;
|
|
9
30
|
//# sourceMappingURL=rpc.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.js","sourceRoot":"","sources":["../../../src/resources/beta/connect/rpc.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;
|
|
1
|
+
{"version":3,"file":"rpc.js","sourceRoot":"","sources":["../../../src/resources/beta/connect/rpc.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAGrD,0DAAoD;AAEpD,MAAa,GAAI,SAAQ,sBAAW;IAClC;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,YAAoB,EAAE,MAAqB,EAAE,OAAwB;QACxE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,YAAY,SAAS,IAAI,YAAY,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClG,CAAC;CACF;AArBD,kBAqBC"}
|
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import { path } from "../../../internal/utils/path.mjs";
|
|
3
4
|
export class Rpc extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Execute a JSON-RPC call on an MCP connection. Requires service token with rpc
|
|
7
|
+
* scope.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const jsonRpcResponse = await client.beta.connect.rpc.call(
|
|
12
|
+
* 'connectionId',
|
|
13
|
+
* {
|
|
14
|
+
* namespace: 'namespace',
|
|
15
|
+
* jsonrpc: '2.0',
|
|
16
|
+
* method: 'tools/list',
|
|
17
|
+
* },
|
|
18
|
+
* );
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
call(connectionID, params, options) {
|
|
22
|
+
const { namespace, ...body } = params;
|
|
23
|
+
return this._client.post(path `/connect/${namespace}/${connectionID}/rpc`, { body, ...options });
|
|
24
|
+
}
|
|
4
25
|
}
|
|
5
26
|
//# sourceMappingURL=rpc.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.mjs","sourceRoot":"","sources":["../../../src/resources/beta/connect/rpc.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"rpc.mjs","sourceRoot":"","sources":["../../../src/resources/beta/connect/rpc.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,GAAI,SAAQ,WAAW;IAClC;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,YAAoB,EAAE,MAAqB,EAAE,OAAwB;QACxE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,YAAY,SAAS,IAAI,YAAY,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClG,CAAC;CACF"}
|
|
@@ -5,6 +5,16 @@ export declare class Tools extends APIResource {
|
|
|
5
5
|
/**
|
|
6
6
|
* Get a paginated list of all MCP tools across servers. Use the `q` parameter for
|
|
7
7
|
* semantic search.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* // Automatically fetches more pages as needed.
|
|
12
|
+
* for await (const toolListResponse of client.beta.tools.list(
|
|
13
|
+
* { q: 'x' },
|
|
14
|
+
* )) {
|
|
15
|
+
* // ...
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
8
18
|
*/
|
|
9
19
|
list(query: ToolListParams, options?: RequestOptions): PagePromise<ToolListResponsesToolsPage, ToolListResponse>;
|
|
10
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.mts","sourceRoot":"","sources":["../../src/resources/beta/tools.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE;OAChD,EAAE,cAAc,EAAE;AAEzB,qBAAa,KAAM,SAAQ,WAAW;IACpC
|
|
1
|
+
{"version":3,"file":"tools.d.mts","sourceRoot":"","sources":["../../src/resources/beta/tools.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE;OAChD,EAAE,cAAc,EAAE;AAEzB,qBAAa,KAAM,SAAQ,WAAW;IAC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GAAG,GAAG,MAAM,GAAG,OAAO,CAAC;IAEhD,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B,cAAc,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,MAAM,GAAG,OAAO,CAAC;IAE9C,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;CACH"}
|
|
@@ -5,6 +5,16 @@ export declare class Tools extends APIResource {
|
|
|
5
5
|
/**
|
|
6
6
|
* Get a paginated list of all MCP tools across servers. Use the `q` parameter for
|
|
7
7
|
* semantic search.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* // Automatically fetches more pages as needed.
|
|
12
|
+
* for await (const toolListResponse of client.beta.tools.list(
|
|
13
|
+
* { q: 'x' },
|
|
14
|
+
* )) {
|
|
15
|
+
* // ...
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
8
18
|
*/
|
|
9
19
|
list(query: ToolListParams, options?: RequestOptions): PagePromise<ToolListResponsesToolsPage, ToolListResponse>;
|
|
10
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/resources/beta/tools.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE;OAChD,EAAE,cAAc,EAAE;AAEzB,qBAAa,KAAM,SAAQ,WAAW;IACpC
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/resources/beta/tools.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE;OAChD,EAAE,cA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,CAAC;IAElB,gBAAgB,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,MAAM,GAAG,OAAO,CAAC;IAEhD,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B,cAAc,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,MAAM,GAAG,OAAO,CAAC;IAE9C,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;CACH"}
|
package/resources/beta/tools.js
CHANGED
|
@@ -8,6 +8,16 @@ class Tools extends resource_1.APIResource {
|
|
|
8
8
|
/**
|
|
9
9
|
* Get a paginated list of all MCP tools across servers. Use the `q` parameter for
|
|
10
10
|
* semantic search.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* // Automatically fetches more pages as needed.
|
|
15
|
+
* for await (const toolListResponse of client.beta.tools.list(
|
|
16
|
+
* { q: 'x' },
|
|
17
|
+
* )) {
|
|
18
|
+
* // ...
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
11
21
|
*/
|
|
12
22
|
list(query, options) {
|
|
13
23
|
return this._client.getAPIList('/tools', (pagination_1.ToolsPage), { query, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/resources/beta/tools.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAClD,yDAAqF;AAGrF,MAAa,KAAM,SAAQ,sBAAW;IACpC
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/resources/beta/tools.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAClD,yDAAqF;AAGrF,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;;;;;;;OAaG;IACH,IAAI,CACF,KAAqB,EACrB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAA,sBAA2B,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;CACF;AArBD,sBAqBC"}
|
package/resources/beta/tools.mjs
CHANGED
|
@@ -5,6 +5,16 @@ export class Tools extends APIResource {
|
|
|
5
5
|
/**
|
|
6
6
|
* Get a paginated list of all MCP tools across servers. Use the `q` parameter for
|
|
7
7
|
* semantic search.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* // Automatically fetches more pages as needed.
|
|
12
|
+
* for await (const toolListResponse of client.beta.tools.list(
|
|
13
|
+
* { q: 'x' },
|
|
14
|
+
* )) {
|
|
15
|
+
* // ...
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
8
18
|
*/
|
|
9
19
|
list(query, options) {
|
|
10
20
|
return this._client.getAPIList('/tools', (ToolsPage), { query, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.mjs","sourceRoot":"","sources":["../../src/resources/beta/tools.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAe,SAAS,EAAwB;AAGvD,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC
|
|
1
|
+
{"version":3,"file":"tools.mjs","sourceRoot":"","sources":["../../src/resources/beta/tools.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAe,SAAS,EAAwB;AAGvD,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;;OAaG;IACH,IAAI,CACF,KAAqB,EACrB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAA,SAA2B,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;CACF"}
|
|
@@ -2,9 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
4
|
import * as ConnectionsAPI from './connections';
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
Connection,
|
|
7
|
+
ConnectionCreateParams,
|
|
8
|
+
ConnectionDeleteParams,
|
|
9
|
+
ConnectionDeleteResponse,
|
|
10
|
+
ConnectionRetrieveParams,
|
|
11
|
+
ConnectionSetParams,
|
|
12
|
+
Connections,
|
|
13
|
+
ConnectionsListResponse,
|
|
14
|
+
CreateConnectionRequest,
|
|
15
|
+
} from './connections';
|
|
6
16
|
import * as RpcAPI from './rpc';
|
|
7
|
-
import { JsonRpcRequest, JsonRpcResponse, Rpc } from './rpc';
|
|
17
|
+
import { JsonRpcRequest, JsonRpcResponse, Rpc, RpcCallParams } from './rpc';
|
|
8
18
|
|
|
9
19
|
export class Connect extends APIResource {
|
|
10
20
|
connections: ConnectionsAPI.Connections = new ConnectionsAPI.Connections(this._client);
|
|
@@ -20,7 +30,17 @@ export declare namespace Connect {
|
|
|
20
30
|
type Connection as Connection,
|
|
21
31
|
type ConnectionsListResponse as ConnectionsListResponse,
|
|
22
32
|
type CreateConnectionRequest as CreateConnectionRequest,
|
|
33
|
+
type ConnectionDeleteResponse as ConnectionDeleteResponse,
|
|
34
|
+
type ConnectionCreateParams as ConnectionCreateParams,
|
|
35
|
+
type ConnectionRetrieveParams as ConnectionRetrieveParams,
|
|
36
|
+
type ConnectionDeleteParams as ConnectionDeleteParams,
|
|
37
|
+
type ConnectionSetParams as ConnectionSetParams,
|
|
23
38
|
};
|
|
24
39
|
|
|
25
|
-
export {
|
|
40
|
+
export {
|
|
41
|
+
Rpc as Rpc,
|
|
42
|
+
type JsonRpcRequest as JsonRpcRequest,
|
|
43
|
+
type JsonRpcResponse as JsonRpcResponse,
|
|
44
|
+
type RpcCallParams as RpcCallParams,
|
|
45
|
+
};
|
|
26
46
|
}
|
|
@@ -1,8 +1,107 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
6
|
+
import { path } from '../../../internal/utils/path';
|
|
4
7
|
|
|
5
|
-
export class Connections extends APIResource {
|
|
8
|
+
export class Connections extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Create a new MCP connection with an auto-generated ID. Requires API key and
|
|
11
|
+
* namespace ownership.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const connection =
|
|
16
|
+
* await client.beta.connect.connections.create(
|
|
17
|
+
* 'namespace',
|
|
18
|
+
* { mcpUrl: 'https://mcp.example.com/sse' },
|
|
19
|
+
* );
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
create(namespace: string, body: ConnectionCreateParams, options?: RequestOptions): APIPromise<Connection> {
|
|
23
|
+
return this._client.post(path`/connect/${namespace}`, { body, ...options });
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Get details for a specific connection. Requires service token with
|
|
28
|
+
* connections:read scope.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const connection =
|
|
33
|
+
* await client.beta.connect.connections.retrieve(
|
|
34
|
+
* 'connectionId',
|
|
35
|
+
* { namespace: 'namespace' },
|
|
36
|
+
* );
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
retrieve(
|
|
40
|
+
connectionID: string,
|
|
41
|
+
params: ConnectionRetrieveParams,
|
|
42
|
+
options?: RequestOptions,
|
|
43
|
+
): APIPromise<Connection> {
|
|
44
|
+
const { namespace } = params;
|
|
45
|
+
return this._client.get(path`/connect/${namespace}/${connectionID}`, options);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* List all connections in a namespace. Requires service token with
|
|
50
|
+
* connections:read scope.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* const connectionsListResponse =
|
|
55
|
+
* await client.beta.connect.connections.list('namespace');
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
list(namespace: string, options?: RequestOptions): APIPromise<ConnectionsListResponse> {
|
|
59
|
+
return this._client.get(path`/connect/${namespace}`, options);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Delete a connection and terminate its MCP session. Requires API key and
|
|
64
|
+
* namespace ownership.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* const connection =
|
|
69
|
+
* await client.beta.connect.connections.delete(
|
|
70
|
+
* 'connectionId',
|
|
71
|
+
* { namespace: 'namespace' },
|
|
72
|
+
* );
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
delete(
|
|
76
|
+
connectionID: string,
|
|
77
|
+
params: ConnectionDeleteParams,
|
|
78
|
+
options?: RequestOptions,
|
|
79
|
+
): APIPromise<ConnectionDeleteResponse> {
|
|
80
|
+
const { namespace } = params;
|
|
81
|
+
return this._client.delete(path`/connect/${namespace}/${connectionID}`, options);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Create a new MCP connection with the given ID. Requires API key and namespace
|
|
86
|
+
* ownership.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* const connection =
|
|
91
|
+
* await client.beta.connect.connections.set(
|
|
92
|
+
* 'connectionId',
|
|
93
|
+
* {
|
|
94
|
+
* namespace: 'namespace',
|
|
95
|
+
* mcpUrl: 'https://mcp.example.com/sse',
|
|
96
|
+
* },
|
|
97
|
+
* );
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
set(connectionID: string, params: ConnectionSetParams, options?: RequestOptions): APIPromise<Connection> {
|
|
101
|
+
const { namespace, ...body } = params;
|
|
102
|
+
return this._client.put(path`/connect/${namespace}/${connectionID}`, { body, ...options });
|
|
103
|
+
}
|
|
104
|
+
}
|
|
6
105
|
|
|
7
106
|
export interface Connection {
|
|
8
107
|
/**
|
|
@@ -77,6 +176,12 @@ export interface CreateConnectionRequest {
|
|
|
77
176
|
*/
|
|
78
177
|
mcpUrl: string;
|
|
79
178
|
|
|
179
|
+
/**
|
|
180
|
+
* Custom headers to send with MCP requests (stored securely, not returned in
|
|
181
|
+
* responses)
|
|
182
|
+
*/
|
|
183
|
+
headers?: { [key: string]: string };
|
|
184
|
+
|
|
80
185
|
/**
|
|
81
186
|
* Custom metadata for filtering connections
|
|
82
187
|
*/
|
|
@@ -88,10 +193,78 @@ export interface CreateConnectionRequest {
|
|
|
88
193
|
name?: string;
|
|
89
194
|
}
|
|
90
195
|
|
|
196
|
+
export interface ConnectionDeleteResponse {
|
|
197
|
+
success: true;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export interface ConnectionCreateParams {
|
|
201
|
+
/**
|
|
202
|
+
* URL of the MCP server
|
|
203
|
+
*/
|
|
204
|
+
mcpUrl: string;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Custom headers to send with MCP requests (stored securely, not returned in
|
|
208
|
+
* responses)
|
|
209
|
+
*/
|
|
210
|
+
headers?: { [key: string]: string };
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Custom metadata for filtering connections
|
|
214
|
+
*/
|
|
215
|
+
metadata?: { [key: string]: unknown };
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Human-readable name (optional, defaults to connection ID)
|
|
219
|
+
*/
|
|
220
|
+
name?: string;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export interface ConnectionRetrieveParams {
|
|
224
|
+
namespace: string;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export interface ConnectionDeleteParams {
|
|
228
|
+
namespace: string;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export interface ConnectionSetParams {
|
|
232
|
+
/**
|
|
233
|
+
* Path param
|
|
234
|
+
*/
|
|
235
|
+
namespace: string;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Body param: URL of the MCP server
|
|
239
|
+
*/
|
|
240
|
+
mcpUrl: string;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Body param: Custom headers to send with MCP requests (stored securely, not
|
|
244
|
+
* returned in responses)
|
|
245
|
+
*/
|
|
246
|
+
headers?: { [key: string]: string };
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Body param: Custom metadata for filtering connections
|
|
250
|
+
*/
|
|
251
|
+
metadata?: { [key: string]: unknown };
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Body param: Human-readable name (optional, defaults to connection ID)
|
|
255
|
+
*/
|
|
256
|
+
name?: string;
|
|
257
|
+
}
|
|
258
|
+
|
|
91
259
|
export declare namespace Connections {
|
|
92
260
|
export {
|
|
93
261
|
type Connection as Connection,
|
|
94
262
|
type ConnectionsListResponse as ConnectionsListResponse,
|
|
95
263
|
type CreateConnectionRequest as CreateConnectionRequest,
|
|
264
|
+
type ConnectionDeleteResponse as ConnectionDeleteResponse,
|
|
265
|
+
type ConnectionCreateParams as ConnectionCreateParams,
|
|
266
|
+
type ConnectionRetrieveParams as ConnectionRetrieveParams,
|
|
267
|
+
type ConnectionDeleteParams as ConnectionDeleteParams,
|
|
268
|
+
type ConnectionSetParams as ConnectionSetParams,
|
|
96
269
|
};
|
|
97
270
|
}
|
|
@@ -6,5 +6,10 @@ export {
|
|
|
6
6
|
type Connection,
|
|
7
7
|
type ConnectionsListResponse,
|
|
8
8
|
type CreateConnectionRequest,
|
|
9
|
+
type ConnectionDeleteResponse,
|
|
10
|
+
type ConnectionCreateParams,
|
|
11
|
+
type ConnectionRetrieveParams,
|
|
12
|
+
type ConnectionDeleteParams,
|
|
13
|
+
type ConnectionSetParams,
|
|
9
14
|
} from './connections';
|
|
10
|
-
export { Rpc, type JsonRpcRequest, type JsonRpcResponse } from './rpc';
|
|
15
|
+
export { Rpc, type JsonRpcRequest, type JsonRpcResponse, type RpcCallParams } from './rpc';
|
|
@@ -1,8 +1,32 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
6
|
+
import { path } from '../../../internal/utils/path';
|
|
4
7
|
|
|
5
|
-
export class Rpc extends APIResource {
|
|
8
|
+
export class Rpc extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Execute a JSON-RPC call on an MCP connection. Requires service token with rpc
|
|
11
|
+
* scope.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const jsonRpcResponse = await client.beta.connect.rpc.call(
|
|
16
|
+
* 'connectionId',
|
|
17
|
+
* {
|
|
18
|
+
* namespace: 'namespace',
|
|
19
|
+
* jsonrpc: '2.0',
|
|
20
|
+
* method: 'tools/list',
|
|
21
|
+
* },
|
|
22
|
+
* );
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
call(connectionID: string, params: RpcCallParams, options?: RequestOptions): APIPromise<JsonRpcResponse> {
|
|
26
|
+
const { namespace, ...body } = params;
|
|
27
|
+
return this._client.post(path`/connect/${namespace}/${connectionID}/rpc`, { body, ...options });
|
|
28
|
+
}
|
|
29
|
+
}
|
|
6
30
|
|
|
7
31
|
export interface JsonRpcRequest {
|
|
8
32
|
jsonrpc: '2.0';
|
|
@@ -28,6 +52,37 @@ export interface JsonRpcResponse {
|
|
|
28
52
|
result?: unknown;
|
|
29
53
|
}
|
|
30
54
|
|
|
55
|
+
export interface RpcCallParams {
|
|
56
|
+
/**
|
|
57
|
+
* Path param
|
|
58
|
+
*/
|
|
59
|
+
namespace: string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Body param
|
|
63
|
+
*/
|
|
64
|
+
jsonrpc: '2.0';
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Body param: MCP method to call
|
|
68
|
+
*/
|
|
69
|
+
method: string;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Body param
|
|
73
|
+
*/
|
|
74
|
+
id?: string | number;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Body param: Method parameters
|
|
78
|
+
*/
|
|
79
|
+
params?: unknown;
|
|
80
|
+
}
|
|
81
|
+
|
|
31
82
|
export declare namespace Rpc {
|
|
32
|
-
export {
|
|
83
|
+
export {
|
|
84
|
+
type JsonRpcRequest as JsonRpcRequest,
|
|
85
|
+
type JsonRpcResponse as JsonRpcResponse,
|
|
86
|
+
type RpcCallParams as RpcCallParams,
|
|
87
|
+
};
|
|
33
88
|
}
|