@deepset-ai/n8n-nodes-haystack-enterprise-mcp 0.0.0-stage → 0.1.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.
@@ -0,0 +1,370 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HaystackEnterpriseMcp = void 0;
4
+ const tools_1 = require("@langchain/core/tools");
5
+ const n8n_core_1 = require("n8n-core");
6
+ const n8n_workflow_1 = require("n8n-workflow");
7
+ const zod_1 = require("zod");
8
+ const utils_1 = require("./utils");
9
+ const SELF_HOSTED_ONLY_MESSAGE = 'The Haystack Enterprise MCP node is only available on self-hosted n8n instances.';
10
+ function assertSelfHosted(node) {
11
+ if (process.env.N8N_DEPLOYMENT_TYPE === 'cloud') {
12
+ throw new n8n_workflow_1.NodeOperationError(node, SELF_HOSTED_ONLY_MESSAGE);
13
+ }
14
+ }
15
+ async function connectAndListFilteredTools(ctx, itemIndex) {
16
+ const signal = ctx.getExecutionCancelSignal();
17
+ if (signal?.aborted) {
18
+ throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), 'Execution was cancelled', { itemIndex });
19
+ }
20
+ const workspaceId = ctx.getNodeParameter('workspaceId', itemIndex);
21
+ const auth = await (0, utils_1.resolveMcpAuth)(ctx, itemIndex);
22
+ const timeout = ctx.getNodeParameter('options.timeout', itemIndex, 60000);
23
+ if (!workspaceId || !auth.token) {
24
+ throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), 'A workspace and a valid credential (API key or OAuth2) are required. Select a workspace above and make sure the Haystack Enterprise credential is set up correctly.', { itemIndex });
25
+ }
26
+ const { client, transport, mcpUrl } = (0, utils_1.createMcpTransport)(workspaceId, auth, signal);
27
+ try {
28
+ await client.connect(transport);
29
+ }
30
+ catch (error) {
31
+ throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), (0, utils_1.describeTransportErrorHint)(error) ||
32
+ `Failed to connect to the Haystack Enterprise Platform MCP server at ${mcpUrl}: ${error.message}`, { itemIndex });
33
+ }
34
+ let mcpTools;
35
+ try {
36
+ mcpTools = await (0, utils_1.listAllMcpTools)(client, { signal });
37
+ }
38
+ catch (error) {
39
+ await client.close();
40
+ throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), (0, utils_1.describeTransportErrorHint)(error) ||
41
+ `Failed to list tools from the Haystack Enterprise Platform MCP server: ${error.message}`, { itemIndex });
42
+ }
43
+ if (mcpTools.length === 0) {
44
+ await client.close();
45
+ throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), 'No MCP tools found. Enable at least one pipeline as a tool in Haystack Enterprise Platform under Settings → Workspace → MCP.', { itemIndex });
46
+ }
47
+ const includeMode = ctx.getNodeParameter('include', itemIndex, 'all');
48
+ const includeTools = ctx.getNodeParameter('includeTools', itemIndex, []);
49
+ const excludeTools = ctx.getNodeParameter('excludeTools', itemIndex, []);
50
+ const filteredTools = (0, utils_1.getSelectedTools)({
51
+ mode: includeMode,
52
+ includeTools,
53
+ excludeTools,
54
+ tools: mcpTools,
55
+ });
56
+ if (filteredTools.length === 0) {
57
+ await client.close();
58
+ const message = includeMode === 'except'
59
+ ? 'All available tools were excluded by the "Tools to Exclude" selection. Remove some exclusions, or choose "All" to expose every tool to the AI Agent.'
60
+ : 'None of the selected tools are currently available from the MCP server. Adjust the "Tools to Include" selection, or choose "All" to use all available tools.';
61
+ throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), message, { itemIndex });
62
+ }
63
+ if (includeMode === 'selected' && includeTools.length > 0) {
64
+ const availableToolNames = new Set(mcpTools.map((t) => t.name));
65
+ const missingSelectedTools = includeTools.filter((name) => !availableToolNames.has(name));
66
+ if (missingSelectedTools.length > 0) {
67
+ ctx.addExecutionHints({
68
+ message: `These selected tools are no longer available from the Haystack Enterprise Platform MCP server and were skipped: ${missingSelectedTools.join(', ')}. Refresh the "Tools to Include" list to update the selection.`,
69
+ type: 'warning',
70
+ location: 'outputPane',
71
+ });
72
+ }
73
+ }
74
+ return { client, mcpTools, filteredTools, timeout, signal };
75
+ }
76
+ class HaystackEnterpriseMcp {
77
+ description = {
78
+ displayName: 'Haystack Enterprise MCP',
79
+ name: 'haystackEnterpriseMcp',
80
+ icon: 'file:haystack-enterprise-electric-blue.svg',
81
+ group: ['transform'],
82
+ version: 1,
83
+ description: "Connects to a Haystack Enterprise Platform workspace's MCP server and exposes your enabled pipelines as tools for an AI Agent. Self-hosted n8n only.",
84
+ subtitle: '={{$parameter["workspaceId"]}}',
85
+ defaults: {
86
+ name: 'Haystack Enterprise MCP',
87
+ },
88
+ codex: {
89
+ categories: ['AI'],
90
+ subcategories: {
91
+ AI: ['Tools'],
92
+ },
93
+ resources: {
94
+ primaryDocumentation: [
95
+ {
96
+ url: 'https://docs.cloud.deepset.ai/docs/use-pipeline-as-mcp-tool',
97
+ },
98
+ ],
99
+ },
100
+ },
101
+ inputs: [],
102
+ outputs: [n8n_workflow_1.NodeConnectionTypes.AiTool],
103
+ outputNames: ['Tool'],
104
+ credentials: [
105
+ {
106
+ name: 'haystackEnterpriseApi',
107
+ required: true,
108
+ displayOptions: { show: { authentication: ['apiKey'] } },
109
+ },
110
+ {
111
+ name: 'haystackEnterpriseOAuth2Api',
112
+ required: true,
113
+ displayOptions: { show: { authentication: ['oAuth2'] } },
114
+ },
115
+ ],
116
+ properties: [
117
+ {
118
+ displayName: 'This node is only available on self-hosted n8n instances. It does not work on n8n Cloud.',
119
+ name: 'selfHostedNotice',
120
+ type: 'notice',
121
+ default: '',
122
+ },
123
+ {
124
+ displayName: 'Authentication',
125
+ name: 'authentication',
126
+ type: 'options',
127
+ noDataExpression: true,
128
+ options: [
129
+ {
130
+ name: 'API Key',
131
+ value: 'apiKey',
132
+ description: 'Authenticate with a Haystack Enterprise API key',
133
+ },
134
+ {
135
+ name: 'OAuth2',
136
+ value: 'oAuth2',
137
+ description: 'Sign in with your Haystack Enterprise user account',
138
+ },
139
+ ],
140
+ default: 'apiKey',
141
+ },
142
+ {
143
+ displayName: 'Make sure you have created an MCP server and enabled at least one pipeline as a tool in Haystack Enterprise Platform under Settings → Workspace → MCP. See the <a href="https://docs.cloud.deepset.ai/docs/use-pipeline-as-mcp-tool/" target="_blank" rel="noopener noreferrer">docs on using a pipeline as an MCP tool</a>.',
144
+ name: 'mcpServerNotice',
145
+ type: 'notice',
146
+ default: '',
147
+ },
148
+ {
149
+ displayName: 'Workspace Name or ID',
150
+ name: 'workspaceId',
151
+ type: 'options',
152
+ typeOptions: {
153
+ loadOptionsMethod: 'getWorkspaces',
154
+ loadOptionsDependsOn: ['authentication'],
155
+ },
156
+ default: '',
157
+ required: true,
158
+ description: 'Select your <a href="https://docs.cloud.deepset.ai/docs/basic-concepts#workspace" target="_blank" rel="noopener noreferrer">workspace</a>, populated from your Haystack Enterprise Platform account. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
159
+ },
160
+ {
161
+ displayName: 'Tools to Include',
162
+ name: 'include',
163
+ type: 'options',
164
+ default: 'all',
165
+ description: 'How to select the <a href="https://docs.cloud.deepset.ai/docs/use-pipeline-as-mcp-tool/" target="_blank" rel="noopener noreferrer">tools</a> you want to be exposed to the AI Agent',
166
+ options: [
167
+ {
168
+ name: 'All',
169
+ value: 'all',
170
+ description: 'Expose every tool from the Haystack Enterprise Platform MCP server',
171
+ },
172
+ {
173
+ name: 'All Except',
174
+ value: 'except',
175
+ description: 'Expose all tools except those listed in "Tools to Exclude"',
176
+ },
177
+ {
178
+ name: 'Selected',
179
+ value: 'selected',
180
+ description: 'Only expose the tools listed in "Tools to Include"',
181
+ },
182
+ ],
183
+ },
184
+ {
185
+ displayName: 'Tools to Include',
186
+ name: 'includeTools',
187
+ type: 'multiOptions',
188
+ typeOptions: {
189
+ loadOptionsMethod: 'getAvailableMcpTools',
190
+ loadOptionsDependsOn: ['authentication', 'workspaceId'],
191
+ },
192
+ default: [],
193
+ description: 'The <a href="https://docs.cloud.deepset.ai/docs/use-pipeline-as-mcp-tool/" target="_blank" rel="noopener noreferrer">tools</a> currently available from your Haystack Enterprise Platform MCP server. Click the refresh icon to load the list. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
194
+ displayOptions: { show: { include: ['selected'] } },
195
+ },
196
+ {
197
+ displayName: 'Tools to Exclude',
198
+ name: 'excludeTools',
199
+ type: 'multiOptions',
200
+ typeOptions: {
201
+ loadOptionsMethod: 'getAvailableMcpTools',
202
+ loadOptionsDependsOn: ['authentication', 'workspaceId'],
203
+ },
204
+ default: [],
205
+ description: 'The <a href="https://docs.cloud.deepset.ai/docs/use-pipeline-as-mcp-tool/" target="_blank" rel="noopener noreferrer">tools</a> currently available from your Haystack Enterprise Platform MCP server. Click the refresh icon to load the list. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
206
+ displayOptions: { show: { include: ['except'] } },
207
+ },
208
+ {
209
+ displayName: 'Options',
210
+ name: 'options',
211
+ placeholder: 'Add Option',
212
+ description: 'Additional options to add',
213
+ type: 'collection',
214
+ default: {},
215
+ options: [
216
+ {
217
+ displayName: 'Timeout',
218
+ name: 'timeout',
219
+ type: 'number',
220
+ typeOptions: { minValue: 1 },
221
+ default: 60000,
222
+ description: 'Time in ms to wait for a pipeline call to finish',
223
+ },
224
+ ],
225
+ },
226
+ ],
227
+ };
228
+ methods = {
229
+ loadOptions: {
230
+ async getWorkspaces() {
231
+ return (0, utils_1.loadWorkspaceOptions)(this);
232
+ },
233
+ async getAvailableMcpTools() {
234
+ assertSelfHosted(this.getNode());
235
+ const workspaceId = this.getNodeParameter('workspaceId');
236
+ if (!workspaceId) {
237
+ return [];
238
+ }
239
+ return (0, utils_1.loadMcpToolOptions)(this, workspaceId, await (0, utils_1.resolveMcpAuth)(this, 0));
240
+ },
241
+ },
242
+ };
243
+ async supplyData(itemIndex) {
244
+ assertSelfHosted(this.getNode());
245
+ const { client, filteredTools, timeout, signal } = await connectAndListFilteredTools(this, itemIndex);
246
+ const toolsMissingDescription = filteredTools.filter((t) => !t.description).map((t) => t.name);
247
+ if (toolsMissingDescription.length > 0) {
248
+ this.addExecutionHints({
249
+ message: `These tools have no description set in Haystack Enterprise Platform, so the AI agent only sees their name, which can make it pick the wrong tool: ${toolsMissingDescription.join(', ')}. Add a description under Settings → Workspace → MCP.`,
250
+ type: 'info',
251
+ location: 'outputPane',
252
+ });
253
+ }
254
+ const tools = filteredTools.map((mcpTool) => {
255
+ const tool = new tools_1.DynamicStructuredTool({
256
+ name: (0, utils_1.buildMcpToolName)(this.getNode().name, mcpTool.name),
257
+ description: mcpTool.description ?? mcpTool.name,
258
+ schema: zod_1.z.object({}),
259
+ func: async (input) => {
260
+ const { index: runIndex } = this.addInputData(n8n_workflow_1.NodeConnectionTypes.AiTool, [
261
+ [{ json: { tool: mcpTool.name, input: input } }],
262
+ ]);
263
+ let output;
264
+ try {
265
+ const result = await client.callTool({
266
+ name: mcpTool.name,
267
+ arguments: input,
268
+ }, undefined, { timeout, signal });
269
+ if (result.isError) {
270
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), (0, utils_1.contentToString)(result.content) ||
271
+ 'The pipeline reported an error with no message.', { itemIndex });
272
+ }
273
+ output = [
274
+ (0, utils_1.contentToString)(result.content),
275
+ (0, utils_1.isStructuredContent)(result.structuredContent)
276
+ ? JSON.stringify(result.structuredContent)
277
+ : '',
278
+ ]
279
+ .filter(Boolean)
280
+ .join('\n');
281
+ }
282
+ catch (err) {
283
+ const hint = (0, utils_1.describeToolCallErrorHint)(err);
284
+ const error = new n8n_workflow_1.NodeOperationError(this.getNode(), `Haystack Enterprise Platform tool "${mcpTool.name}" failed: ${err.message}${hint ? ` — ${hint}` : ''}`, { itemIndex });
285
+ this.addOutputData(n8n_workflow_1.NodeConnectionTypes.AiTool, runIndex, error);
286
+ throw error;
287
+ }
288
+ this.addOutputData(n8n_workflow_1.NodeConnectionTypes.AiTool, runIndex, [
289
+ [{ json: { tool: mcpTool.name, response: output } }],
290
+ ]);
291
+ this.logAiEvent('ai-tool-called', `Called Haystack Enterprise Platform tool "${mcpTool.name}"`);
292
+ return output;
293
+ },
294
+ });
295
+ tool.schema = (0, utils_1.normalizeMcpInputSchema)(mcpTool.inputSchema);
296
+ return tool;
297
+ });
298
+ return {
299
+ response: new n8n_core_1.StructuredToolkit(tools),
300
+ closeFunction: async () => {
301
+ await client.close();
302
+ },
303
+ };
304
+ }
305
+ async execute() {
306
+ assertSelfHosted(this.getNode());
307
+ const items = this.getInputData();
308
+ const returnData = [];
309
+ for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
310
+ const item = items[itemIndex];
311
+ let client;
312
+ try {
313
+ const toolName = item.json.tool;
314
+ if (typeof toolName !== 'string' || !toolName) {
315
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Each input item must have a "tool" field naming which Haystack Enterprise Platform pipeline to call. Every other field on the item becomes that pipeline\'s arguments.', { itemIndex });
316
+ }
317
+ const connected = await connectAndListFilteredTools(this, itemIndex);
318
+ client = connected.client;
319
+ const { filteredTools, timeout, signal } = connected;
320
+ const mcpTool = filteredTools.find((t) => t.name === toolName || (0, utils_1.buildMcpToolName)(this.getNode().name, t.name) === toolName);
321
+ if (!mcpTool) {
322
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Tool "${toolName}" is not one of the tools currently exposed by this node (the "Tools to Include"/"Tools to Exclude" selection applies here too). Available: ${filteredTools.map((t) => t.name).join(', ')}.`, { itemIndex });
323
+ }
324
+ const toolArguments = { ...item.json };
325
+ delete toolArguments.tool;
326
+ let result;
327
+ try {
328
+ result = await client.callTool({ name: mcpTool.name, arguments: toolArguments }, undefined, { timeout, signal });
329
+ if (result.isError) {
330
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), (0, utils_1.contentToString)(result.content) || 'The pipeline reported an error with no message.', { itemIndex });
331
+ }
332
+ }
333
+ catch (err) {
334
+ const hint = (0, utils_1.describeToolCallErrorHint)(err);
335
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Haystack Enterprise Platform tool "${mcpTool.name}" failed: ${err.message}${hint ? ` — ${hint}` : ''}`, { itemIndex });
336
+ }
337
+ returnData.push({
338
+ json: {
339
+ tool: mcpTool.name,
340
+ response: (0, utils_1.contentToString)(result.content),
341
+ ...((0, utils_1.isStructuredContent)(result.structuredContent)
342
+ ? { structuredContent: result.structuredContent }
343
+ : {}),
344
+ },
345
+ pairedItem: { item: itemIndex },
346
+ });
347
+ }
348
+ catch (error) {
349
+ if (this.continueOnFail()) {
350
+ returnData.push({
351
+ json: { error: error.message },
352
+ pairedItem: { item: itemIndex },
353
+ });
354
+ continue;
355
+ }
356
+ throw error instanceof n8n_workflow_1.NodeOperationError
357
+ ? error
358
+ : new n8n_workflow_1.NodeOperationError(this.getNode(), error, { itemIndex });
359
+ }
360
+ finally {
361
+ if (client) {
362
+ await client.close();
363
+ }
364
+ }
365
+ }
366
+ return [returnData];
367
+ }
368
+ }
369
+ exports.HaystackEnterpriseMcp = HaystackEnterpriseMcp;
370
+ //# sourceMappingURL=HaystackEnterpriseMcp.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HaystackEnterpriseMcp.node.js","sourceRoot":"","sources":["../../../nodes/HaystackEnterpriseMcp/HaystackEnterpriseMcp.node.ts"],"names":[],"mappings":";;;AAeA,iDAA8D;AAC9D,uCAA6C;AAC7C,+CAAuE;AACvE,6BAAwB;AAExB,mCAaiB;AAEjB,MAAM,wBAAwB,GAC7B,kFAAkF,CAAC;AAEpF,SAAS,gBAAgB,CAAC,IAAW;IACpC,IAAI,OAAO,CAAC,GAAG,CAAC,mBAAmB,KAAK,OAAO,EAAE,CAAC;QACjD,MAAM,IAAI,iCAAkB,CAAC,IAAI,EAAE,wBAAwB,CAAC,CAAC;IAC9D,CAAC;AACF,CAAC;AAKD,KAAK,UAAU,2BAA2B,CACzC,GAA6C,EAC7C,SAAiB;IAQjB,MAAM,MAAM,GAAG,GAAG,CAAC,wBAAwB,EAAE,CAAC;IAC9C,IAAI,MAAM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AAO,CAAC;wBACzC,GAAG,CAAC,IAAA,2BAAmB,EAAC,MAAM,CAAC,iBAAiB,CAAC;4BAChD,CAAC,CAAC,EAAE,iBAAiB,EAAE,MAAM,CAAC,iBAAiB,EAAE;4BACjD,CAAC,CAAC,EAAE,CAAC;qBACN;oBACD,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;iBAC/B,CAAC,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBAC3B,UAAU,CAAC,IAAI,CAAC;wBACf,IAAI,EAAE,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE;wBACzC,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;qBAC/B,CAAC,CAAC;oBACH,SAAS;gBACV,CAAC;gBACD,MAAM,KAAK,YAAY,iCAAkB;oBACxC,CAAC,CAAC,KAAK;oBACP,CAAC,CAAC,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAc,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;YAC1E,CAAC;oBAAS,CAAC;gBACV,IAAI,MAAM,EAAE,CAAC;oBACZ,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;gBACtB,CAAC;YACF,CAAC;QACF,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AAtXD,sDAsXC"}
@@ -0,0 +1,21 @@
1
+ {
2
+ "node": "@deepset-ai/n8n-nodes-haystack-enterprise-mcp",
3
+ "nodeVersion": "1.0",
4
+ "codexVersion": "1.0",
5
+ "categories": ["Development"],
6
+ "subcategories": {
7
+ "AI": ["Tools"]
8
+ },
9
+ "resources": {
10
+ "credentialDocumentation": [
11
+ {
12
+ "url": "https://docs.cloud.deepset.ai"
13
+ }
14
+ ],
15
+ "primaryDocumentation": [
16
+ {
17
+ "url": "https://docs.cloud.deepset.ai/docs/use-pipeline-as-mcp-tool"
18
+ }
19
+ ]
20
+ }
21
+ }
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8"?><svg id="Layer_2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 77.55 77.55"><defs><style>.cls-1,.cls-2{fill:#fff;}.cls-3{fill:#2558ff;}.cls-2{fill-rule:evenodd;}</style></defs><g id="Layer_1-2"><rect class="cls-3" x="0" width="77.55" height="77.55" rx="11.63" ry="11.63"/><path class="cls-2" d="m31.12,34.79v-15.03h-4.42v15.03h.02v4.42h19.84v18.58h4.42v-23h-19.86Z"/><path class="cls-1" d="m31.25,55.46c0,1.29-1.05,2.33-2.33,2.33s-2.33-1.05-2.33-2.33c0-1.29,1.04-2.33,2.33-2.33,1.29,0,2.33,1.05,2.33,2.33Z"/><rect class="cls-1" x="26.69" y="36.51" width="4.42" height="13.46"/></g></svg>
@@ -0,0 +1,43 @@
1
+ import type { RequestOptions } from '@modelcontextprotocol/sdk/shared/protocol.js';
2
+ import type { FetchLike } from '@modelcontextprotocol/sdk/shared/transport.js';
3
+ import type { Tool } from '@modelcontextprotocol/sdk/types.js';
4
+ import type { IDataObject, IExecuteFunctions, ILoadOptionsFunctions, INodePropertyOptions, ISupplyDataFunctions } from 'n8n-workflow';
5
+ import { Client } from '@modelcontextprotocol/sdk/client/index.js';
6
+ import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
7
+ export declare const DEFAULT_API_ORIGIN = "https://api.cloud.deepset.ai";
8
+ type McpContext = IExecuteFunctions | ISupplyDataFunctions | ILoadOptionsFunctions;
9
+ export declare function normalizeApiOrigin(serverUrl: string): string;
10
+ export declare function getApiOriginFromCredentials(credentials: IDataObject): string;
11
+ export declare function getApiBaseUrlV1FromOrigin(origin: string): string;
12
+ export declare function getApiBaseUrlV2FromOrigin(origin: string): string;
13
+ export interface McpAuth {
14
+ token: string;
15
+ apiOrigin: string;
16
+ refresh?: () => Promise<string | undefined>;
17
+ }
18
+ export declare function resolveMcpAuth(context: McpContext, itemIndex: number): Promise<McpAuth>;
19
+ export declare function createBearerFetch(auth: McpAuth, baseFetch?: FetchLike): FetchLike;
20
+ export declare function createMcpTransport(workspaceId: string, auth: McpAuth, signal?: AbortSignal): {
21
+ client: Client;
22
+ transport: StreamableHTTPClientTransport;
23
+ mcpUrl: string;
24
+ };
25
+ export declare function normalizeMcpInputSchema(raw: unknown): Record<string, unknown>;
26
+ export declare function describeTransportErrorHint(error: unknown): string;
27
+ export declare function describeToolCallErrorHint(error: unknown): string;
28
+ export type ToolFilterMode = 'all' | 'selected' | 'except';
29
+ export declare function getSelectedTools<T extends {
30
+ name: string;
31
+ }>({ mode, includeTools, excludeTools, tools, }: {
32
+ mode: ToolFilterMode;
33
+ includeTools: string[];
34
+ excludeTools: string[];
35
+ tools: T[];
36
+ }): T[];
37
+ export declare function buildMcpToolName(nodeName: string, toolName: string): string;
38
+ export declare function contentToString(content: unknown): string;
39
+ export declare function isStructuredContent(value: unknown): value is Record<string, unknown>;
40
+ export declare function listAllMcpTools(client: Client, options?: RequestOptions): Promise<Tool[]>;
41
+ export declare function loadWorkspaceOptions(context: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
42
+ export declare function loadMcpToolOptions(context: ILoadOptionsFunctions, workspaceId: string, auth: McpAuth): Promise<INodePropertyOptions[]>;
43
+ export {};