-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
52 lines (48 loc) · 1.26 KB
/
index.d.ts
File metadata and controls
52 lines (48 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/**
* **Infobip MCP k6 extension**
*
* A k6 extension for making MCP (Model Context Protocol) tool calls
*
* @module infobip_mcp
*/
export as namespace infobip_mcp;
/**
* Configuration for MCP client connection
*/
export interface ClientConfig {
/** MCP server endpoint URL */
endpoint: string;
/** Connection timeout in seconds */
timeout: number;
/** Whether to use Server-Sent Events transport */
isSSE: boolean;
/** Custom HTTP headers to include with requests */
headers?: Record<string, string>;
}
/**
* MCP Client for making tool calls to MCP servers
*/
export declare class MCPClient {
/**
* Close the MCP client connection
*
* @throws Error if connection cannot be closed
*/
CloseConnection(): void;
/**
* Call a tool on the MCP server
*
* @param toolName Name of the tool to call
* @param args Arguments to pass to the tool
* @returns The response from the tool call as a string
* @throws Error if tool call fails or connection issues occur
*/
CallTool(toolName: string, args: Record<string, any>): string;
}
/**
* Create a new MCP client instance
*
* @param config Configuration for the MCP client
* @returns A new MCPClient instance
*/
export declare function NewClient(config: ClientConfig): MCPClient;