UNPKG

@n8n/n8n-nodes-langchain

Version:

![Banner image](https://user-images.githubusercontent.com/10284570/173569848-c624317f-42b1-45a6-ab09-f0ea3c247648.png)

16 lines (15 loc) 1.06 kB
import { DynamicStructuredTool, type DynamicStructuredToolInput } from '@langchain/core/tools'; import type { Client } from '@modelcontextprotocol/sdk/client/index.js'; import { type IDataObject } from 'n8n-workflow'; import type { McpToolIncludeMode } from './types'; import type { McpTool } from '../shared/types'; export declare function getSelectedTools({ mode, includeTools, excludeTools, tools, }: { mode: McpToolIncludeMode; includeTools?: string[]; excludeTools?: string[]; tools: McpTool[]; }): McpTool[]; export declare const getErrorDescriptionFromToolCall: (result: unknown) => string | undefined; export declare const createCallTool: (name: string, client: Client, timeout: number, onError: (error: string) => void, getAbortSignal?: () => AbortSignal | undefined) => (args: IDataObject) => Promise<{} | null>; export declare function buildMcpToolName(serverName: string, toolName: string): string; export declare function mcpToolToDynamicTool(tool: McpTool, onCallTool: DynamicStructuredToolInput['func']): DynamicStructuredTool;