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

Method close

src/mcp_cli/tools/manager.py:373–385  ·  view source on GitHub ↗

Close StreamManager and cleanup.

(self)

Source from the content-addressed store, hash-verified

371 return self._app_host
372
373 async def close(self) -> None:
374 """Close StreamManager and cleanup."""
375 if self._app_host is not None:
376 try:
377 await self._app_host.close_all()
378 except Exception as e:
379 logger.warning(f"Error closing app host: {e}")
380
381 if self.stream_manager:
382 try:
383 await self.stream_manager.close()
384 except Exception as e:
385 logger.warning(f"Error closing stream_manager: {e}")
386
387 # ================================================================
388 # Tool Access (with ToolInfo conversion)

Callers 15

testFunction · 0.95
analyze_real_serversFunction · 0.95
test_conversation_flowFunction · 0.95
testFunction · 0.95
diagnose_tool_managerMethod · 0.95
test_executionFunction · 0.95
test_server_integrationFunction · 0.95

Calls 1

close_allMethod · 0.80

Tested by 8

test_conversation_flowFunction · 0.76
test_executionFunction · 0.76
test_server_integrationFunction · 0.76
tool_manager_sqliteFunction · 0.76