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

Function get_context

src/mcp_cli/context/context_manager.py:295–306  ·  view source on GitHub ↗

Convenience function to get the current application context. Returns: The current ApplicationContext Raises: RuntimeError: If context hasn't been initialized

()

Source from the content-addressed store, hash-verified

293
294
295def get_context() -> ApplicationContext:
296 """
297 Convenience function to get the current application context.
298
299 Returns:
300 The current ApplicationContext
301
302 Raises:
303 RuntimeError: If context hasn't been initialized
304 """
305 manager = ContextManager()
306 return manager.get_context()
307
308
309def initialize_context(**kwargs) -> ApplicationContext:

Callers 15

executeMethod · 0.90
executeMethod · 0.90
executeMethod · 0.90
executeMethod · 0.90
executeMethod · 0.90
executeMethod · 0.90
executeMethod · 0.90
executeMethod · 0.90
executeMethod · 0.90
executeMethod · 0.90
executeMethod · 0.90
executeMethod · 0.90

Calls 2

get_contextMethod · 0.95
ContextManagerClass · 0.85