Can assistant call function to directly read a file attached in a thread

Let say I have attached a file in the thread, and I have created an assistant with tools: retrieval, code interpreter and function calling. I want to call my own function to read the file content, instead of using retrieval or code interpreter. How should I define the function such that it will access the file inside the thread? The attached file seems to be located at: /mnt/data/file-xxxx.