@smithery/api 0.29.0 → 0.30.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.
Files changed (84) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/package.json +1 -1
  3. package/resources/beta/beta.d.mts +2 -2
  4. package/resources/beta/beta.d.mts.map +1 -1
  5. package/resources/beta/beta.d.ts +2 -2
  6. package/resources/beta/beta.d.ts.map +1 -1
  7. package/resources/beta/beta.js.map +1 -1
  8. package/resources/beta/beta.mjs.map +1 -1
  9. package/resources/beta/connect/connect.d.mts +0 -4
  10. package/resources/beta/connect/connect.d.mts.map +1 -1
  11. package/resources/beta/connect/connect.d.ts +0 -4
  12. package/resources/beta/connect/connect.d.ts.map +1 -1
  13. package/resources/beta/connect/connect.js +0 -4
  14. package/resources/beta/connect/connect.js.map +1 -1
  15. package/resources/beta/connect/connect.mjs +0 -4
  16. package/resources/beta/connect/connect.mjs.map +1 -1
  17. package/resources/beta/connect/index.d.mts +0 -1
  18. package/resources/beta/connect/index.d.mts.map +1 -1
  19. package/resources/beta/connect/index.d.ts +0 -1
  20. package/resources/beta/connect/index.d.ts.map +1 -1
  21. package/resources/beta/connect/index.js +1 -3
  22. package/resources/beta/connect/index.js.map +1 -1
  23. package/resources/beta/connect/index.mjs +0 -1
  24. package/resources/beta/connect/index.mjs.map +1 -1
  25. package/resources/beta/index.d.mts +1 -1
  26. package/resources/beta/index.d.mts.map +1 -1
  27. package/resources/beta/index.d.ts +1 -1
  28. package/resources/beta/index.d.ts.map +1 -1
  29. package/resources/beta/index.js.map +1 -1
  30. package/resources/beta/index.mjs.map +1 -1
  31. package/resources/beta/tools.d.mts +43 -77
  32. package/resources/beta/tools.d.mts.map +1 -1
  33. package/resources/beta/tools.d.ts +43 -77
  34. package/resources/beta/tools.d.ts.map +1 -1
  35. package/resources/beta/tools.js +9 -11
  36. package/resources/beta/tools.js.map +1 -1
  37. package/resources/beta/tools.mjs +9 -11
  38. package/resources/beta/tools.mjs.map +1 -1
  39. package/resources/namespaces/index.d.mts +1 -1
  40. package/resources/namespaces/index.d.mts.map +1 -1
  41. package/resources/namespaces/index.d.ts +1 -1
  42. package/resources/namespaces/index.d.ts.map +1 -1
  43. package/resources/namespaces/index.js.map +1 -1
  44. package/resources/namespaces/index.mjs +1 -1
  45. package/resources/namespaces/index.mjs.map +1 -1
  46. package/resources/namespaces/namespaces.d.mts +2 -2
  47. package/resources/namespaces/namespaces.d.mts.map +1 -1
  48. package/resources/namespaces/namespaces.d.ts +2 -2
  49. package/resources/namespaces/namespaces.d.ts.map +1 -1
  50. package/resources/namespaces/namespaces.js.map +1 -1
  51. package/resources/namespaces/namespaces.mjs.map +1 -1
  52. package/resources/namespaces/servers.d.mts +7 -11
  53. package/resources/namespaces/servers.d.mts.map +1 -1
  54. package/resources/namespaces/servers.d.ts +7 -11
  55. package/resources/namespaces/servers.d.ts.map +1 -1
  56. package/resources/namespaces/servers.js +4 -4
  57. package/resources/namespaces/servers.mjs +4 -4
  58. package/resources/servers/deployments.d.mts +3 -3
  59. package/resources/servers/deployments.d.mts.map +1 -1
  60. package/resources/servers/deployments.d.ts +3 -3
  61. package/resources/servers/deployments.d.ts.map +1 -1
  62. package/src/resources/beta/beta.ts +3 -4
  63. package/src/resources/beta/connect/connect.ts +0 -10
  64. package/src/resources/beta/connect/index.ts +0 -1
  65. package/src/resources/beta/index.ts +1 -1
  66. package/src/resources/beta/tools.ts +48 -109
  67. package/src/resources/namespaces/index.ts +1 -6
  68. package/src/resources/namespaces/namespaces.ts +2 -3
  69. package/src/resources/namespaces/servers.ts +7 -17
  70. package/src/resources/servers/deployments.ts +5 -5
  71. package/src/version.ts +1 -1
  72. package/version.d.mts +1 -1
  73. package/version.d.ts +1 -1
  74. package/version.js +1 -1
  75. package/version.mjs +1 -1
  76. package/resources/beta/connect/tools.d.mts +0 -47
  77. package/resources/beta/connect/tools.d.mts.map +0 -1
  78. package/resources/beta/connect/tools.d.ts +0 -47
  79. package/resources/beta/connect/tools.d.ts.map +0 -1
  80. package/resources/beta/connect/tools.js +0 -25
  81. package/resources/beta/connect/tools.js.map +0 -1
  82. package/resources/beta/connect/tools.mjs +0 -21
  83. package/resources/beta/connect/tools.mjs.map +0 -1
  84. package/src/resources/beta/connect/tools.ts +0 -70
