MCPcopy
hub / github.com/FlowiseAI/Flowise / initialize

Method initialize

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

Source from the content-addressed store, hash-verified

104 }
105
106 async initialize() {
107 if (this._tools === null) {
108 this.client = await this.createClient()
109
110 this._tools = await this.client.request({ method: 'tools/list' }, ListToolsResultSchema)
111
112 this.tools = await this.get_tools()
113
114 // Close the initial client after initialization
115 await this.client.close()
116 }
117 }
118
119 async get_tools(): Promise<Tool[]> {
120 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