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

Function _inner

src/mcp_cli/run_command.py:321–339  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

319 """
320
321 async def _inner() -> None:
322 if mode not in {"chat", "interactive"}:
323 raise typer.BadParameter("mode must be 'chat' or 'interactive'")
324
325 tm = await _init_tool_manager(
326 config_file, server, initialization_timeout=init_timeout
327 )
328
329 try:
330 if mode == "chat":
331 ok = await _enter_chat_mode(tm, provider=provider, model=model)
332 else:
333 ok = await _enter_interactive_mode(tm, provider=provider, model=model)
334
335 if not ok:
336 raise RuntimeError("Command returned non-zero status")
337
338 finally:
339 await _safe_close(tm)
340
341 try:
342 asyncio.run(_inner())

Callers 1

cli_entryFunction · 0.85

Calls 4

_init_tool_managerFunction · 0.85
_enter_chat_modeFunction · 0.85
_enter_interactive_modeFunction · 0.85
_safe_closeFunction · 0.85

Tested by

no test coverage detected