@@ -1,150 +1,89 @@
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 { PagePromise, ToolsPage, type ToolsPageParams } from '../../core/pagination';
4
+ import { APIPromise } from '../../core/api-promise';
5
5
  import { RequestOptions } from '../../internal/request-options';
6
+ import { path } from '../../internal/utils/path';
6
7
 
7
8
  export class Tools extends APIResource {
8
9
  /**
9
- * Get a paginated list of all MCP tools across servers. Use the `q` parameter for
10
- * semantic search.
10
+ * Search or list indexed tools across all connections in a namespace. If 'q' query
11
+ * parameter is omitted, returns all tools. Filter by connectionId or server URL.
12
+ * Metadata constraints from service tokens are applied automatically.
11
13
  *
12
14
  * @example
13
15
  * ```ts
14
- * // Automatically fetches more pages as needed.
15
- * for await (const toolListResponse of client.beta.tools.list(
16
- * { q: 'x' },
17
- * )) {
18
- * // ...
19
- * }
16
+ * const response = await client.beta.tools.search(
17
+ * 'namespace',
18
+ * );
20
19
  * ```
21
20
  */
22
- list(
23
- query: ToolListParams,
21
+ search(
22
+ namespace: string,
23
+ query: ToolSearchParams | null | undefined = {},
24
24
  options?: RequestOptions,
25
- ): PagePromise<ToolListResponsesToolsPage, ToolListResponse> {
26
- return this._client.getAPIList('/tools', ToolsPage<ToolListResponse>, { query, ...options });
25
+ ): APIPromise<ToolSearchResponse> {
26
+ return this._client.get(path`/connect/tools/${namespace}`, { query, ...options });
27
27
  }
28
28
  }
29
29
 
30
- export type ToolListResponsesToolsPage = ToolsPage<ToolListResponse>;
30
+ export interface ToolSearchResponse {
31
+ nextCursor: string | null;
31
32
 
32
- export interface ToolListResponse {
33
- id: string;
34
-
35
- server: ToolListResponse.Server;
36
-
37
- tool: ToolListResponse.Tool;
33
+ tools: Array<ToolSearchResponse.Tool>;
38
34
  }
39
35
 
40
- export namespace ToolListResponse {
41
- export interface Server {
42
- id: string;
43
-
44
- displayName: string;
45
-
46
- iconUrl: string | null;
47
-
48
- isDeployed: boolean;
49
-
50
- qualifiedName: string;
51
-
52
- verified: boolean;
53
- }
54
-
36
+ export namespace ToolSearchResponse {
55
37
  export interface Tool {
56
- inputSchema: Tool.InputSchema;
57
-
58
- name: string;
59
-
60
- _meta?: { [key: string]: unknown };
61
-
62
- annotations?: Tool.Annotations;
38
+ connectionId: string;
63
39
 
64
- description?: string;
40
+ serverUrl: string;
65
41
 
66
- execution?: Tool.Execution;
42
+ tool: Tool.Tool;
67
43
 
68
- icons?: Array<Tool.Icon>;
69
-
70
- outputSchema?: Tool.OutputSchema;
71
-
72
- title?: string;
44
+ score?: number;
73
45
  }
74
46
 
75
47
  export namespace Tool {
76
- export interface InputSchema {
77
- type: 'object';
78
-
79
- properties?: { [key: string]: unknown };
80
-
81
- required?: Array<string>;
82
-
83
- [k: string]: unknown;
84
- }
85
-
86
- export interface Annotations {
87
- destructiveHint?: boolean;
88
-
89
- idempotentHint?: boolean;
90
-
91
- openWorldHint?: boolean;
92
-
93
- readOnlyHint?: boolean;
94
-
95
- title?: string;
96
- }
97
-
98
- export interface Execution {
99
- taskSupport?: 'required' | 'optional' | 'forbidden';
100
- }
101
-
102
- export interface Icon {
103
- src: string;
104
-
105
- mimeType?: string;
106
-
107
- sizes?: Array<string>;
48
+ export interface Tool {
49
+ name: string;
108
50
 
109
- theme?: 'light' | 'dark';
110
- }
111
-
112
- export interface OutputSchema {
113
- type: 'object';
114
-
115
- properties?: { [key: string]: unknown };
116
-
117
- required?: Array<string>;
118
-
119
- [k: string]: unknown;
51
+ description?: string;
120
52
  }
121
53
  }
122
54
  }
123
55
 
124
- export interface ToolListParams extends ToolsPageParams {
125
- q: string;
126
-
127
- destructiveHint?: '0' | '1' | 'true' | 'false';
128
-
129
- idempotentHint?: '0' | '1' | 'true' | 'false';
56
+ export interface ToolSearchParams {
57
+ /**
58
+ * Filter by connection ID
59
+ */
60
+ connectionId?: string;
130
61
 
131
- readOnlyHint?: '0' | '1' | 'true' | 'false';
62
+ cursor?: string;
132
63
 
133
- serverId?: string;
64
+ /**
65
+ * Exclude tools from this connection
66
+ */
67
+ excludeConnectionId?: string;
134
68
 
135
- serverIsDeployed?: '0' | '1' | 'true' | 'false';
69
+ /**
70
+ * Exclude tools from this server URL
71
+ */
72
+ excludeServer?: string;
136
73
 
137
- serverQualifiedName?: string;
74
+ limit?: number;
138
75
 
139
- serverVerified?: '0' | '1' | 'true' | 'false';
76
+ /**
77
+ * Search query (optional - omit to list all tools)
78
+ */
79
+ q?: string;
140
80
 
141
- topK?: number;
81
+ /**
82
+ * Filter by server URL
83
+ */
84
+ server?: string;
142
85
  }
143
86
 
144
87
  export declare namespace Tools {
145
- export {
146
- type ToolListResponse as ToolListResponse,
147
- type ToolListResponsesToolsPage as ToolListResponsesToolsPage,
148
- type ToolListParams as ToolListParams,
149
- };
88
+ export { type ToolSearchResponse as ToolSearchResponse, type ToolSearchParams as ToolSearchParams };
150
89
  }
@@ -6,9 +6,4 @@ export {
6
6
  type NamespaceListResponse,
7
7
  type NamespaceSetResponse,
8
8
  } from './namespaces';
9
- export {
10
- Servers,
11
- type CreateServerRequest,
12
- type CreateServerResponse,
13
- type ServerCreateParams,
14
- } from './servers';
9
+ export { Servers, type ServerCreateResponse, type ServerCreateParams } from './servers';
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
4
  import * as ServersAPI from './servers';
5
- import { CreateServerRequest, CreateServerResponse, ServerCreateParams, Servers } from './servers';
5
+ import { ServerCreateParams, ServerCreateResponse, Servers } from './servers';
6
6
  import { APIPromise } from '../../core/api-promise';
7
7
  import { RequestOptions } from '../../internal/request-options';
8
8
  import { path } from '../../internal/utils/path';
@@ -85,8 +85,7 @@ export declare namespace Namespaces {
85
85
 
86
86
  export {
87
87
  Servers as Servers,
88
- type CreateServerRequest as CreateServerRequest,
89
- type CreateServerResponse as CreateServerResponse,
88
+ type ServerCreateResponse as ServerCreateResponse,
90
89
  type ServerCreateParams as ServerCreateParams,
91
90
  };
92
91
  }
@@ -11,29 +11,23 @@ export class Servers extends APIResource {
11
11
  *
12
12
  * @example
13
13
  * ```ts
14
- * const createServerResponse =
15
- * await client.namespaces.servers.create('xxx', {
16
- * namespace: 'namespace',
17
- * });
14
+ * const server = await client.namespaces.servers.create(
15
+ * 'xxx',
16
+ * { namespace: 'namespace' },
17
+ * );
18
18
  * ```
19
19
  */
20
20
  create(
21
21
  server: string,
22
22
  params: ServerCreateParams,
23
23
  options?: RequestOptions,
24
- ): APIPromise<CreateServerResponse> {
24
+ ): APIPromise<ServerCreateResponse> {
25
25
  const { namespace, ...body } = params;
26
26
  return this._client.put(path`/namespaces/${namespace}/servers/${server}`, { body, ...options });
27
27
  }
28
28
  }
29
29
 
30
- export interface CreateServerRequest {
31
- description?: string;
32
-
33
- displayName?: string;
34
- }
35
-
36
- export interface CreateServerResponse {
30
+ export interface ServerCreateResponse {
37
31
  createdAt: string;
38
32
 
39
33
  description: string;
@@ -63,9 +57,5 @@ export interface ServerCreateParams {
63
57
  }
64
58
 
65
59
  export declare namespace Servers {
66
- export {
67
- type CreateServerRequest as CreateServerRequest,
68
- type CreateServerResponse as CreateServerResponse,
69
- type ServerCreateParams as ServerCreateParams,
70
- };
60
+ export { type ServerCreateResponse as ServerCreateResponse, type ServerCreateParams as ServerCreateParams };
71
61
  }
@@ -96,15 +96,15 @@ export type DeployPayload =
96
96
 
97
97
  export namespace DeployPayload {
98
98
  export interface RepoDeployPayload {
99
- baseDirectory: string;
99
+ type: 'repo';
100
100
 
101
- repoName: string;
101
+ baseDirectory?: string;
102
102
 
103
- repoOwner: string;
103
+ branch?: string;
104
104
 
105
- type: 'repo';
105
+ repoName?: string;
106
106
 
107
- branch?: string;
107
+ repoOwner?: string;
108
108
  }
109
109
  }
110
110
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.29.0'; // x-release-please-version
1
+ export const VERSION = '0.30.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.29.0";
1
+ export declare const VERSION = "0.30.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.29.0";
1
+ export declare const VERSION = "0.30.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.29.0'; // x-release-please-version
4
+ exports.VERSION = '0.30.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.29.0'; // x-release-please-version
1
+ export const VERSION = '0.30.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
@@ -1,47 +0,0 @@
1
- import { APIResource } from "../../../core/resource.mjs";
2
- import { APIPromise } from "../../../core/api-promise.mjs";
3
- import { RequestOptions } from "../../../internal/request-options.mjs";
4
- export declare class Tools extends APIResource {
5
- /**
6
- * Search or list indexed tools across all connections in a namespace. If 'q' query
7
- * parameter is omitted, returns all tools. Filter by connectionId or server URL.
8
- * Metadata constraints from service tokens are applied automatically.
9
- *
10
- * @example
11
- * ```ts
12
- * const response = await client.beta.connect.tools.search(
13
- * 'namespace',
14
- * );
15
- * ```
16
- */
17
- search(namespace: string, query?: ToolSearchParams | null | undefined, options?: RequestOptions): APIPromise<ToolSearchResponse>;
18
- }
19
- export interface ToolSearchResponse {
20
- nextCursor: string | null;
21
- tools: Array<ToolSearchResponse.Tool>;
22
- }
23
- export declare namespace ToolSearchResponse {
24
- interface Tool {
25
- connectionId: string;
26
- serverUrl: string;
27
- tool: Tool.Tool;
28
- score?: number;
29
- }
30
- namespace Tool {
31
- interface Tool {
32
- name: string;
33
- description?: string;
34
- }
35
- }
36
- }
37
- export interface ToolSearchParams {
38
- connectionId?: string;
39
- cursor?: string;
40
- limit?: number;
41
- q?: string;
42
- server?: string;
43
- }
44
- export declare namespace Tools {
45
- export { type ToolSearchResponse as ToolSearchResponse, type ToolSearchParams as ToolSearchParams };
46
- }
47
- //# sourceMappingURL=tools.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tools.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/connect/tools.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,SAAS,EAAE,MAAM,EACjB,KAAK,GAAE,gBAAgB,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kBAAkB,CAAC;CAGlC;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B,KAAK,EAAE,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;CACvC;AAED,yBAAiB,kBAAkB,CAAC;IAClC,UAAiB,IAAI;QACnB,YAAY,EAAE,MAAM,CAAC;QAErB,SAAS,EAAE,MAAM,CAAC;QAElB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;QAEhB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB;IAED,UAAiB,IAAI,CAAC;QACpB,UAAiB,IAAI;YACnB,IAAI,EAAE,MAAM,CAAC;YAEb,WAAW,CAAC,EAAE,MAAM,CAAC;SACtB;KACF;CACF;AAED,MAAM,WAAW,gBAAgB;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,CAAC,CAAC,EAAE,MAAM,CAAC;IAEX,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EAAE,KAAK,kBAAkB,IAAI,kBAAkB,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,CAAC;CACrG"}
@@ -1,47 +0,0 @@
1
- import { APIResource } from "../../../core/resource.js";
2
- import { APIPromise } from "../../../core/api-promise.js";
3
- import { RequestOptions } from "../../../internal/request-options.js";
4
- export declare class Tools extends APIResource {
5
- /**
6
- * Search or list indexed tools across all connections in a namespace. If 'q' query
7
- * parameter is omitted, returns all tools. Filter by connectionId or server URL.
8
- * Metadata constraints from service tokens are applied automatically.
9
- *
10
- * @example
11
- * ```ts
12
- * const response = await client.beta.connect.tools.search(
13
- * 'namespace',
14
- * );
15
- * ```
16
- */
17
- search(namespace: string, query?: ToolSearchParams | null | undefined, options?: RequestOptions): APIPromise<ToolSearchResponse>;
18
- }
19
- export interface ToolSearchResponse {
20
- nextCursor: string | null;
21
- tools: Array<ToolSearchResponse.Tool>;
22
- }
23
- export declare namespace ToolSearchResponse {
24
- interface Tool {
25
- connectionId: string;
26
- serverUrl: string;
27
- tool: Tool.Tool;
28
- score?: number;
29
- }
30
- namespace Tool {
31
- interface Tool {
32
- name: string;
33
- description?: string;
34
- }
35
- }
36
- }
37
- export interface ToolSearchParams {
38
- connectionId?: string;
39
- cursor?: string;
40
- limit?: number;
41
- q?: string;
42
- server?: string;
43
- }
44
- export declare namespace Tools {
45
- export { type ToolSearchResponse as ToolSearchResponse, type ToolSearchParams as ToolSearchParams };
46
- }
47
- //# sourceMappingURL=tools.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/connect/tools.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,SAAS,EAAE,MAAM,EACjB,KAAK,GAAE,gBAAgB,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kBAAkB,CAAC;CAGlC;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B,KAAK,EAAE,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;CACvC;AAED,yBAAiB,kBAAkB,CAAC;IAClC,UAAiB,IAAI;QACnB,YAAY,EAAE,MAAM,CAAC;QAErB,SAAS,EAAE,MAAM,CAAC;QAElB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;QAEhB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB;IAED,UAAiB,IAAI,CAAC;QACpB,UAAiB,IAAI;YACnB,IAAI,EAAE,MAAM,CAAC;YAEb,WAAW,CAAC,EAAE,MAAM,CAAC;SACtB;KACF;CACF;AAED,MAAM,WAAW,gBAAgB;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,CAAC,CAAC,EAAE,MAAM,CAAC;IAEX,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EAAE,KAAK,kBAAkB,IAAI,kBAAkB,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,CAAC;CACrG"}
@@ -1,25 +0,0 @@
1
- "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Tools = void 0;
5
- const resource_1 = require("../../../core/resource.js");
6
- const path_1 = require("../../../internal/utils/path.js");
7
- class Tools extends resource_1.APIResource {
8
- /**
9
- * Search or list indexed tools across all connections in a namespace. If 'q' query
10
- * parameter is omitted, returns all tools. Filter by connectionId or server URL.
11
- * Metadata constraints from service tokens are applied automatically.
12
- *
13
- * @example
14
- * ```ts
15
- * const response = await client.beta.connect.tools.search(
16
- * 'namespace',
17
- * );
18
- * ```
19
- */
20
- search(namespace, query = {}, options) {
21
- return this._client.get((0, path_1.path) `/connect/tools/${namespace}`, { query, ...options });
22
- }
23
- }
24
- exports.Tools = Tools;
25
- //# sourceMappingURL=tools.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../src/resources/beta/connect/tools.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAGrD,0DAAoD;AAEpD,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,SAAiB,EACjB,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,kBAAkB,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;CACF;AApBD,sBAoBC"}
@@ -1,21 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../../../core/resource.mjs";
3
- import { path } from "../../../internal/utils/path.mjs";
4
- export class Tools extends APIResource {
5
- /**
6
- * Search or list indexed tools across all connections in a namespace. If 'q' query
7
- * parameter is omitted, returns all tools. Filter by connectionId or server URL.
8
- * Metadata constraints from service tokens are applied automatically.
9
- *
10
- * @example
11
- * ```ts
12
- * const response = await client.beta.connect.tools.search(
13
- * 'namespace',
14
- * );
15
- * ```
16
- */
17
- search(namespace, query = {}, options) {
18
- return this._client.get(path `/connect/tools/${namespace}`, { query, ...options });
19
- }
20
- }
21
- //# sourceMappingURL=tools.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tools.mjs","sourceRoot":"","sources":["../../../src/resources/beta/connect/tools.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,SAAiB,EACjB,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;CACF"}
@@ -1,70 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
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';
7
-
8
- export class Tools extends APIResource {
9
- /**
10
- * Search or list indexed tools across all connections in a namespace. If 'q' query
11
- * parameter is omitted, returns all tools. Filter by connectionId or server URL.
12
- * Metadata constraints from service tokens are applied automatically.
13
- *
14
- * @example
15
- * ```ts
16
- * const response = await client.beta.connect.tools.search(
17
- * 'namespace',
18
- * );
19
- * ```
20
- */
21
- search(
22
- namespace: string,
23
- query: ToolSearchParams | null | undefined = {},
24
- options?: RequestOptions,
25
- ): APIPromise<ToolSearchResponse> {
26
- return this._client.get(path`/connect/tools/${namespace}`, { query, ...options });
27
- }
28
- }
29
-
30
- export interface ToolSearchResponse {
31
- nextCursor: string | null;
32
-
33
- tools: Array<ToolSearchResponse.Tool>;
34
- }
35
-
36
- export namespace ToolSearchResponse {
37
- export interface Tool {
38
- connectionId: string;
39
-
40
- serverUrl: string;
41
-
42
- tool: Tool.Tool;
43
-
44
- score?: number;
45
- }
46
-
47
- export namespace Tool {
48
- export interface Tool {
49
- name: string;
50
-
51
- description?: string;
52
- }
53
- }
54
- }
55
-
56
- export interface ToolSearchParams {
57
- connectionId?: string;
58
-
59
- cursor?: string;
60
-
61
- limit?: number;
62
-
63
- q?: string;
64
-
65
- server?: string;
66
- }
67
-
68
- export declare namespace Tools {
69
- export { type ToolSearchResponse as ToolSearchResponse, type ToolSearchParams as ToolSearchParams };
70
- }