MCPcopy Create free account
hub / github.com/IBM/mcp-cli / initialize

Method initialize

src/mcp_cli/context/context_manager.py:264–277  ·  view source on GitHub ↗

Initialize or get the application context.

(
        self,
        tool_manager: ToolManager | None = None,
        config_path: Path | None = None,
        **kwargs,
    )

Source from the content-addressed store, hash-verified

262 return cls._instance
263
264 def initialize(
265 self,
266 tool_manager: ToolManager | None = None,
267 config_path: Path | None = None,
268 **kwargs,
269 ) -> ApplicationContext:
270 """
271 Initialize or get the application context.
272 """
273 if self._context is None:
274 self._context = ApplicationContext.create(
275 tool_manager=tool_manager, config_path=config_path, **kwargs
276 )
277 return self._context
278
279 def get_context(self) -> ApplicationContext:
280 """

Calls 1

createMethod · 0.45