MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / initialize

Method initialize

packages/components/nodes/tools/MCP/core.ts:171–182  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

169 }
170
171 async initialize() {
172 if (this._tools === null) {
173 this.client = await this.createClient()
174
175 this._tools = await this.client.request({ method: 'tools/list' }, ListToolsResultSchema)
176
177 this.tools = await this.get_tools()
178
179 // Close the initial client after initialization
180 await this.client.close()
181 }
182 }
183
184 async get_tools(): Promise<Tool[]> {
185 if (this._tools === null || this.client === null) {

Callers 15

getToolsMethod · 0.95
getToolsMethod · 0.95
getToolsMethod · 0.95
getToolsMethod · 0.95
getToolsMethod · 0.95
getToolsMethod · 0.95
getToolsMethod · 0.95
getToolsMethod · 0.95
getToolsMethod · 0.95
getToolsMethod · 0.45
getToolsMethod · 0.45
getDataSourceMethod · 0.45

Calls 3

createClientMethod · 0.95
get_toolsMethod · 0.95
closeMethod · 0.80

Tested by

no test coverage detected