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

Method create

src/mcp_cli/context/context_manager.py:80–98  ·  view source on GitHub ↗

Factory method to create a context with common defaults.

(
        cls,
        tool_manager: ToolManager | None = None,
        config_path: Path | None = None,
        provider: str | None = None,
        model: str | None = None,
        **kwargs,
    )

Source from the content-addressed store, hash-verified

78
79 @classmethod
80 def create(
81 cls,
82 tool_manager: ToolManager | None = None,
83 config_path: Path | None = None,
84 provider: str | None = None,
85 model: str | None = None,
86 **kwargs,
87 ) -> ApplicationContext:
88 """
89 Factory method to create a context with common defaults.
90 """
91 context = cls(
92 tool_manager=tool_manager,
93 config_path=config_path or Path("server_config.json"),
94 provider=provider or DEFAULT_PROVIDER,
95 model=model or DEFAULT_MODEL,
96 **kwargs,
97 )
98 return context
99
100 async def initialize(self) -> None:
101 """

Callers 1

initializeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected