@qverisai/sdk 0.1.2 → 0.3.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 +33 -0
- package/LICENSE +1 -1
- package/README.md +129 -216
- package/dist/client.d.ts +116 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +334 -0
- package/dist/client.js.map +1 -0
- package/dist/errors.d.ts +25 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +34 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +14 -20
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -260
- package/dist/index.js.map +1 -1
- package/dist/integrations/ai.d.ts +768 -0
- package/dist/integrations/ai.d.ts.map +1 -0
- package/dist/integrations/ai.js +87 -0
- package/dist/integrations/ai.js.map +1 -0
- package/dist/retry.d.ts +42 -0
- package/dist/retry.d.ts.map +1 -0
- package/dist/retry.js +63 -0
- package/dist/retry.js.map +1 -0
- package/dist/types.d.ts +266 -62
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +3 -2
- package/dist/types.js.map +1 -1
- package/package.json +72 -55
- package/dist/api/client.d.ts +0 -147
- package/dist/api/client.d.ts.map +0 -1
- package/dist/api/client.js +0 -201
- package/dist/api/client.js.map +0 -1
- package/dist/tools/execute.d.ts +0 -89
- package/dist/tools/execute.d.ts.map +0 -1
- package/dist/tools/execute.js +0 -73
- package/dist/tools/execute.js.map +0 -1
- package/dist/tools/get-by-ids.d.ts +0 -69
- package/dist/tools/get-by-ids.d.ts.map +0 -1
- package/dist/tools/get-by-ids.js +0 -55
- package/dist/tools/get-by-ids.js.map +0 -1
- package/dist/tools/search.d.ts +0 -71
- package/dist/tools/search.d.ts.map +0 -1
- package/dist/tools/search.js +0 -53
- package/dist/tools/search.js.map +0 -1
package/dist/tools/execute.js
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* execute_tool MCP Tool Implementation
|
|
3
|
-
*
|
|
4
|
-
* Executes a specific remote tool with provided parameters.
|
|
5
|
-
* The tool_id must come from a previous search_tools call.
|
|
6
|
-
*
|
|
7
|
-
* @module tools/execute
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* JSON Schema for the execute_tool tool input.
|
|
11
|
-
* Used by MCP to validate and document the tool parameters.
|
|
12
|
-
*/
|
|
13
|
-
export const executeToolSchema = {
|
|
14
|
-
type: 'object',
|
|
15
|
-
properties: {
|
|
16
|
-
tool_id: {
|
|
17
|
-
type: 'string',
|
|
18
|
-
description: 'The ID of the remote tool to execute. Must come from a previous search_tools call.',
|
|
19
|
-
},
|
|
20
|
-
search_id: {
|
|
21
|
-
type: 'string',
|
|
22
|
-
description: 'The search_id from the search_tools response that returned this tool. ' +
|
|
23
|
-
'Required for linking execution to the original search.',
|
|
24
|
-
},
|
|
25
|
-
params_to_tool: {
|
|
26
|
-
type: 'string',
|
|
27
|
-
description: 'A JSON stringified dictionary of parameters to pass to the remote tool. ' +
|
|
28
|
-
'Keys are param names and values can be of any type. ' +
|
|
29
|
-
'Example: \'{"city": "London", "units": "metric"}\'',
|
|
30
|
-
},
|
|
31
|
-
session_id: {
|
|
32
|
-
type: 'string',
|
|
33
|
-
description: 'Session identifier for tracking user sessions. ' +
|
|
34
|
-
'If not provided, an auto-generated session ID will be used.',
|
|
35
|
-
},
|
|
36
|
-
max_response_size: {
|
|
37
|
-
type: 'number',
|
|
38
|
-
description: 'Maximum size of response data in bytes. ' +
|
|
39
|
-
'If tool generates data longer than this, it will be truncated and a download URL provided. ' +
|
|
40
|
-
'Use -1 for no limit. Default is 20480 (20KB).',
|
|
41
|
-
default: 20480,
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
required: ['tool_id', 'search_id', 'params_to_tool'],
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* Executes the execute_tool operation.
|
|
48
|
-
*
|
|
49
|
-
* @param client - Initialized Qveris API client
|
|
50
|
-
* @param input - Execution parameters
|
|
51
|
-
* @param defaultSessionId - Fallback session ID if not provided in input
|
|
52
|
-
* @returns Execution result from the tool
|
|
53
|
-
* @throws {Error} If params_to_tool is not valid JSON
|
|
54
|
-
*/
|
|
55
|
-
export async function executeExecuteTool(client, input, defaultSessionId) {
|
|
56
|
-
// Parse the JSON parameters
|
|
57
|
-
let parameters;
|
|
58
|
-
try {
|
|
59
|
-
parameters = JSON.parse(input.params_to_tool);
|
|
60
|
-
}
|
|
61
|
-
catch (error) {
|
|
62
|
-
throw new Error(`Invalid JSON in params_to_tool: ${error instanceof Error ? error.message : 'Unknown parse error'}. ` +
|
|
63
|
-
`Received: ${input.params_to_tool}`);
|
|
64
|
-
}
|
|
65
|
-
const response = await client.executeTool(input.tool_id, {
|
|
66
|
-
search_id: input.search_id,
|
|
67
|
-
session_id: input.session_id ?? defaultSessionId,
|
|
68
|
-
parameters,
|
|
69
|
-
max_response_size: input.max_response_size,
|
|
70
|
-
});
|
|
71
|
-
return response;
|
|
72
|
-
}
|
|
73
|
-
//# sourceMappingURL=execute.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../src/tools/execute.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA+CH;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,IAAI,EAAE,QAAiB;IACvB,UAAU,EAAE;QACV,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,oFAAoF;SACvF;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,wEAAwE;gBACxE,wDAAwD;SAC3D;QACD,cAAc,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,0EAA0E;gBAC1E,sDAAsD;gBACtD,oDAAoD;SACvD;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,iDAAiD;gBACjD,6DAA6D;SAChE;QACD,iBAAiB,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,0CAA0C;gBAC1C,6FAA6F;gBAC7F,+CAA+C;YACjD,OAAO,EAAE,KAAK;SACf;KACF;IACD,QAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,gBAAgB,CAAC;CACrD,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,MAAoB,EACpB,KAAuB,EACvB,gBAAwB;IAExB,4BAA4B;IAC5B,IAAI,UAAmC,CAAC;IACxC,IAAI,CAAC;QACH,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,cAAc,CAA4B,CAAC;IAC3E,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CACb,mCAAmC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,qBAAqB,IAAI;YACrG,aAAa,KAAK,CAAC,cAAc,EAAE,CACpC,CAAC;IACJ,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,EAAE;QACvD,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,UAAU,EAAE,KAAK,CAAC,UAAU,IAAI,gBAAgB;QAChD,UAAU;QACV,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;KAC3C,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* get_tools_by_ids MCP Tool Implementation
|
|
3
|
-
*
|
|
4
|
-
* Retrieves tool descriptions based on tool IDs.
|
|
5
|
-
* Useful for getting detailed information about specific tools
|
|
6
|
-
* when you already know their tool_ids.
|
|
7
|
-
*
|
|
8
|
-
* @module tools/get-by-ids
|
|
9
|
-
*/
|
|
10
|
-
import type { QverisClient } from '../api/client.js';
|
|
11
|
-
import type { SearchResponse } from '../types.js';
|
|
12
|
-
/**
|
|
13
|
-
* Input parameters for the get_tools_by_ids tool.
|
|
14
|
-
*/
|
|
15
|
-
export interface GetToolsByIdsInput {
|
|
16
|
-
/**
|
|
17
|
-
* Array of tool IDs to retrieve information for.
|
|
18
|
-
* Must be obtained from previous search_tools results.
|
|
19
|
-
*
|
|
20
|
-
* @example ["weather-tool-1", "email-tool-2"]
|
|
21
|
-
*/
|
|
22
|
-
tool_ids: string[];
|
|
23
|
-
/**
|
|
24
|
-
* The search_id from the search_tools response that returned the tool(s).
|
|
25
|
-
* Optional but recommended for analytics and billing.
|
|
26
|
-
*/
|
|
27
|
-
search_id?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Session identifier for tracking user sessions.
|
|
30
|
-
* If not provided, the server will use an auto-generated session ID.
|
|
31
|
-
*/
|
|
32
|
-
session_id?: string;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* JSON Schema for the get_tools_by_ids tool input.
|
|
36
|
-
* Used by MCP to validate and document the tool parameters.
|
|
37
|
-
*/
|
|
38
|
-
export declare const getToolsByIdsSchema: {
|
|
39
|
-
type: "object";
|
|
40
|
-
properties: {
|
|
41
|
-
tool_ids: {
|
|
42
|
-
type: string;
|
|
43
|
-
items: {
|
|
44
|
-
type: string;
|
|
45
|
-
};
|
|
46
|
-
description: string;
|
|
47
|
-
minItems: number;
|
|
48
|
-
};
|
|
49
|
-
search_id: {
|
|
50
|
-
type: string;
|
|
51
|
-
description: string;
|
|
52
|
-
};
|
|
53
|
-
session_id: {
|
|
54
|
-
type: string;
|
|
55
|
-
description: string;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
required: string[];
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* Executes the get_tools_by_ids operation.
|
|
62
|
-
*
|
|
63
|
-
* @param client - Initialized Qveris API client
|
|
64
|
-
* @param input - Request parameters with tool IDs
|
|
65
|
-
* @param defaultSessionId - Fallback session ID if not provided in input
|
|
66
|
-
* @returns Tool information for the requested IDs
|
|
67
|
-
*/
|
|
68
|
-
export declare function executeGetToolsByIds(client: QverisClient, input: GetToolsByIdsInput, defaultSessionId: string): Promise<SearchResponse>;
|
|
69
|
-
//# sourceMappingURL=get-by-ids.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-by-ids.d.ts","sourceRoot":"","sources":["../../src/tools/get-by-ids.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;IAEnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;CA2B/B,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,kBAAkB,EACzB,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC,cAAc,CAAC,CAQzB"}
|
package/dist/tools/get-by-ids.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* get_tools_by_ids MCP Tool Implementation
|
|
3
|
-
*
|
|
4
|
-
* Retrieves tool descriptions based on tool IDs.
|
|
5
|
-
* Useful for getting detailed information about specific tools
|
|
6
|
-
* when you already know their tool_ids.
|
|
7
|
-
*
|
|
8
|
-
* @module tools/get-by-ids
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* JSON Schema for the get_tools_by_ids tool input.
|
|
12
|
-
* Used by MCP to validate and document the tool parameters.
|
|
13
|
-
*/
|
|
14
|
-
export const getToolsByIdsSchema = {
|
|
15
|
-
type: 'object',
|
|
16
|
-
properties: {
|
|
17
|
-
tool_ids: {
|
|
18
|
-
type: 'array',
|
|
19
|
-
items: {
|
|
20
|
-
type: 'string',
|
|
21
|
-
},
|
|
22
|
-
description: 'Array of tool IDs to retrieve information for. ' +
|
|
23
|
-
'These IDs should come from previous search_tools results.',
|
|
24
|
-
minItems: 1,
|
|
25
|
-
},
|
|
26
|
-
search_id: {
|
|
27
|
-
type: 'string',
|
|
28
|
-
description: 'The search_id from the search_tools response that returned the tool(s). ' +
|
|
29
|
-
'Optional but recommended for linking to the original search.',
|
|
30
|
-
},
|
|
31
|
-
session_id: {
|
|
32
|
-
type: 'string',
|
|
33
|
-
description: 'Session identifier for tracking user sessions. ' +
|
|
34
|
-
'If not provided, an auto-generated session ID will be used.',
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
required: ['tool_ids'],
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* Executes the get_tools_by_ids operation.
|
|
41
|
-
*
|
|
42
|
-
* @param client - Initialized Qveris API client
|
|
43
|
-
* @param input - Request parameters with tool IDs
|
|
44
|
-
* @param defaultSessionId - Fallback session ID if not provided in input
|
|
45
|
-
* @returns Tool information for the requested IDs
|
|
46
|
-
*/
|
|
47
|
-
export async function executeGetToolsByIds(client, input, defaultSessionId) {
|
|
48
|
-
const response = await client.getToolsByIds({
|
|
49
|
-
tool_ids: input.tool_ids,
|
|
50
|
-
search_id: input.search_id,
|
|
51
|
-
session_id: input.session_id ?? defaultSessionId,
|
|
52
|
-
});
|
|
53
|
-
return response;
|
|
54
|
-
}
|
|
55
|
-
//# sourceMappingURL=get-by-ids.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-by-ids.js","sourceRoot":"","sources":["../../src/tools/get-by-ids.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA8BH;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,QAAiB;IACvB,UAAU,EAAE;QACV,QAAQ,EAAE;YACR,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;aACf;YACD,WAAW,EACT,iDAAiD;gBACjD,2DAA2D;YAC7D,QAAQ,EAAE,CAAC;SACZ;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,0EAA0E;gBAC1E,8DAA8D;SACjE;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,iDAAiD;gBACjD,6DAA6D;SAChE;KACF;IACD,QAAQ,EAAE,CAAC,UAAU,CAAC;CACvB,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,MAAoB,EACpB,KAAyB,EACzB,gBAAwB;IAExB,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC;QAC1C,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,UAAU,EAAE,KAAK,CAAC,UAAU,IAAI,gBAAgB;KACjD,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/dist/tools/search.d.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* search_tools MCP Tool Implementation
|
|
3
|
-
*
|
|
4
|
-
* Searches for available tools based on natural language queries.
|
|
5
|
-
* Returns relevant tools that can help accomplish tasks.
|
|
6
|
-
*
|
|
7
|
-
* @module tools/search
|
|
8
|
-
*/
|
|
9
|
-
import type { QverisClient } from '../api/client.js';
|
|
10
|
-
import type { SearchResponse } from '../types.js';
|
|
11
|
-
/**
|
|
12
|
-
* Input parameters for the search_tools tool.
|
|
13
|
-
*/
|
|
14
|
-
export interface SearchToolsInput {
|
|
15
|
-
/**
|
|
16
|
-
* The search query describing the general capability of the tool.
|
|
17
|
-
* Should describe what you want to accomplish, not specific parameters.
|
|
18
|
-
*
|
|
19
|
-
* @example "weather forecast API"
|
|
20
|
-
* @example "send email notification"
|
|
21
|
-
* @example "stock price lookup"
|
|
22
|
-
*/
|
|
23
|
-
query: string;
|
|
24
|
-
/**
|
|
25
|
-
* Maximum number of results to return.
|
|
26
|
-
* @default 20
|
|
27
|
-
* @minimum 1
|
|
28
|
-
* @maximum 100
|
|
29
|
-
*/
|
|
30
|
-
limit?: number;
|
|
31
|
-
/**
|
|
32
|
-
* Session identifier for tracking user sessions.
|
|
33
|
-
* If not provided, the server will use an auto-generated session ID.
|
|
34
|
-
*/
|
|
35
|
-
session_id?: string;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* JSON Schema for the search_tools tool input.
|
|
39
|
-
* Used by MCP to validate and document the tool parameters.
|
|
40
|
-
*/
|
|
41
|
-
export declare const searchToolsSchema: {
|
|
42
|
-
type: "object";
|
|
43
|
-
properties: {
|
|
44
|
-
query: {
|
|
45
|
-
type: string;
|
|
46
|
-
description: string;
|
|
47
|
-
};
|
|
48
|
-
limit: {
|
|
49
|
-
type: string;
|
|
50
|
-
description: string;
|
|
51
|
-
default: number;
|
|
52
|
-
minimum: number;
|
|
53
|
-
maximum: number;
|
|
54
|
-
};
|
|
55
|
-
session_id: {
|
|
56
|
-
type: string;
|
|
57
|
-
description: string;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
required: string[];
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* Executes the search_tools operation.
|
|
64
|
-
*
|
|
65
|
-
* @param client - Initialized Qveris API client
|
|
66
|
-
* @param input - Search parameters
|
|
67
|
-
* @param defaultSessionId - Fallback session ID if not provided in input
|
|
68
|
-
* @returns Search results with matching tools
|
|
69
|
-
*/
|
|
70
|
-
export declare function executeSearchTools(client: QverisClient, input: SearchToolsInput, defaultSessionId: string): Promise<SearchResponse>;
|
|
71
|
-
//# sourceMappingURL=search.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/tools/search.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;OAOG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;CAyB7B,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,gBAAgB,EACvB,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC,cAAc,CAAC,CAQzB"}
|
package/dist/tools/search.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* search_tools MCP Tool Implementation
|
|
3
|
-
*
|
|
4
|
-
* Searches for available tools based on natural language queries.
|
|
5
|
-
* Returns relevant tools that can help accomplish tasks.
|
|
6
|
-
*
|
|
7
|
-
* @module tools/search
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* JSON Schema for the search_tools tool input.
|
|
11
|
-
* Used by MCP to validate and document the tool parameters.
|
|
12
|
-
*/
|
|
13
|
-
export const searchToolsSchema = {
|
|
14
|
-
type: 'object',
|
|
15
|
-
properties: {
|
|
16
|
-
query: {
|
|
17
|
-
type: 'string',
|
|
18
|
-
description: 'The search query describing the general capability of the tool. ' +
|
|
19
|
-
'Describe what you want to accomplish, not specific params you want to pass to the tool later. ' +
|
|
20
|
-
'Example: "weather forecast API", "send email", "stock prices"',
|
|
21
|
-
},
|
|
22
|
-
limit: {
|
|
23
|
-
type: 'number',
|
|
24
|
-
description: 'Maximum number of results to return (1-100)',
|
|
25
|
-
default: 20,
|
|
26
|
-
minimum: 1,
|
|
27
|
-
maximum: 100,
|
|
28
|
-
},
|
|
29
|
-
session_id: {
|
|
30
|
-
type: 'string',
|
|
31
|
-
description: 'Session identifier for tracking user sessions. ' +
|
|
32
|
-
'If not provided, an auto-generated session ID will be used.',
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
required: ['query'],
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* Executes the search_tools operation.
|
|
39
|
-
*
|
|
40
|
-
* @param client - Initialized Qveris API client
|
|
41
|
-
* @param input - Search parameters
|
|
42
|
-
* @param defaultSessionId - Fallback session ID if not provided in input
|
|
43
|
-
* @returns Search results with matching tools
|
|
44
|
-
*/
|
|
45
|
-
export async function executeSearchTools(client, input, defaultSessionId) {
|
|
46
|
-
const response = await client.searchTools({
|
|
47
|
-
query: input.query,
|
|
48
|
-
limit: input.limit ?? 20,
|
|
49
|
-
session_id: input.session_id ?? defaultSessionId,
|
|
50
|
-
});
|
|
51
|
-
return response;
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=search.js.map
|
package/dist/tools/search.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/tools/search.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAkCH;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,IAAI,EAAE,QAAiB;IACvB,UAAU,EAAE;QACV,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,kEAAkE;gBAClE,gGAAgG;gBAChG,+DAA+D;SAClE;QACD,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,6CAA6C;YAC1D,OAAO,EAAE,EAAE;YACX,OAAO,EAAE,CAAC;YACV,OAAO,EAAE,GAAG;SACb;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,iDAAiD;gBACjD,6DAA6D;SAChE;KACF;IACD,QAAQ,EAAE,CAAC,OAAO,CAAC;CACpB,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,MAAoB,EACpB,KAAuB,EACvB,gBAAwB;IAExB,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC;QACxC,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,EAAE;QACxB,UAAU,EAAE,KAAK,CAAC,UAAU,IAAI,gBAAgB;KACjD,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|